Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 583042 | Differences between
and this patch

Collapse All | Expand All

(-)a/acinclude.m4 (+18 lines)
Lines 390-395 else Link Here
390
[fi]
390
[fi]
391
])
391
])
392
392
393
dnl Check if the Linker supports `-no-pie'.
394
AC_DEFUN([grub_CHECK_NO_PIE],
395
[AC_MSG_CHECKING([whether linker accepts -no-pie])
396
AC_CACHE_VAL(grub_cv_cc_ld_nopie,
397
[save_LDFLAGS="$LDFLAGS"
398
LDFLAGS="$LDFLAGS -no-pie"
399
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
400
	       [grub_cv_cc_ld_no_pie=yes],
401
	       [grub_cv_cc_ld_no_pie=no])
402
LDFLAGS="$save_LDFLAGS"
403
])
404
AC_MSG_RESULT([$grub_cv_prog_ld_no_pie])
405
nopie_possible=no
406
if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
407
  nopie_possible=yes
408
fi
409
])
410
393
dnl Check if the C compiler supports `-fPIC'.
411
dnl Check if the C compiler supports `-fPIC'.
394
AC_DEFUN([grub_CHECK_PIC],[
412
AC_DEFUN([grub_CHECK_PIC],[
395
[# Position independent executable.
413
[# Position independent executable.
(-)a/configure.ac (-1 / +6 lines)
Lines 1184-1196 CFLAGS="$TARGET_CFLAGS" Link Here
1184
1184
1185
# Position independent executable.
1185
# Position independent executable.
1186
grub_CHECK_PIE
1186
grub_CHECK_PIE
1187
grub_CHECK_NO_PIE
1187
[# Need that, because some distributions ship compilers that include
1188
[# Need that, because some distributions ship compilers that include
1188
# `-fPIE' in the default specs.
1189
# `-fPIE and -pie' in the default specs.
1189
if [ x"$pie_possible" = xyes ]; then
1190
if [ x"$pie_possible" = xyes ]; then
1190
  TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
1191
  TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
1192
fi
1193
if [ x"$nopie_possible" = xyes ] &&  [ x"$pie_possible" = xyes ]; then
1194
  TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie"
1191
fi]
1195
fi]
1192
1196
1193
CFLAGS="$TARGET_CFLAGS"
1197
CFLAGS="$TARGET_CFLAGS"
1198
LDFLAGS="$TARGET_LDFLAGS"
1194
1199
1195
# Position independent executable.
1200
# Position independent executable.
1196
grub_CHECK_PIC
1201
grub_CHECK_PIC

Return to bug 583042