1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/i386.
4 # CET is only supported for x86-64.
5 if test $enable_cet != no; then
6 as_fn_error $? "\"CET is only supported on x86_64 or x32\"" "$LINENO" 5
9 # We no longer support i386 since it lacks the atomic instructions
10 # required to implement NPTL threading.
11 if test "$config_machine" = i386; then
13 *** ERROR: Support for i386 is deprecated.
14 *** Please use host i786, i686, i585 or i486.
15 *** For example: /src/glibc/configure --host=i686-pc-linux-gnu ...\"" "$LINENO" 5
18 # The GNU C Library can't be built for i386. There are several reasons for
19 # this restriction. The primary reason is that i386 lacks the atomic
20 # operations required to support the current NPTL implementation. While it is
21 # possible that such atomic operations could be emulated in the kernel to date
22 # no such work has been done to enable this. Even with NPTL disabled you still
23 # have no atomic.h implementation. Given the declining use of i386 we disable
24 # support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly
25 # check for i386, instead we make sure the compiler has support for inlining
26 # the builtin __sync_val_compare_and_swap. If it does then we should have no
27 # problem building for i386.
28 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler support of inlined builtin function __sync_val_compare_and_swap" >&5
29 printf %s "checking for compiler support of inlined builtin function __sync_val_compare_and_swap... " >&6; }
30 libc_compiler_builtin_inlined=no
31 cat > conftest.c <<EOF
32 int _start (void) { int a, b, c; __sync_val_compare_and_swap (&a, b, c); return 0; }
34 if ! { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
35 -O0 -nostdlib -nostartfiles
36 -S conftest.c -o - | grep -F "__sync_val_compare_and_swap"
38 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
41 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42 test $ac_status = 0; }; }
44 libc_compiler_builtin_inlined=yes
47 if test $libc_compiler_builtin_inlined = yes; then
48 libc_cv_unsupported_i386=no
51 *** Building with -march=i386/-mcpu=i386 is not supported.
52 *** Please use host i786, i686, i586, or i486.
53 *** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ..." "$LINENO" 5
55 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_compiler_builtin_inlined" >&5
56 printf "%s\n" "$libc_compiler_builtin_inlined" >&6; }
58 if test "$static_pie" = yes; then
59 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker static PIE support" >&5
60 printf %s "checking for linker static PIE support... " >&6; }
61 if test ${libc_cv_ld_static_pie+y}
63 printf %s "(cached) " >&6
65 cat > conftest.s <<\EOF
69 movl _start@GOT(%ebx), %eax
71 libc_cv_pie_option="-Wl,-pie"
72 libc_cv_ld_static_pie=no
73 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostartfiles -nostdlib $no_ssp $libc_cv_pie_option -o conftest conftest.s 1>&5'
74 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
77 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
78 test $ac_status = 0; }; }; then
79 if $READELF -r conftest | grep 'There are no relocations in this file.' > /dev/null; then
80 libc_cv_ld_static_pie=yes
85 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_static_pie" >&5
86 printf "%s\n" "$libc_cv_ld_static_pie" >&6; }
87 if test "$libc_cv_ld_static_pie" != yes; then
88 as_fn_error $? "linker support for static PIE needed" "$LINENO" 5
92 if test x"$multi_arch" != xno; then
93 printf "%s\n" "#define NO_HIDDEN_EXTERN_FUNC_IN_PIE 1" >>confdefs.h