From 0ef174897f01d0a52fbc22d5e7f132c7f3af1c38 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 25 May 2019 16:01:39 +0200 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/config.sh | 8 ++++---- module/mescc/mescc.scm | 12 ++++++------ 4 files changed, 21 insertions(+), 21 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 1559299f..23a8a325 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/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 -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 1 -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 +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 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 x86 -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/libc.S -o lib/x86-mes/libc.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 -M1 --LittleEndian --Architecture 1 -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 -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 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 src/mes.S.blood-elf -o src/mes.o.blood-elf +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 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 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 diff --git a/build-aux/config.sh b/build-aux/config.sh index d49e5d85..382d1861 100644 --- a/build-aux/config.sh +++ b/build-aux/config.sh @@ -142,23 +142,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 5ac29078..8a86d9b9 100644 --- a/module/mescc/mescc.scm +++ b/module/mescc/mescc.scm @@ -175,8 +175,8 @@ (else (replace-suffix M1-file-name ".o")))) (machine (option-ref options 'machine "32")) (architecture (cond - ((equal? machine "32") "1") - ((equal? machine "64") "2") + ((equal? machine "32") "x86") + ((equal? machine "64") "amd64") (else "1"))) (m1-macros (cond ((equal? machine "32") "x86.M1") @@ -186,7 +186,7 @@ (M1 (or (getenv "M1") "M1")) (command `(,M1 "--LittleEndian" - "--Architecture" ,architecture + "--architecture" ,architecture "-f" ,(arch-find options m1-macros) ,@(append-map (cut list "-f" <>) M1-files) "-o" ,hex2-file-name))) @@ -203,8 +203,8 @@ (hex2 (or (getenv "HEX2") "hex2")) (machine (option-ref options 'machine "32")) (architecture (cond - ((equal? machine "32") "1") - ((equal? machine "64") "2") + ((equal? machine "32") "x86") + ((equal? machine "64") "amd64") (else "1"))) (base-address (option-ref options 'base-address "0x1000000")) (elf-footer (or elf-footer @@ -215,7 +215,7 @@ `("-f" ,(arch-find options "crt1.o")))) (command `(,hex2 "--LittleEndian" - "--Architecture" ,architecture + "--architecture" ,architecture "--BaseAddress" ,base-address "-f" ,(arch-find options (string-append "elf" machine "-header.hex2")) ,@start-files