Hi Olaf, On 4/5/19 12:39 PM, Olaf Hering wrote: > It seems in qemu.git#master the edk2.git submodule is now mandatory.
The EDK2 submodule was added for UEFI testing, you don't need to compile it to build/use QEMU. How did you end up compiling it? > For me it fails to compile. This is not a new error. It needs to be compiled > with -fPIC since essentially forever. > > But I wonder, why does it fail to compile only for me?! > Example of failure: > > $ grep -h CommonLib.o /dev/shm/*/.build.log > [ 85s] gcc -c -I .. -I ../Include/Common -I ../Include/ -I > ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD > -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations > -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -g -O2 > CommonLib.c -o CommonLib.o > [ 89s] ar crs ../libs/libCommon.a BasePeCoff.o BinderFuncs.o CommonLib.o > Crc32.o Decompress.o EfiCompress.o EfiUtilityMsgs.o FirmwareVolumeBuffer.o > FvLib.o MemoryFile.o MyAlloc.o OsPath.o ParseGuidedSectionTools.o ParseInf.o > PeCoffLoaderEx.o SimpleFileParsing.o StringFuncs.o TianoCompress.o > PcdValueCommon.o > [ 106s] > /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: > ../libs/libCommon.a(CommonLib.o): relocation R_X86_64_32 against > `.rodata.str1.1' can not be used when making a PIE object; recompile with > -fPIC > [ 106s] > /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: > ../libs/libCommon.a(CommonLib.o): relocation R_X86_64_32 against > `.rodata.str1.1' can not be used when making a PIE object; recompile with > -fPIC > [ 120s] > /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: > ../libs/libCommon.a(CommonLib.o): relocation R_X86_64_32 against > `.rodata.str1.1' can not be used when making a PIE object; recompile with > -fPIC > > What do I need to change in my setup so that -fPIC is not required? Apparently your Linux distribution has transitioned to enabling PIE by default in GCC 7, see: https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html "This is achieved by a gcc defaults override in the "gcc-PIE" package." Regards, Phil.
signature.asc
Description: OpenPGP digital signature
