]> xenbits.xensource.com Git - libvirt.git/commit
maint: extend PIE support check
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 9 May 2015 16:06:36 +0000 (19:06 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 11 May 2015 17:08:47 +0000 (20:08 +0300)
commit97e70a593589e8f0432a748b4b93c3cdc18b9e5a
treed10e658f0924f2635c008213fa4dd39681fda7e6
parent846cc14c4d38169936a7165c4a4cb77b84d53bf6
maint: extend PIE support check

GCC installed from FreeBSD ports doesn't support building PIE executables
and fails with:

/usr/local/bin/ld: /usr/lib/crt1.o: relocation R_X86_64_32 against
`_DYNAMIC' can not be used when making a shared object; recompile with
-fPIC
/usr/lib/crt1.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

However, the configure check for '-fPIC -DPIC' doesn't catch that. In
order to catch this case, add '-pie' to CFLAGS in m4/virt-compile-pie.m4
so it could detect lack of PIE support on configure time and don't fail
the build.
m4/virt-compile-pie.m4