From 755de234cb50aa786e7e6821e14d611775650cb6 Mon Sep 17 00:00:00 2001 From: Carlos Santos Date: Thu, 18 Aug 2016 21:07:03 -0300 Subject: elf2flt: use CT_ARCH to set target CPU, not CT_TARGET CT_TARGET is composed as "${CT_ARCH}${CT_ARCH_SUFFIX}", so CT_TARGET may become something like "armv7", for example. This is used by the configure script to set the "CPU" variable in the Makefile, leading to a commad line containing -DTARGET_armv7 -DTARGET_CPU="armv7" In this case the compilation of elf2flt.c fails with "Don't know how to support your CPU architecture??". Passsing "CPU=${CT_ARCH}" in the make command line overrides the configured value and solves the problem. Signed-off-by: Carlos Santos diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 5fb9a83..47fffa1 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -316,7 +316,7 @@ do_elf2flt_backend() { "${CT_ELF2FLT_EXTRA_CONFIG_ARRAY[@]}" CT_DoLog EXTRA "Building elf2flt" - CT_DoExecLog ALL make ${JOBSFLAGS} + CT_DoExecLog ALL make ${JOBSFLAGS} CPU=${CT_ARCH} CT_DoLog EXTRA "Installing elf2flt" CT_DoExecLog ALL make install -- cgit v0.10.2-6-g49f6 From 308c6b9a145cbfbd3e9a4b09aef5935572cce6ab Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 7 Feb 2017 00:36:51 -0800 Subject: Add a contrived ARM with elf2flt sample ... that exhibited the issue with elf2flt configuration. Original reported did not provide the config, and did not respond. Signed-off-by: Alexey Neyman diff --git a/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config b/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config new file mode 100644 index 0000000..e3d625f --- /dev/null +++ b/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config @@ -0,0 +1,20 @@ +CT_ARCH_arm=y +CT_ARCH_SUFFIX="v6" +# CT_ARCH_USE_MMU is not set +CT_TARGET_VENDOR="nommu" +CT_KERNEL_linux=y +# CT_SHARED_LIBS is not set +# CT_KERNEL_LINUX_INSTALL_CHECK is not set +CT_BINUTILS_LINKER_LD_GOLD=y +CT_BINUTILS_GOLD_THREADS=y +CT_BINUTILS_LD_WRAPPER=y +CT_BINUTILS_PLUGINS=y +CT_CC_GCC_SHOW_LINARO=y +CT_CC_GCC_DISABLE_PCH=y +CT_CC_GCC_BUILD_ID=y +CT_CC_GCC_LNK_HASH_STYLE_BOTH=y +CT_CC_LANG_CXX=y +CT_DEBUG_gdb=y +# CT_GDB_CROSS_PYTHON is not set +CT_GDB_GDBSERVER=y +CT_GETTEXT=y diff --git a/samples/armv6-nommu-linux-uclibcgnueabi/reported.by b/samples/armv6-nommu-linux-uclibcgnueabi/reported.by new file mode 100644 index 0000000..d5e63a5 --- /dev/null +++ b/samples/armv6-nommu-linux-uclibcgnueabi/reported.by @@ -0,0 +1,3 @@ +reporter_name="Alexey Neyman" +reporter_url="" +reporter_comment="Test config for ARM with no MMU." -- cgit v0.10.2-6-g49f6