
Howdy, After a bit of debugging, I was able to isolate some build failures we have, like the following:
rpm: error while loading shared libraries: /lib/libselinux.so.1: unexpected reloc type 0x03
At least one major difference I can see in compiling between an icecream gcc invocation and a native gcc invocation is the following:
toonie:/home/abuild/rpmbuild/BUILD/libselinux-2.1.9/src> gcc -O2 -g -march=armv7-a -mfloat-abi=hard -mthumb -mabi=aapcs-linux -I../include -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DSHARED -c -o enabled.lo enabled.c enabled.c: In function 'is_selinux_enabled': enabled.c:34:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] enabled.c: In function 'is_selinux_mls_enabled': enabled.c:69:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] toonie:/home/abuild/rpmbuild/BUILD/libselinux-2.1.9/src> /usr/bin/gcc -O2 -g -march=armv7-a -mfloat-abi=hard -mthumb -mabi=aapcs-linux -I../include -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DSHARED -c -o enabled.lo enabled.c
So for some reason gcc doesn't seem to believe our linker knows what hidden attributes are. Weird, eh? So let's check out the gcc armv7l icecream build log:
checking for armv7l-suse-linux-gnueabi-as... no checking what assembler to use... checking for armv7l-suse-linux-gnueabi-ld... no basename: missing operand Try 'basename --help' for more information. checking whether we are using gold... no checking what linker to use... checking for armv7l-suse-linux-gnueabi-nm... no checking what nm to use... checking for armv7l-suse-linux-gnueabi-objdump... no checking what objdump to use... not found checking for readelf... /usr/bin/readelf checking what readelf to use... /usr/bin/readelf checking assembler flags... checking assembler for .balign and .p2align... no checking assembler for .p2align with maximum skip... no checking assembler for .literal16... no checking assembler for working .subsection -1... no checking assembler for .weak... no checking assembler for .weakref... no checking assembler for .nsubspa comdat... no checking assembler for .hidden... no checking linker for .hidden support... no checking linker read-only and read-write section mixing... unknown
Huh? It really doesn't know what its linker should be, so it isn't able to figure out its features, thus disables them internally. But why? Well, let's see what the s390 build has to say:
checking what assembler to use... /usr/s390x-suse-linux/bin/as checking whether we are using gold... no checking what linker to use... /usr/s390x-suse-linux/bin/ld checking what nm to use... /usr/s390x-suse-linux/bin/nm checking what objdump to use... /usr/s390x-suse-linux/bin/objdump checking for readelf... /usr/bin/readelf checking what readelf to use... /usr/bin/readelf checking assembler flags... checking assembler for .balign and .p2align... yes checking assembler for .p2align with maximum skip... yes checking assembler for .literal16... no checking assembler for working .subsection -1... yes checking assembler for .weak... yes checking assembler for .weakref... yes checking assembler for .nsubspa comdat... no checking assembler for .hidden... yes checking linker for .hidden support... yes checking linker read-only and read-write section mixing... read-write
Funny. The s390x target finds its cross binutils in /usr/s390x-suse-linux/. Why don't we find ours for armv7l then? Maybe it's because we don't have cross-armv7l-binutils that store something in /usr/armv7l-suse-linux/, but instead we have cross-arm-binutils that have their stuff in /usr/arm-suse-linux/? How does gcc's configure know where to search for the cross binutils? I'm fairly sure we're doing something pretty wrong there today :) Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org