From 8bee41d7344df7f91c9812411fff4c89e6ddd5db Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 7 Dec 2018 14:46:00 -0800 Subject: Remove a TBD It only applied to core-pass-2 compiler; final compiler can locate the linker script just fine. Signed-off-by: Alexey Neyman diff --git a/scripts/build/libc/moxiebox.sh b/scripts/build/libc/moxiebox.sh index 96a63ff..f542187 100644 --- a/scripts/build/libc/moxiebox.sh +++ b/scripts/build/libc/moxiebox.sh @@ -23,14 +23,6 @@ moxiebox_main() { newlib_main - # newlib installs the linker script, moxiebox.ld, to the - # PREFIX/moxie-unknown-moxiebox/lib, but ld searches PREFIX/lib when - # configured for that target. ld does find scripts in PREFIX/TARGET/lib - # for other targets, so this seems to be moxie architecture's quirk. - # Move it to PREFIX/lib. - # TBD CT_DoExecLog ALL mv -v "${CT_SYSROOT_DIR}/lib/"*.ld "${CT_PREFIX_DIR}/lib" - # TBD what about moxie-*-elf? Does it need the same? - CT_DoStep INFO "Installing moxiebox runtime and VM" CT_mkdir_pushd "${CT_BUILD_DIR}/build-libc-moxiebox" -- cgit v0.10.2-6-g49f6 From 854b18b2ac7738bff38010cc35af700cd64af9b6 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 7 Dec 2018 14:48:08 -0800 Subject: Disallow selection of "both endianness" ... if the architecture only supports single endianness selection. Signed-off-by: Alexey Neyman diff --git a/config/target.in b/config/target.in index 34d9369..c0054f2 100644 --- a/config/target.in +++ b/config/target.in @@ -142,10 +142,12 @@ config ARCH_LE config ARCH_BE_LE bool prompt "Both, default big endian" + depends on ARCH_SUPPORTS_BOTH_ENDIAN config ARCH_LE_BE bool prompt "Both, default little endian" + depends on ARCH_SUPPORTS_BOTH_ENDIAN endchoice -- cgit v0.10.2-6-g49f6 From e85ec884ade523c1aa332d7819c539934f1c860a Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 7 Dec 2018 14:49:03 -0800 Subject: Use -mel/-meb for moxie Signed-off-by: Alexey Neyman diff --git a/scripts/build/arch/moxie.sh b/scripts/build/arch/moxie.sh index 72c82c9..9545d19 100644 --- a/scripts/build/arch/moxie.sh +++ b/scripts/build/arch/moxie.sh @@ -3,6 +3,11 @@ # No arch-specific overrides yet CT_DoArchTupleValues() { + case "${CT_ARCH_ENDIAN}" in + big) CT_ARCH_ENDIAN_CFLAG=-meb;; + little) CT_ARCH_ENDIAN_CFLAG=-mel;; + esac + case "${CT_LIBC}" in moxiebox) CT_TARGET_SYS=moxiebox -- cgit v0.10.2-6-g49f6 From 7a7a20bfee243cd0078ba843e6c3dce977d61ec9 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 7 Dec 2018 14:49:28 -0800 Subject: Moxiebox requires target to be LE Signed-off-by: Alexey Neyman diff --git a/config/libc/moxiebox.in b/config/libc/moxiebox.in index ac0324c..ca2107e 100644 --- a/config/libc/moxiebox.in +++ b/config/libc/moxiebox.in @@ -4,6 +4,7 @@ # autoconfig and automake. ## depends on ARCH_MOXIE +## depends on ARCH_LE ## depends on BARE_METAL ## select LIBC_NEWLIB_SHOW ## select LIBC_SUPPORT_THREADS_NONE diff --git a/samples/moxie-unknown-moxiebox/crosstool.config b/samples/moxie-unknown-moxiebox/crosstool.config index 6fae859..58fe653 100644 --- a/samples/moxie-unknown-moxiebox/crosstool.config +++ b/samples/moxie-unknown-moxiebox/crosstool.config @@ -1,5 +1,6 @@ CT_EXPERIMENTAL=y CT_ARCH_MOXIE=y +CT_ARCH_LE=y CT_DEBUG_GDB=y CT_GDB_CROSS_SIM=y # CT_GDB_CROSS_PYTHON is not set -- cgit v0.10.2-6-g49f6