101-arm-uclibc-sim-needs-libm.patch 1.7 KB

12345678910111213141516171819202122
  1. This patch fixes a build error on arm:
  2. arm-openwrt-linux-uclibcgnueabi-gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -DMODET -DNEED_UI_LOOP_HOOK -DSIM_TARGET_SWITCHES -I. -I. -I../common -I./../common -I../../include -I./../../include -I../../bfd -I./../../bfd -I../../opcodes -I./../../opcodes -Os -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3-d16 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -mfloat-abi=hard -static-libstdc++ -static-libgcc -L/fun/Projects/OpenWrt/dev/openwrt-core-2/staging_dir/target-arm_cortex-a8+vfpv3_uClibc-0.9.33.2_eabi/usr/lib -L/fun/Projects/OpenWrt/dev/openwrt-core-2/staging_dir/target-arm_cortex-a8+vfpv3_uClibc-0.9.33.2_eabi/lib -L/fun/Projects/OpenWrt/dev/openwrt-core-2/staging_dir/toolchain-arm_cortex-a8+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/fun/Projects/OpenWrt/dev/openwrt-core-2/staging_dir/toolchain-arm_cortex-a8+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib -o run \
  3. run.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -lz -lnsl
  4. ../../libiberty/libiberty.a(floatformat.o): In function `floatformat_to_double':
  5. floatformat.c:(.text+0x454): undefined reference to `ldexp'
  6. floatformat.c:(.text+0x4a4): undefined reference to `ldexp'
  7. ../../libiberty/libiberty.a(floatformat.o): In function `floatformat_from_double':
  8. floatformat.c:(.text+0x5dc): undefined reference to `frexp'
  9. floatformat.c:(.text+0x644): undefined reference to `ldexp'
  10. collect2: error: ld returned 1 exit status
  11. --- a/sim/arm/Makefile.in
  12. +++ b/sim/arm/Makefile.in
  13. @@ -18,6 +18,7 @@
  14. ## COMMON_PRE_CONFIG_FRAG
  15. SIM_EXTRA_CFLAGS = -DMODET -DNEED_UI_LOOP_HOOK -DSIM_TARGET_SWITCHES
  16. +SIM_EXTRA_LIBS = -lm
  17. COPRO=@COPRO@