]>
Commit | Line | Data |
---|---|---|
f6130a12 | 1 | dnl Check whether target compiler is working |
2 | AC_DEFUN(grub_PROG_TARGET_CC, | |
3 | [AC_MSG_CHECKING([whether target compiler is working]) | |
4 | AC_CACHE_VAL(grub_cv_prog_target_cc, | |
5 | [AC_TRY_LINK([], [], | |
6 | grub_cv_prog_target_cc=yes, | |
7 | grub_cv_prog_target_cc=no) | |
8 | ]) | |
9 | AC_MSG_RESULT([$grub_cv_prog_target_cc]) | |
10 | ||
11 | if test "x$grub_cv_prog_target_cc" = xno; then | |
12 | AC_MSG_ERROR([cannot compile for the target]) | |
13 | fi | |
14 | ]) | |
15 | ||
16 | ||
4b13b216 | 17 | dnl grub_ASM_USCORE checks if C symbols get an underscore after |
6a161fa9 | 18 | dnl compiling to assembler. |
19 | dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by | |
20 | dnl Erich Boleyn and modified by Yoshinori K. Okuji. | |
4b13b216 | 21 | AC_DEFUN(grub_ASM_USCORE, |
6a161fa9 | 22 | [AC_REQUIRE([AC_PROG_CC]) |
23 | AC_MSG_CHECKING([if C symbols get an underscore after compilation]) | |
4b13b216 | 24 | AC_CACHE_VAL(grub_cv_asm_uscore, |
6a161fa9 | 25 | [cat > conftest.c <<\EOF |
26 | int | |
27 | func (int *list) | |
28 | { | |
29 | *list = 0; | |
30 | return *list; | |
31 | } | |
32 | EOF | |
33 | ||
34 | if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -S conftest.c]) && test -s conftest.s; then | |
35 | true | |
36 | else | |
37 | AC_MSG_ERROR([${CC-cc} failed to produce assembly code]) | |
38 | fi | |
39 | ||
40 | if grep _func conftest.s >/dev/null 2>&1; then | |
4b13b216 | 41 | grub_cv_asm_uscore=yes |
6a161fa9 | 42 | else |
4b13b216 | 43 | grub_cv_asm_uscore=no |
6a161fa9 | 44 | fi |
45 | ||
46 | rm -f conftest*]) | |
47 | ||
4b13b216 | 48 | if test "x$grub_cv_asm_uscore" = xyes; then |
49 | AC_DEFINE_UNQUOTED([HAVE_ASM_USCORE], $grub_cv_asm_uscore, | |
6a161fa9 | 50 | [Define if C symbols get an underscore after compilation]) |
51 | fi | |
52 | ||
4b13b216 | 53 | AC_MSG_RESULT([$grub_cv_asm_uscore]) |
6a161fa9 | 54 | ]) |
55 | ||
56 | ||
57 | dnl Some versions of `objcopy -O binary' vary their output depending | |
58 | dnl on the link address. | |
4b13b216 | 59 | AC_DEFUN(grub_PROG_OBJCOPY_ABSOLUTE, |
6a161fa9 | 60 | [AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses]) |
4b13b216 | 61 | AC_CACHE_VAL(grub_cv_prog_objcopy_absolute, |
6a161fa9 | 62 | [cat > conftest.c <<\EOF |
63 | void | |
64 | cmain (void) | |
65 | { | |
66 | *((int *) 0x1000) = 2; | |
67 | } | |
68 | EOF | |
69 | ||
70 | if AC_TRY_EVAL(ac_compile) && test -s conftest.o; then : | |
71 | else | |
72 | AC_MSG_ERROR([${CC-cc} cannot compile C source code]) | |
73 | fi | |
4b13b216 | 74 | grub_cv_prog_objcopy_absolute=yes |
6a161fa9 | 75 | for link_addr in 2000 8000 7C00; do |
2a8a80e4 | 76 | if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then : |
6a161fa9 | 77 | else |
78 | AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) | |
79 | fi | |
1977517d | 80 | if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then : |
6a161fa9 | 81 | else |
82 | AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files]) | |
83 | fi | |
84 | if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]); then | |
85 | mv -f conftest conftest.old | |
86 | else | |
4b13b216 | 87 | grub_cv_prog_objcopy_absolute=no |
6a161fa9 | 88 | break |
89 | fi | |
90 | done | |
91 | rm -f conftest*]) | |
4b13b216 | 92 | AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute]) |
6a161fa9 | 93 | |
4b13b216 | 94 | if test "x$grub_cv_prog_objcopy_absolute" = xno; then |
95 | AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils]) | |
6a161fa9 | 96 | fi |
97 | ]) | |
98 | ||
99 | ||
cb71ba20 | 100 | dnl Supply --build-id=none to ld if building modules. |
101 | dnl This suppresses warnings from ld on some systems | |
102 | AC_DEFUN(grub_PROG_LD_BUILD_ID_NONE, | |
103 | [AC_MSG_CHECKING([whether linker accepts --build-id=none]) | |
104 | AC_CACHE_VAL(grub_cv_prog_ld_build_id_none, | |
105 | [save_LDFLAGS="$LDFLAGS" | |
106 | LDFLAGS="$LDFLAGS -Wl,--build-id=none" | |
107 | AC_TRY_LINK([], [], | |
108 | grub_cv_prog_ld_build_id_none=yes, | |
109 | grub_cv_prog_ld_build_id_none=no) | |
110 | LDFLAGS="$save_LDFLAGS" | |
111 | ]) | |
112 | AC_MSG_RESULT([$grub_cv_prog_ld_build_id_none]) | |
113 | ||
114 | if test "x$grub_cv_prog_ld_build_id_none" = xyes; then | |
115 | MODULE_LDFLAGS="$MODULE_LDFLAGS -Wl,--build-id=none" | |
116 | fi | |
117 | ]) | |
118 | ||
119 | ||
6a161fa9 | 120 | dnl Mass confusion! |
121 | dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit | |
122 | dnl instructions, but implicitly insert addr32 and data32 bytes so | |
123 | dnl that the code works in real mode''. | |
124 | dnl | |
125 | dnl Newer versions of GAS interpret `.code16' to mean ``generate 16-bit | |
126 | dnl instructions,'' which seems right. This requires the programmer | |
127 | dnl to explicitly insert addr32 and data32 instructions when they want | |
128 | dnl them. | |
129 | dnl | |
130 | dnl We only support the newer versions, because the old versions cause | |
131 | dnl major pain, by requiring manual assembly to get 16-bit instructions into | |
132 | dnl asm files. | |
4b13b216 | 133 | AC_DEFUN(grub_I386_ASM_ADDR32, |
6a161fa9 | 134 | [AC_REQUIRE([AC_PROG_CC]) |
4b13b216 | 135 | AC_REQUIRE([grub_I386_ASM_PREFIX_REQUIREMENT]) |
6a161fa9 | 136 | AC_MSG_CHECKING([for .code16 addr32 assembler support]) |
4b13b216 | 137 | AC_CACHE_VAL(grub_cv_i386_asm_addr32, |
6a161fa9 | 138 | [cat > conftest.s.in <<\EOF |
139 | .code16 | |
140 | l1: @ADDR32@ movb %al, l1 | |
141 | EOF | |
142 | ||
4b13b216 | 143 | if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then |
6a161fa9 | 144 | sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s |
145 | else | |
146 | sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s | |
147 | fi | |
148 | ||
149 | if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then | |
4b13b216 | 150 | grub_cv_i386_asm_addr32=yes |
6a161fa9 | 151 | else |
4b13b216 | 152 | grub_cv_i386_asm_addr32=no |
6a161fa9 | 153 | fi |
154 | ||
155 | rm -f conftest*]) | |
156 | ||
4b13b216 | 157 | AC_MSG_RESULT([$grub_cv_i386_asm_addr32])]) |
6a161fa9 | 158 | |
159 | ||
160 | dnl Later versions of GAS requires that addr32 and data32 prefixes | |
161 | dnl appear in the same lines as the instructions they modify, while | |
162 | dnl earlier versions requires that they appear in separate lines. | |
4b13b216 | 163 | AC_DEFUN(grub_I386_ASM_PREFIX_REQUIREMENT, |
6a161fa9 | 164 | [AC_REQUIRE([AC_PROG_CC]) |
165 | AC_MSG_CHECKING(dnl | |
166 | [whether addr32 must be in the same line as the instruction]) | |
4b13b216 | 167 | AC_CACHE_VAL(grub_cv_i386_asm_prefix_requirement, |
6a161fa9 | 168 | [cat > conftest.s <<\EOF |
169 | .code16 | |
170 | l1: addr32 movb %al, l1 | |
171 | EOF | |
172 | ||
173 | if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then | |
4b13b216 | 174 | grub_cv_i386_asm_prefix_requirement=yes |
6a161fa9 | 175 | else |
4b13b216 | 176 | grub_cv_i386_asm_prefix_requirement=no |
6a161fa9 | 177 | fi |
178 | ||
179 | rm -f conftest*]) | |
180 | ||
4b13b216 | 181 | if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then |
182 | grub_tmp_addr32="addr32" | |
183 | grub_tmp_data32="data32" | |
6a161fa9 | 184 | else |
4b13b216 | 185 | grub_tmp_addr32="addr32;" |
186 | grub_tmp_data32="data32;" | |
6a161fa9 | 187 | fi |
188 | ||
4b13b216 | 189 | AC_DEFINE_UNQUOTED([ADDR32], $grub_tmp_addr32, |
6a161fa9 | 190 | [Define it to \"addr32\" or \"addr32;\" to make GAS happy]) |
4b13b216 | 191 | AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32, |
6a161fa9 | 192 | [Define it to \"data32\" or \"data32;\" to make GAS happy]) |
193 | ||
4b13b216 | 194 | AC_MSG_RESULT([$grub_cv_i386_asm_prefix_requirement])]) |
6a161fa9 | 195 | |
196 | ||
197 | dnl Older versions of GAS require that absolute indirect calls/jumps are | |
198 | dnl not prefixed with `*', while later versions warn if not prefixed. | |
4b13b216 | 199 | AC_DEFUN(grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK, |
6a161fa9 | 200 | [AC_REQUIRE([AC_PROG_CC]) |
201 | AC_MSG_CHECKING(dnl | |
202 | [whether an absolute indirect call/jump must not be prefixed with an asterisk]) | |
4b13b216 | 203 | AC_CACHE_VAL(grub_cv_i386_asm_absolute_without_asterisk, |
6a161fa9 | 204 | [cat > conftest.s <<\EOF |
205 | lcall *(offset) | |
206 | offset: | |
207 | .long 0 | |
208 | .word 0 | |
209 | EOF | |
210 | ||
211 | if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then | |
4b13b216 | 212 | grub_cv_i386_asm_absolute_without_asterisk=no |
6a161fa9 | 213 | else |
4b13b216 | 214 | grub_cv_i386_asm_absolute_without_asterisk=yes |
6a161fa9 | 215 | fi |
216 | ||
217 | rm -f conftest*]) | |
218 | ||
4b13b216 | 219 | if test "x$grub_cv_i386_asm_absolute_without_asterisk" = xyes; then |
6a161fa9 | 220 | AC_DEFINE([ABSOLUTE_WITHOUT_ASTERISK], 1, |
221 | [Define it if GAS requires that absolute indirect calls/jumps are not prefixed with an asterisk]) | |
222 | fi | |
223 | ||
4b13b216 | 224 | AC_MSG_RESULT([$grub_cv_i386_asm_absolute_without_asterisk])]) |
6a161fa9 | 225 | |
226 | ||
227 | dnl Check what symbol is defined as a start symbol. | |
228 | dnl Written by Yoshinori K. Okuji. | |
4b13b216 | 229 | AC_DEFUN(grub_CHECK_START_SYMBOL, |
6a161fa9 | 230 | [AC_REQUIRE([AC_PROG_CC]) |
231 | AC_MSG_CHECKING([if start is defined by the compiler]) | |
4b13b216 | 232 | AC_CACHE_VAL(grub_cv_check_start_symbol, |
6a161fa9 | 233 | [AC_TRY_LINK([], [asm ("incl start")], |
4b13b216 | 234 | grub_cv_check_start_symbol=yes, |
235 | grub_cv_check_start_symbol=no)]) | |
6a161fa9 | 236 | |
4b13b216 | 237 | AC_MSG_RESULT([$grub_cv_check_start_symbol]) |
6a161fa9 | 238 | |
239 | AC_MSG_CHECKING([if _start is defined by the compiler]) | |
4b13b216 | 240 | AC_CACHE_VAL(grub_cv_check_uscore_start_symbol, |
6a161fa9 | 241 | [AC_TRY_LINK([], [asm ("incl _start")], |
4b13b216 | 242 | grub_cv_check_uscore_start_symbol=yes, |
243 | grub_cv_check_uscore_start_symbol=no)]) | |
6a161fa9 | 244 | |
4b13b216 | 245 | AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol]) |
6a161fa9 | 246 | |
247 | AH_TEMPLATE([START_SYMBOL], [Define it to either start or _start]) | |
248 | ||
4b13b216 | 249 | if test "x$grub_cv_check_start_symbol" = xyes; then |
6a161fa9 | 250 | AC_DEFINE([START_SYMBOL], [start]) |
4b13b216 | 251 | elif test "x$grub_cv_check_uscore_start_symbol" = xyes; then |
6a161fa9 | 252 | AC_DEFINE([START_SYMBOL], [_start]) |
253 | else | |
254 | AC_MSG_ERROR([neither start nor _start is defined]) | |
255 | fi | |
256 | ]) | |
257 | ||
258 | dnl Check what symbol is defined as a bss start symbol. | |
259 | dnl Written by Michael Hohmoth and Yoshinori K. Okuji. | |
4b13b216 | 260 | AC_DEFUN(grub_CHECK_BSS_START_SYMBOL, |
6a161fa9 | 261 | [AC_REQUIRE([AC_PROG_CC]) |
262 | AC_MSG_CHECKING([if __bss_start is defined by the compiler]) | |
4b13b216 | 263 | AC_CACHE_VAL(grub_cv_check_uscore_uscore_bss_start_symbol, |
6a161fa9 | 264 | [AC_TRY_LINK([], [asm ("incl __bss_start")], |
4b13b216 | 265 | grub_cv_check_uscore_uscore_bss_start_symbol=yes, |
266 | grub_cv_check_uscore_uscore_bss_start_symbol=no)]) | |
6a161fa9 | 267 | |
4b13b216 | 268 | AC_MSG_RESULT([$grub_cv_check_uscore_uscore_bss_start_symbol]) |
6a161fa9 | 269 | |
270 | AC_MSG_CHECKING([if edata is defined by the compiler]) | |
4b13b216 | 271 | AC_CACHE_VAL(grub_cv_check_edata_symbol, |
6a161fa9 | 272 | [AC_TRY_LINK([], [asm ("incl edata")], |
4b13b216 | 273 | grub_cv_check_edata_symbol=yes, |
274 | grub_cv_check_edata_symbol=no)]) | |
6a161fa9 | 275 | |
4b13b216 | 276 | AC_MSG_RESULT([$grub_cv_check_edata_symbol]) |
6a161fa9 | 277 | |
278 | AC_MSG_CHECKING([if _edata is defined by the compiler]) | |
4b13b216 | 279 | AC_CACHE_VAL(grub_cv_check_uscore_edata_symbol, |
6a161fa9 | 280 | [AC_TRY_LINK([], [asm ("incl _edata")], |
4b13b216 | 281 | grub_cv_check_uscore_edata_symbol=yes, |
282 | grub_cv_check_uscore_edata_symbol=no)]) | |
6a161fa9 | 283 | |
4b13b216 | 284 | AC_MSG_RESULT([$grub_cv_check_uscore_edata_symbol]) |
6a161fa9 | 285 | |
286 | AH_TEMPLATE([BSS_START_SYMBOL], [Define it to one of __bss_start, edata and _edata]) | |
287 | ||
4b13b216 | 288 | if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then |
6a161fa9 | 289 | AC_DEFINE([BSS_START_SYMBOL], [__bss_start]) |
4b13b216 | 290 | elif test "x$grub_cv_check_edata_symbol" = xyes; then |
6a161fa9 | 291 | AC_DEFINE([BSS_START_SYMBOL], [edata]) |
4b13b216 | 292 | elif test "x$grub_cv_check_uscore_edata_symbol" = xyes; then |
6a161fa9 | 293 | AC_DEFINE([BSS_START_SYMBOL], [_edata]) |
294 | else | |
295 | AC_MSG_ERROR([none of __bss_start, edata or _edata is defined]) | |
296 | fi | |
297 | ]) | |
298 | ||
299 | dnl Check what symbol is defined as an end symbol. | |
300 | dnl Written by Yoshinori K. Okuji. | |
4b13b216 | 301 | AC_DEFUN(grub_CHECK_END_SYMBOL, |
6a161fa9 | 302 | [AC_REQUIRE([AC_PROG_CC]) |
303 | AC_MSG_CHECKING([if end is defined by the compiler]) | |
4b13b216 | 304 | AC_CACHE_VAL(grub_cv_check_end_symbol, |
6a161fa9 | 305 | [AC_TRY_LINK([], [asm ("incl end")], |
4b13b216 | 306 | grub_cv_check_end_symbol=yes, |
307 | grub_cv_check_end_symbol=no)]) | |
6a161fa9 | 308 | |
4b13b216 | 309 | AC_MSG_RESULT([$grub_cv_check_end_symbol]) |
6a161fa9 | 310 | |
311 | AC_MSG_CHECKING([if _end is defined by the compiler]) | |
4b13b216 | 312 | AC_CACHE_VAL(grub_cv_check_uscore_end_symbol, |
6a161fa9 | 313 | [AC_TRY_LINK([], [asm ("incl _end")], |
4b13b216 | 314 | grub_cv_check_uscore_end_symbol=yes, |
315 | grub_cv_check_uscore_end_symbol=no)]) | |
6a161fa9 | 316 | |
4b13b216 | 317 | AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol]) |
6a161fa9 | 318 | |
319 | AH_TEMPLATE([END_SYMBOL], [Define it to either end or _end]) | |
320 | ||
4b13b216 | 321 | if test "x$grub_cv_check_end_symbol" = xyes; then |
6a161fa9 | 322 | AC_DEFINE([END_SYMBOL], [end]) |
4b13b216 | 323 | elif test "x$grub_cv_check_uscore_end_symbol" = xyes; then |
6a161fa9 | 324 | AC_DEFINE([END_SYMBOL], [_end]) |
325 | else | |
326 | AC_MSG_ERROR([neither end nor _end is defined]) | |
327 | fi | |
328 | ]) | |
5aded270 | 329 | |
330 | dnl Check if the C compiler has a bug while using nested functions when | |
331 | dnl mregparm is used on the i386. Some gcc versions do not pass the third | |
332 | dnl parameter correctly to the nested function. | |
333 | dnl Written by Marco Gerards. | |
4b13b216 | 334 | AC_DEFUN(grub_I386_CHECK_REGPARM_BUG, |
5aded270 | 335 | [AC_REQUIRE([AC_PROG_CC]) |
336 | AC_MSG_CHECKING([if GCC has the regparm=3 bug]) | |
4b13b216 | 337 | AC_CACHE_VAL(grub_cv_i386_check_nested_functions, |
5aded270 | 338 | [AC_RUN_IFELSE([AC_LANG_SOURCE( |
e9c6f39b | 339 | [[ |
340 | static int | |
341 | test (int *n) | |
342 | { | |
343 | return *n == -1; | |
344 | } | |
5aded270 | 345 | |
e9c6f39b | 346 | static int |
347 | testfunc (int __attribute__ ((__regparm__ (3))) (*hook) (int a, int b, int *c)) | |
5aded270 | 348 | { |
e9c6f39b | 349 | int a = 0; |
350 | int b = 0; | |
351 | int c = -1; | |
352 | return hook (a, b, &c); | |
353 | } | |
5aded270 | 354 | |
e9c6f39b | 355 | int |
356 | main (void) | |
357 | { | |
358 | int __attribute__ ((__regparm__ (3))) nestedfunc (int a, int b, int *c) | |
5aded270 | 359 | { |
e9c6f39b | 360 | return a == b && test (c); |
5aded270 | 361 | } |
e9c6f39b | 362 | return testfunc (nestedfunc) ? 0 : 1; |
5aded270 | 363 | } |
364 | ]])], | |
e9c6f39b | 365 | [grub_cv_i386_check_nested_functions=no], |
366 | [grub_cv_i386_check_nested_functions=yes])]) | |
5aded270 | 367 | |
4b13b216 | 368 | AC_MSG_RESULT([$grub_cv_i386_check_nested_functions]) |
5aded270 | 369 | |
4b13b216 | 370 | if test "x$grub_cv_i386_check_nested_functions" = xyes; then |
5aded270 | 371 | AC_DEFINE([NESTED_FUNC_ATTR], |
c004e1b4 | 372 | [__attribute__ ((__regparm__ (1)))], |
5aded270 | 373 | [Catch gcc bug]) |
374 | else | |
e9c6f39b | 375 | dnl Unfortunately, the above test does not detect a bug in gcc-4.0. |
376 | dnl So use regparm 2 until a better test is found. | |
377 | AC_DEFINE([NESTED_FUNC_ATTR], | |
c004e1b4 | 378 | [__attribute__ ((__regparm__ (1)))], |
e9c6f39b | 379 | [Catch gcc bug]) |
5aded270 | 380 | fi |
381 | ]) | |
baa2a121 | 382 | \f |
383 | dnl Check if the C compiler supports `-fstack-protector'. | |
384 | AC_DEFUN(grub_CHECK_STACK_PROTECTOR,[ | |
385 | [# Smashing stack protector. | |
386 | ssp_possible=yes] | |
387 | AC_MSG_CHECKING([whether `$CC' accepts `-fstack-protector']) | |
388 | # Is this a reliable test case? | |
389 | AC_LANG_CONFTEST([[void foo (void) { volatile char a[8]; a[3]; }]]) | |
390 | [# `$CC -c -o ...' might not be portable. But, oh, well... Is calling | |
391 | # `ac_compile' like this correct, after all? | |
392 | if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then] | |
393 | AC_MSG_RESULT([yes]) | |
394 | [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'? | |
395 | rm -f conftest.s | |
396 | else | |
397 | ssp_possible=no] | |
398 | AC_MSG_RESULT([no]) | |
399 | [fi] | |
400 | ]) | |
2a8a80e4 | 401 | |
402 | dnl Check if the C compiler supports `-mstack-arg-probe' (Cygwin). | |
403 | AC_DEFUN(grub_CHECK_STACK_ARG_PROBE,[ | |
404 | [# Smashing stack arg probe. | |
405 | sap_possible=yes] | |
406 | AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe']) | |
407 | AC_LANG_CONFTEST([[void foo (void) { volatile char a[8]; a[3]; }]]) | |
408 | [if eval "$ac_compile -S -mstack-arg-probe -o conftest.s" 2> /dev/null; then] | |
409 | AC_MSG_RESULT([yes]) | |
410 | [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'? | |
411 | rm -f conftest.s | |
412 | else | |
413 | sap_possible=no] | |
414 | AC_MSG_RESULT([no]) | |
415 | [fi] | |
416 | ]) |