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.
This commit is contained in:
Jan Nieuwenhuizen 2019-05-25 16:01:39 +02:00
parent a22e5d3acc
commit 0ef174897f
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
4 changed files with 21 additions and 21 deletions

View file

@ -65,7 +65,7 @@ trace "M1 libc.S" $M1\
-o lib/$mes_arch/libc.o -o lib/$mes_arch/libc.o
trace "M1 mes.S" $M1\ trace "M1 mes.S" $M1\
--LittleEndian\ --LittleEndian\
--Architecture 1\ --architecture x86\
-f ${srcdest}lib/$mes_arch/$arch.M1\ -f ${srcdest}lib/$mes_arch/$arch.M1\
-f $MES_SEED/$mes_arch/mes.S\ -f $MES_SEED/$mes_arch/mes.S\
-o src/mes.o -o src/mes.o
@ -76,7 +76,7 @@ trace "BLOOD_ELF mes.S" $BLOOD_ELF\
-o src/mes.S.blood-elf -o src/mes.S.blood-elf
trace "M1 mes.blood-elf" $M1\ trace "M1 mes.blood-elf" $M1\
--LittleEndian\ --LittleEndian\
--Architecture 1\ --architecture x86\
-f src/mes.S.blood-elf\ -f src/mes.S.blood-elf\
-o src/mes.o.blood-elf -o src/mes.o.blood-elf
trace "HEX2 mes.o" $HEX2\ trace "HEX2 mes.o" $HEX2\

View file

@ -10,16 +10,16 @@ MES_ARENA=${MES_ARENA-100000000}
MES_MAX_ARENA=${MES_MAX_ARENA-100000000} MES_MAX_ARENA=${MES_MAX_ARENA-100000000}
MES_STACK=${MES_STACK-500000} MES_STACK=${MES_STACK-500000}
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-0header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf-0footer.hex2 --exec_enable -o lib/x86-mes/0exit-42 hex2 --LittleEndian --architecture x86 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-0header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf-0footer.hex2 --exec_enable -o lib/x86-mes/0exit-42
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf32-footer-single-main.hex2 --exec_enable -o lib/x86-mes/exit-42 hex2 --LittleEndian --architecture x86 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf32-footer-single-main.hex2 --exec_enable -o lib/x86-mes/exit-42
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/crt1.S -o lib/x86-mes/crt1.o M1 --LittleEndian --architecture x86 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/crt1.S -o lib/x86-mes/crt1.o
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc.S -o lib/x86-mes/libc.o M1 --LittleEndian --architecture x86 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc.S -o lib/x86-mes/libc.o
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -o src/mes.o M1 --LittleEndian --architecture x86 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -o src/mes.o
blood-elf -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -f @MES_SEED@/x86-mes/libc.S -o src/mes.S.blood-elf blood-elf -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -f @MES_SEED@/x86-mes/libc.S -o src/mes.S.blood-elf
M1 --LittleEndian --Architecture 1 -f src/mes.S.blood-elf -o src/mes.o.blood-elf M1 --LittleEndian --architecture x86 -f src/mes.S.blood-elf -o src/mes.o.blood-elf
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/crt1.o -f lib/x86-mes/libc.o -f src/mes.o -f src/mes.o.blood-elf --exec_enable -o src/mes hex2 --LittleEndian --architecture x86 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/crt1.o -f lib/x86-mes/libc.o -f src/mes.o -f src/mes.o.blood-elf --exec_enable -o src/mes
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+tcc.S -o lib/x86-mes/libc+tcc.o M1 --LittleEndian --architecture x86 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+tcc.S -o lib/x86-mes/libc+tcc.o
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+gnu.S -o lib/x86-mes/libc+gnu.o M1 --LittleEndian --architecture x86 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+gnu.S -o lib/x86-mes/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/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/linux/x86-mes/crt1.o lib/linux/x86-mes/crt1.c @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/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/linux/x86-mes/crt1.o lib/linux/x86-mes/crt1.c

View file

@ -142,23 +142,23 @@ fi
if [ "$arch" = "x86" ]; then if [ "$arch" = "x86" ]; then
HEX2FLAGS=${HEX2FLAGS-" HEX2FLAGS=${HEX2FLAGS-"
--LittleEndian --LittleEndian
--Architecture 1 --architecture x86
--BaseAddress 0x1000000 --BaseAddress 0x1000000
"} "}
M1FLAGS=${M1FLAGS-" M1FLAGS=${M1FLAGS-"
--LittleEndian --LittleEndian
--Architecture 1 --architecture x86
"} "}
bits=32 bits=32
elif [ "$arch" = "x86_64" ]; then elif [ "$arch" = "x86_64" ]; then
HEX2FLAGS=${HEX2FLAGS-" HEX2FLAGS=${HEX2FLAGS-"
--LittleEndian --LittleEndian
--Architecture 2 --architecture amd64
--BaseAddress 0x1000000 --BaseAddress 0x1000000
"} "}
M1FLAGS=${M1FLAGS-" M1FLAGS=${M1FLAGS-"
--LittleEndian --LittleEndian
--Architecture 2 --architecture amd64
"} "}
bits=64 bits=64
fi fi

View file

@ -175,8 +175,8 @@
(else (replace-suffix M1-file-name ".o")))) (else (replace-suffix M1-file-name ".o"))))
(machine (option-ref options 'machine "32")) (machine (option-ref options 'machine "32"))
(architecture (cond (architecture (cond
((equal? machine "32") "1") ((equal? machine "32") "x86")
((equal? machine "64") "2") ((equal? machine "64") "amd64")
(else "1"))) (else "1")))
(m1-macros (cond (m1-macros (cond
((equal? machine "32") "x86.M1") ((equal? machine "32") "x86.M1")
@ -186,7 +186,7 @@
(M1 (or (getenv "M1") "M1")) (M1 (or (getenv "M1") "M1"))
(command `(,M1 (command `(,M1
"--LittleEndian" "--LittleEndian"
"--Architecture" ,architecture "--architecture" ,architecture
"-f" ,(arch-find options m1-macros) "-f" ,(arch-find options m1-macros)
,@(append-map (cut list "-f" <>) M1-files) ,@(append-map (cut list "-f" <>) M1-files)
"-o" ,hex2-file-name))) "-o" ,hex2-file-name)))
@ -203,8 +203,8 @@
(hex2 (or (getenv "HEX2") "hex2")) (hex2 (or (getenv "HEX2") "hex2"))
(machine (option-ref options 'machine "32")) (machine (option-ref options 'machine "32"))
(architecture (cond (architecture (cond
((equal? machine "32") "1") ((equal? machine "32") "x86")
((equal? machine "64") "2") ((equal? machine "64") "amd64")
(else "1"))) (else "1")))
(base-address (option-ref options 'base-address "0x1000000")) (base-address (option-ref options 'base-address "0x1000000"))
(elf-footer (or elf-footer (elf-footer (or elf-footer
@ -215,7 +215,7 @@
`("-f" ,(arch-find options "crt1.o")))) `("-f" ,(arch-find options "crt1.o"))))
(command `(,hex2 (command `(,hex2
"--LittleEndian" "--LittleEndian"
"--Architecture" ,architecture "--architecture" ,architecture
"--BaseAddress" ,base-address "--BaseAddress" ,base-address
"-f" ,(arch-find options (string-append "elf" machine "-header.hex2")) "-f" ,(arch-find options (string-append "elf" machine "-header.hex2"))
,@start-files ,@start-files