Lines 110-115
Link Here
|
110 |
fi |
110 |
fi |
111 |
fi |
111 |
fi |
112 |
|
112 |
|
|
|
113 |
AC_DEFUN(grub_CHECK_PIE,[ |
114 |
[# Position independent executable. |
115 |
pie_possible=yes] |
116 |
AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default]) |
117 |
# Is this a reliable test case? |
118 |
AC_LANG_CONFTEST([[ |
119 |
#ifdef __PIE__ |
120 |
int main() { |
121 |
return 0; |
122 |
} |
123 |
#else |
124 |
#error NO __PIE__ DEFINED |
125 |
#endif |
126 |
]]) |
127 |
|
128 |
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling |
129 |
# `ac_compile' like this correct, after all? |
130 |
if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then] |
131 |
AC_MSG_RESULT([yes]) |
132 |
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'? |
133 |
rm -f conftest.s |
134 |
else |
135 |
pie_possible=no] |
136 |
AC_MSG_RESULT([no]) |
137 |
[fi] |
138 |
]) |
139 |
|
140 |
# Position independent executable. |
141 |
grub_CHECK_PIE |
142 |
[# Need that, because some distributions ship compilers that include |
143 |
# `-fPIE' in the default specs. |
144 |
if [ x"$pie_possible" = xyes ]; then |
145 |
STAGE1_CFLAGS="$STAGE1_CFLAGS -nopie" |
146 |
STAGE2_CFLAGS="$STAGE2_CFLAGS -nopie" |
147 |
fi] |
148 |
|
113 |
AC_SUBST(STAGE1_CFLAGS) |
149 |
AC_SUBST(STAGE1_CFLAGS) |
114 |
AC_SUBST(STAGE2_CFLAGS) |
150 |
AC_SUBST(STAGE2_CFLAGS) |
115 |
AC_SUBST(GRUB_CFLAGS) |
151 |
AC_SUBST(GRUB_CFLAGS) |