我一直在尝试编译包含libCurl的ucLinux,但是当我尝试编译libbzip2时,我在配置中包含curl barfs。
我正在为冷火68K处理器进行交叉编译。
它表示PIC不支持重定位类型,但我不知道如何解决这个问题。我的印象是所有库都需要编译为PIC。
这是输出:
make[4]: Entering directory `/home/lantronix/linuxsdk/linux/lib/libbzip2'
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c blocksort.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c huffman.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c crctable.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c randtable.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c compress.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c decompress.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c bzlib.c
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.3 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
ERROR: reloc type R_68K_32 is not supported for PIC
43 bad relocs
/home/lantronix/linuxsdk/toolchains/freescale-coldfire-4.4/m68k-uclinux/bin/ld.real: warning: cannot find entry symbol _start; defaulting to 00000000
collect2: ld returned 1 exit status
make[4]: *** [all] Error 1
make[4]: Leaving directory `/home/lantronix/linuxsdk/linux/lib/libbzip2'
make[3]: *** [libbzip2] Error 2
make[3]: Leaving directory `/home/lantronix/linuxsdk/linux/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/lantronix/linuxsdk/linux/lib'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/lantronix/linuxsdk/linux'
make: *** [build] Error 2
答案 0 :(得分:0)
我发现敲掉-msep-data
标志(或将-mno-sep-data
放在其后)会使这些警告消失。来自GCC doc page:
生成允许数据段位于a中的代码 来自文本段的不同内存区域。这允许 在没有虚拟内存管理的环境中执行就地。 该选项意味着-fPIC。
我也发现-fPIC
或-fno-PIC
没有效果。