* acinclude.m4 (grub_CHECK_PIC): New test.

* configure.ac: Add -fno-PIC to TARGET_CFLAGS if -fPIC is default.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-29 15:30:11 +01:00
parent 97304d7c53
commit 7bd8b0c776
3 changed files with 41 additions and 0 deletions

View file

@ -596,6 +596,14 @@ if [ x"$pie_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
fi]
# Position independent executable.
grub_CHECK_PIC
[# Need that, because some distributions ship compilers that include
# `-fPIC' in the default specs.
if [ x"$pic_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIC"
fi]
# Smashing stack protector.
grub_CHECK_STACK_PROTECTOR
# Need that, because some distributions ship compilers that include