error when building env
Hi,
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc -o tools/env/fw_printenv_unstripped tools/env/fw_env.o tools/env/fw_env_main.o tools/env/crc32.o tools/env/ctype.o tools/env/linux_string.o tools/env/env_attr.o tools/env/env_flags.o tools/env/aes.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/fw_env.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/fw_env.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/fw_env_main.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/fw_env_main.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/crc32.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/crc32.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/ctype.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/ctype.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/linux_string.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/linux_string.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/env_attr.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/env_attr.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/env_flags.o does not /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: failed to merge target specific data of file tools/env/env_flags.o /opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error: tools/env/fw_printenv_unstripped uses VFP register arguments, tools/env/aes.o does not
When env is built with "-mfloat-abi=soft" everything is fine. Has this been triggered by anyone else?
Thanks!
Luka
Quoted 6 lines · Luka Perkov
Hi,
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc-otools/env/fw_printenv_unstrippedtools/env/fw_env.otools/env/fw_env_main.otools/env/crc32.otools/env/ctype.otools/env/linux_string.otools/env/env_attr.otools/env/env_flags.otools/env/aes.o/opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error:tools/env/fw_printenv_unstrippeduses VFP register arguments,tools/env/fw_env.odoes not
Odd. I can build 'tools-only' with my hard float toolchain fine. Can you build with V=1 and see what files are perhaps not getting passed in a -mfloat option?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140516/71f6d8bc/attachment.pgp>
Hi Tom,
Quoted 9 lines · Tom Rini
Quoted 4 lines · Luka Perkov
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc-otools/env/fw_printenv_unstrippedtools/env/fw_env.otools/env/fw_env_main.otools/env/crc32.otools/env/ctype.otools/env/linux_string.otools/env/env_attr.otools/env/env_flags.otools/env/aes.o/opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error:tools/env/fw_printenv_unstrippeduses VFP register arguments,tools/env/fw_env.odoes notOdd. I can build 'tools-only' with my hard float toolchain fine. Can you build with V=1 and see what files are perhaps not getting passed in a -mfloat option?
The patch below fixes the problem I was having. Is that good enough for proper patch submission?
With it I am able to use replace default HOSTCFLAGS with what was defined in TARGET_CFLAGS.
Luka
tools/env/Makefile +4 -0
@@ -10,6 +10,10 @@ # with "CC" here for the maximum code reuse of scripts/Makefile.host. HOSTCC = $(CC) +ifneq ($(TARGET_CFLAGS),) +HOSTCFLAGS = $(TARGET_CFLAGS) +endif + # Compile for a hosted environment on the target HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ -idirafter $(srctree)/tools/env \
Quoted 26 lines · Luka Perkov
Hi Tom,
Quoted 9 lines · Tom Rini
Quoted 4 lines · Luka Perkov
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc-otools/env/fw_printenv_unstrippedtools/env/fw_env.otools/env/fw_env_main.otools/env/crc32.otools/env/ctype.otools/env/linux_string.otools/env/env_attr.otools/env/env_flags.otools/env/aes.o/opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error:tools/env/fw_printenv_unstrippeduses VFP register arguments,tools/env/fw_env.odoes notOdd. I can build 'tools-only' with my hard float toolchain fine. Can you build with V=1 and see what files are perhaps not getting passed in a -mfloat option?
The patch below fixes the problem I was having. Is that good enough for proper patch submission?
With it I am able to use replace default HOSTCFLAGS with what was defined in
TARGET_CFLAGS.Luka
tools/env/Makefile +0
-0
tools/env/Makefile line 19
Quoted 10 lines
tools/env/Makefile +4
-0@@ -10,6 +10,10 @@ # with "CC" here for the maximum code reuse of scripts/Makefile.host. HOSTCC = $(CC) +ifneq ($(TARGET_CFLAGS),) +HOSTCFLAGS = $(TARGET_CFLAGS) +endif + # Compile for a hosted environment on the target HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ -idirafter $(srctree)/tools/env \
This still seems odd. Masahiro?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140605/a21e949c/attachment.pgp>
Hi,
Quoted 30 lines · Tom Rini
Quoted 29 lines · Luka Perkov
Hi Tom,
Quoted 9 lines · Tom Rini
Quoted 4 lines · Luka Perkov
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc-otools/env/fw_printenv_unstrippedtools/env/fw_env.otools/env/fw_env_main.otools/env/crc32.otools/env/ctype.otools/env/linux_string.otools/env/env_attr.otools/env/env_flags.otools/env/aes.o/opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error:tools/env/fw_printenv_unstrippeduses VFP register arguments,tools/env/fw_env.odoes notOdd. I can build 'tools-only' with my hard float toolchain fine. Can you build with V=1 and see what files are perhaps not getting passed in a -mfloat option?
The patch below fixes the problem I was having. Is that good enough for proper patch submission?
With it I am able to use replace default HOSTCFLAGS with what was defined in
TARGET_CFLAGS.Luka
tools/env/Makefile +0
-0@@ -10,6 +10,10 @@ # with "CC" here for the maximum code reuse of scripts/Makefile.host. HOSTCC = $(CC)
Quoted 9 lines
tools/env/Makefile line 19
Quoted 7 lines
tools/env/Makefile +4
-0+ifneq ($(TARGET_CFLAGS),) +HOSTCFLAGS = $(TARGET_CFLAGS) +endif + # Compile for a hosted environment on the target HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ -idirafter $(srctree)/tools/env \This still seems odd. Masahiro?
Yes is seems odd indeed, shouldn't it be unconditionally be part of the CROSS_BUILD_TOOLS check below? Since it switches compiler, but not related flags..
Regards,
Jeroen
Hi Luka, Tom,
Quoted 30 lines · On Thu, 5 Jun 2014 14:25:47 -0400 Tom Rini <[email protected]> wrote:
Quoted 29 lines · Luka Perkov
Hi Tom,
Quoted 9 lines · Tom Rini
Quoted 4 lines · Luka Perkov
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc-otools/env/fw_printenv_unstrippedtools/env/fw_env.otools/env/fw_env_main.otools/env/crc32.otools/env/ctype.otools/env/linux_string.otools/env/env_attr.otools/env/env_flags.otools/env/aes.o/opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error:tools/env/fw_printenv_unstrippeduses VFP register arguments,tools/env/fw_env.odoes notOdd. I can build 'tools-only' with my hard float toolchain fine. Can you build with V=1 and see what files are perhaps not getting passed in a -mfloat option?
The patch below fixes the problem I was having. Is that good enough for proper patch submission?
With it I am able to use replace default HOSTCFLAGS with what was defined in
TARGET_CFLAGS.Luka
tools/env/Makefile +0
-0@@ -10,6 +10,10 @@ # with "CC" here for the maximum code reuse of scripts/Makefile.host. HOSTCC = $(CC)
Quoted 10 lines
tools/env/Makefile line 19
Quoted 7 lines
tools/env/Makefile +4
-0+ifneq ($(TARGET_CFLAGS),) +HOSTCFLAGS = $(TARGET_CFLAGS) +endif + # Compile for a hosted environment on the target HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ -idirafter $(srctree)/tools/env \This still seems odd. Masahiro?
Looks odd to me.
According to Luka's build log,
he is trying to compile the C sources with hard float, but link them against soft float library.
In my understanding, consistency should be kept between compile and link stage by the compiler as is .
We don't have to tweak HOSTCFLAGS from the outside.
Best Regards
Masahiro Yamada
Hi Masahiro,
Quoted 41 lines · Masahiro Yamada
Quoted 28 lines · On Thu, 5 Jun 2014 14:25:47 -0400 Tom Rini <[email protected]> wrote:
Quoted 27 lines · Luka Perkov
Quoted 9 lines · Tom Rini
Quoted 4 lines · Luka Perkov
when trying to build env with "-mfloat-abi=hard" I'm hitting this error:
/opt/openwrt/trunk/staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-uclibcgnueabi-gcc-otools/env/fw_printenv_unstrippedtools/env/fw_env.otools/env/fw_env_main.otools/env/crc32.otools/env/ctype.otools/env/linux_string.otools/env/env_attr.otools/env/env_flags.otools/env/aes.o/opt/build/owrt_staging_dir/toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/../lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/../../../../arm-openwrt-linux-uclibcgnueabi/bin/ld: error:tools/env/fw_printenv_unstrippeduses VFP register arguments,tools/env/fw_env.odoes notOdd. I can build 'tools-only' with my hard float toolchain fine. Can you build with V=1 and see what files are perhaps not getting passed in a -mfloat option?
The patch below fixes the problem I was having. Is that good enough for proper patch submission?
With it I am able to use replace default HOSTCFLAGS with what was defined in
TARGET_CFLAGS.Luka
tools/env/Makefile +0
-0@@ -10,6 +10,10 @@ # with "CC" here for the maximum code reuse of scripts/Makefile.host. HOSTCC = $(CC)Quoted 9 lines
tools/env/Makefile line 19
Quoted 7 lines
tools/env/Makefile +4
-0+ifneq ($(TARGET_CFLAGS),) +HOSTCFLAGS = $(TARGET_CFLAGS) +endif + # Compile for a hosted environment on the target HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ -idirafter $(srctree)/tools/env \This still seems odd. Masahiro?
Looks odd to me.
Quoted 7 lines
According to Luka's build log,
he is trying to compile the C sources with hard float, but link them against soft float library.In my understanding, consistency should be kept between compile and link stage by the compiler as is .
We don't have to tweak HOSTCFLAGS from the outside.
Back when I was debugging this I've seen that in main Makefile this line is defined:
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
I needed to replace it to whatever I have defined in TARGET_CFLAGS, thus I've proposed the patch above.
It's not a problem to keep this workaround externally, I thought others were hitting this problem as well.
Luka