Lines 114-119
Link Here
|
114 |
if test "x$grub_cv_cc_no_stack_protector" = xyes; then |
114 |
if test "x$grub_cv_cc_no_stack_protector" = xyes; then |
115 |
STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector" |
115 |
STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector" |
116 |
fi |
116 |
fi |
|
|
117 |
# GCC >= 3.3 supports -fno-reorder-functions; this defends us against |
118 |
# unlikely-to-be-executed functions being linked before _start with GCC |
119 |
# >= 4.6. |
120 |
AC_CACHE_CHECK([whether gcc has -fno-reorder-functions], |
121 |
no_reorder_functions_flag, [ |
122 |
saved_CFLAGS=$CFLAGS |
123 |
CFLAGS="-fno-reorder-functions" |
124 |
AC_TRY_COMPILE(, |
125 |
, |
126 |
no_reorder_functions_flag=yes, |
127 |
no_reorder_functions_flag=no) |
128 |
CFLAGS=$saved_CFLAGS |
129 |
]) |
130 |
if test "x$no_reorder_functions_flag" = xyes; then |
131 |
STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-reorder-functions" |
132 |
fi |
117 |
fi |
133 |
fi |
118 |
fi |
134 |
fi |
119 |
|
135 |
|