[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mes] wip-arm update for named --architecture in mescc-tools master
From: |
Jan Nieuwenhuizen |
Subject: |
[bug-mes] wip-arm update for named --architecture in mescc-tools master |
Date: |
Sat, 23 Feb 2019 15:20:54 +0100 |
Hi!
Find attached.
>From 526182f8afab8f551883b420c9f8123193fbe63d Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Sat, 23 Feb 2019 15:01:39 +0100
Subject: [PATCH] mescc: Use named --architecture switch for upcoming
mescc-tools 0.6.
* module/mescc/mescc.scm (M1->hex2): Use named --architecture switch for
upcoming mescc-tools 0.6.
(hex2->elf): Likewise.
* build-aux/bootstrap-mes.sh: Likewise.
* build-aux/bootstrap.sh.in: Likewise.
* build-aux/config.sh: Likewise.
---
build-aux/bootstrap-mes.sh | 4 ++--
build-aux/bootstrap.sh.in | 18 +++++++++---------
build-aux/build-mes.sh | 20 ++++++++++----------
build-aux/config.sh | 8 ++++----
module/mescc/mescc.scm | 12 ++++++------
5 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/build-aux/bootstrap-mes.sh b/build-aux/bootstrap-mes.sh
index 377f8798..97d4a82c 100755
--- a/build-aux/bootstrap-mes.sh
+++ b/build-aux/bootstrap-mes.sh
@@ -65,7 +65,7 @@ trace "M1 libc.S" $M1\
-o lib/$mes_arch/libc.o
trace "M1 mes.S" $M1\
--LittleEndian\
- --Architecture 1\
+ --architecture x86\
-f ${srcdest}lib/$mes_arch/$arch.M1\
-f $MES_SEED/$mes_arch/mes.S\
-o src/mes.o
@@ -76,7 +76,7 @@ trace "BLOOD_ELF mes.S" $BLOOD_ELF\
-o src/mes.S.blood-elf
trace "M1 mes.blood-elf" $M1\
--LittleEndian\
- --Architecture 1\
+ --architecture x86\
-f src/mes.S.blood-elf\
-o src/mes.o.blood-elf
trace "HEX2 mes.o" $HEX2\
diff --git a/build-aux/bootstrap.sh.in b/build-aux/bootstrap.sh.in
index 8d047834..28b8993f 100644
--- a/build-aux/bootstrap.sh.in
+++ b/build-aux/bootstrap.sh.in
@@ -10,16 +10,16 @@ MES_ARENA=${MES_ARENA-100000000}
MES_MAX_ARENA=${MES_MAX_ARENA-100000000}
MES_STACK=${MES_STACK-500000}
-hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f
lib/@mes_arch@/elf32-0header.hex2 -f lib/@mes_arch@/elf32-body-exit-42.hex2 -f
lib/@mes_arch@/elf-0footer.hex2 --exec_enable -o lib/@mes_arch@/0exit-42
-hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f
lib/@mes_arch@/elf32-header.hex2 -f lib/@mes_arch@/elf32-body-exit-42.hex2 -f
lib/@mes_arch@/elf32-footer-single-main.hex2 --exec_enable -o
lib/@mes_arch@/exit-42
-M1 --LittleEndian --Architecture 1 -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/crt1.S -o lib/@mes_arch@/crt1.o
-M1 --LittleEndian --Architecture 1 -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/libc.S -o lib/@mes_arch@/libc.o
-M1 --LittleEndian --Architecture 1 -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/mes.S -o src/mes.o
+hex2 --LittleEndian --architecture @ARCH@ --BaseAddress 0x1000000 -f
lib/@mes_arch@/elf32-0header.hex2 -f lib/@mes_arch@/elf32-body-exit-42.hex2 -f
lib/@mes_arch@/elf-0footer.hex2 --exec_enable -o lib/@mes_arch@/0exit-42
+hex2 --LittleEndian --architecture @ARCH@ --BaseAddress 0x1000000 -f
lib/@mes_arch@/elf32-header.hex2 -f lib/@mes_arch@/elf32-body-exit-42.hex2 -f
lib/@mes_arch@/elf32-footer-single-main.hex2 --exec_enable -o
lib/@mes_arch@/exit-42
+M1 --LittleEndian --architecture @ARCH@ -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/crt1.S -o lib/@mes_arch@/crt1.o
+M1 --LittleEndian --architecture @ARCH@ -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/libc.S -o lib/@mes_arch@/libc.o
+M1 --LittleEndian --architecture @ARCH@ -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/mes.S -o src/mes.o
blood-elf -f lib/@mes_arch@/@address@hidden -f @MES_SEED@/@mes_arch@/mes.S -f
@MES_SEED@/@mes_arch@/libc.S -o src/mes.S.blood-elf
-M1 --LittleEndian --Architecture 1 -f src/mes.S.blood-elf -o
src/mes.o.blood-elf
-hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f
lib/@mes_arch@/elf32-header.hex2 -f lib/@mes_arch@/crt1.o -f
lib/@mes_arch@/libc.o -f src/mes.o -f src/mes.o.blood-elf --exec_enable -o
src/mes
-M1 --LittleEndian --Architecture 1 -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/libc+tcc.S -o lib/@mes_arch@/libc+tcc.o
-M1 --LittleEndian --Architecture 1 -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/libc+gnu.S -o lib/@mes_arch@/libc+gnu.o
+M1 --LittleEndian --architecture @ARCH@ -f src/mes.S.blood-elf -o
src/mes.o.blood-elf
+hex2 --LittleEndian --architecture @ARCH@ --BaseAddress 0x1000000 -f
lib/@mes_arch@/elf32-header.hex2 -f lib/@mes_arch@/crt1.o -f
lib/@mes_arch@/libc.o -f src/mes.o -f src/mes.o.blood-elf --exec_enable -o
src/mes
+M1 --LittleEndian --architecture @ARCH@ -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/libc+tcc.S -o lib/@mes_arch@/libc+tcc.o
+M1 --LittleEndian --architecture @ARCH@ -f lib/@mes_arch@/@address@hidden -f
@MES_SEED@/@mes_arch@/libc+gnu.S -o lib/@mes_arch@/libc+gnu.o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D
'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g
-L lib/linux/@mes_arch@ -L lib/linux -L lib/@mes_arch@ -L lib -L @MES_SEED@ -o
lib/linux/@mes_arch@/crt1.o lib/linux/@mes_arch@/crt1.c
diff --git a/build-aux/build-mes.sh b/build-aux/build-mes.sh
index 397fdc09..d9195695 100755
--- a/build-aux/build-mes.sh
+++ b/build-aux/build-mes.sh
@@ -45,20 +45,20 @@ fi
[ "$mes_p" ] && compile lib/libc
[ "$mes_p" ] && archive lib/libc
-[ "$mes_p" ] && compile lib/libc+tcc
-[ "$mes_p" ] && archive lib/libc+tcc
+# [ "$mes_p" ] && compile lib/libc+tcc
+# [ "$mes_p" ] && archive lib/libc+tcc
-[ "$mes_p" ] && compile lib/libc+gnu
-[ "$mes_p" ] && archive lib/libc+gnu
+# [ "$mes_p" ] && compile lib/libc+gnu
+# [ "$mes_p" ] && archive lib/libc+gnu
-[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libtcc1
-[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libtcc1
+# [ "$mes_p" -a ! "$mesc_p" ] && compile lib/libtcc1
+# [ "$mes_p" -a ! "$mesc_p" ] && archive lib/libtcc1
-[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libg
-[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libg
+# [ "$mes_p" -a ! "$mesc_p" ] && compile lib/libg
+# [ "$mes_p" -a ! "$mesc_p" ] && archive lib/libg
-[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libgetopt
-[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libgetopt
+# [ "$mes_p" -a ! "$mesc_p" ] && compile lib/libgetopt
+# [ "$mes_p" -a ! "$mesc_p" ] && archive lib/libgetopt
compile scaffold/main
(libc= link scaffold/main)
diff --git a/build-aux/config.sh b/build-aux/config.sh
index 42897056..6e4ded8b 100644
--- a/build-aux/config.sh
+++ b/build-aux/config.sh
@@ -148,23 +148,23 @@ fi
if [ "$arch" = "x86" ]; then
HEX2FLAGS=${HEX2FLAGS-"
--LittleEndian
---Architecture 1
+--architecture x86
--BaseAddress 0x1000000
"}
M1FLAGS=${M1FLAGS-"
--LittleEndian
---Architecture 1
+--architecture x86
"}
bits=32
elif [ "$arch" = "x86_64" ]; then
HEX2FLAGS=${HEX2FLAGS-"
--LittleEndian
---Architecture 2
+--architecture amd64
--BaseAddress 0x1000000
"}
M1FLAGS=${M1FLAGS-"
--LittleEndian
---Architecture 2
+--architecture amd64
"}
bits=64
fi
diff --git a/module/mescc/mescc.scm b/module/mescc/mescc.scm
index 8f701771..d4a41807 100644
--- a/module/mescc/mescc.scm
+++ b/module/mescc/mescc.scm
@@ -170,7 +170,7 @@
(M1 (or (getenv "M1") "M1"))
(command `(,M1
"--LittleEndian"
- "--Architecture" ,(arch-get-Architecture options)
+ "--architecture" ,(arch-get-architecture options)
"-f" ,(arch-find options (arch-get-m1-macros options))
,@(append-map (cut list "-f" <>) M1-files)
"-o" ,hex2-file-name)))
@@ -195,7 +195,7 @@
`("-f" ,(arch-find options "crt1.o"))))
(command `(,hex2
"--LittleEndian"
- "--Architecture" ,(arch-get-Architecture options)
+ "--architecture" ,(arch-get-architecture options)
"--BaseAddress" ,base-address
"-f" ,(arch-find options (string-append "elf" machine
"-header.hex2"))
,@start-files
@@ -305,11 +305,11 @@
((equal? arch "x86") "x86.M1")
((equal? arch "x86_64") "x86_64.M1"))))
-(define (arch-get-Architecture options)
+(define (arch-get-architecture options)
(let ((arch (arch-get options)))
- (cond ((equal? arch "arm") "40")
- ((equal? arch "x86") "1")
- ((equal? arch "x86_64") "2"))))
+ (cond ((equal? arch "arm") "armv7")
+ ((equal? arch "x86") "x86")
+ ((equal? arch "x86_64") "amd64"))))
(define (multi-opt option-name) (lambda (o) (and (eq? (car o) option-name)
(cdr o))))
--
2.18.0
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com
- [bug-mes] wip-arm update for named --architecture in mescc-tools master,
Jan Nieuwenhuizen <=