4

I've been trying to compile ucLinux with libCurl included, but any time I include curl in the config it barfs when trying to compile libbzip2.

I'm cross compiling this for the coldfire 68K processors.

It says that a relocation type isn't supported for PIC, but I have no idea how to resolve this. I was under the impression that all the libraries needed to be compiled as PIC anyway.

Here is the output:

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
MechaMarinara
  • 612
  • 1
  • 7
  • 21

1 Answers1

0

I found that knocking out the -msep-data flag (or putting -mno-sep-data after it) makes these warnings go away. From the GCC doc page:

Generate code that allows the data segment to be located in a different area of memory from the text segment. This allows for execute-in-place in an environment without virtual memory management. This option implies -fPIC.

I found, too, that -fPIC or -fno-PIC had no effect.

JimB
  • 889
  • 8
  • 18