aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure309
1 files changed, 307 insertions, 2 deletions
diff --git a/configure b/configure
index 7cda641..180e49d 100755
--- a/configure
+++ b/configure
@@ -649,6 +649,8 @@ have_selinux
have_libcap
have_libaudit
LIBGD
+libc_cv_test_cc_wmissing_parameter_name
+libc_cv_test_cc_wfree_labels
libc_cv_test_cc_wimplicit_fallthrough
libc_cv_cc_loop_to_function
libc_cv_test_cc_signaling_nans
@@ -690,6 +692,7 @@ MAKEINFO
MSGFMT
MAKE
LD
+STRIP
NM
OBJDUMP
READELF
@@ -820,6 +823,7 @@ enable_mathvec
enable_cet
enable_scv
enable_fortify_source
+enable_sframe
with_cpu
'
ac_precious_vars='build_alias
@@ -1505,6 +1509,7 @@ Optional Features:
Use -D_FORTIFY_SOURCE=[1|2|3] to control code
hardening, defaults to highest possible value
supported by the build compiler.
+ --enable-sframe Enable building with SFrame support [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -4883,6 +4888,16 @@ case "$enable_fortify_source" in
*) as_fn_error $? "Not a valid argument for --enable-fortify-source: \"$enable_fortify_source\"" "$LINENO" 5;;
esac
+# Check whether --enable-sframe was given.
+if test ${enable_sframe+y}
+then :
+ enableval=$enable_sframe; use_sframe=$enableval
+else case e in #(
+ e) use_sframe=no ;;
+esac
+fi
+
+
# We keep the original values in `$config_*' and never modify them, so we
# can write them unchanged into config.make. Everything else uses
# $machine, $vendor, and $os, and changes them whenever convenient.
@@ -4929,6 +4944,9 @@ with_fp_cond=1
# A preconfigure script may define another name to TLS descriptor variant
mtls_descriptor=gnu2
+# A preconfigure script may define another name to traditional TLS variant
+mtls_traditional=gnu
+
if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5
@@ -5122,9 +5140,13 @@ if test -z "$NM"; then
NM=`$CC -print-prog-name=nm`
fi
+if test -z "$STRIP"; then
+ STRIP=`$CC -print-prog-name=strip`
+fi
+
-# Accept binutils 2.25 or newer.
+# Accept binutils 2.39 or newer.
libc_cv_with_lld=no
case $($LD --version) in
"GNU gold"*)
@@ -5330,7 +5352,7 @@ printf %s "checking version of $LD... " >&6; }
ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
+ 2.[1-9][0-9][0-9]*|2.39*|2.[4-9][0-9]*|[3-9].*|[1-9][0-9]*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
@@ -7488,6 +7510,41 @@ rm -f conftest*
config_vars="$config_vars
have-test-mtls-descriptor = $libc_cv_test_mtls_descriptor"
+
+cat > conftest.c <<EOF
+$conftest_code
+EOF
+
+saved_CC="$CC"
+CC="$TEST_CC"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for traditional tls support in testing" >&5
+printf %s "checking for traditional tls support in testing... " >&6; }
+if test ${libc_cv_test_mtls_traditional+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=$mtls_traditional -nostdlib -nostartfiles -shared conftest.c -o conftest 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+ libc_cv_test_mtls_traditional=$mtls_traditional
+ else
+ libc_cv_test_mtls_traditional=no
+ fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_mtls_traditional" >&5
+printf "%s\n" "$libc_cv_test_mtls_traditional" >&6; }
+
+CC="$saved_CC"
+
+rm -f conftest*
+config_vars="$config_vars
+have-test-mtls-traditional = $libc_cv_test_mtls_traditional"
+
conftest_code="
void __foo (void)
{
@@ -7968,6 +8025,126 @@ config_vars="$config_vars
cc-option-wimplicit-fallthrough = $libc_cv_cc_wimplicit_fallthrough"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wfree-labels" >&5
+printf %s "checking for -Wfree-labels... " >&6; }
+if test ${libc_cv_cc_wfree_labels+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} -Werror -Wfree-labels -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ libc_cv_cc_wfree_labels=-Wfree-labels
+else case e in #(
+ e) libc_cv_cc_wfree_labels= ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_wfree_labels" >&5
+printf "%s\n" "$libc_cv_cc_wfree_labels" >&6; }
+if test "$TEST_CC" = "$CC"; then
+ libc_cv_test_cc_wfree_labels=$libc_cv_cc_wfree_labels
+else
+
+saved_CC="$CC"
+CC="$TEST_CC"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wfree-labels in testing" >&5
+printf %s "checking for -Wfree-labels in testing... " >&6; }
+if test ${libc_cv_test_cc_wfree_labels+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} -Werror -Wfree-labels -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ libc_cv_test_cc_wfree_labels=-Wfree-labels
+else case e in #(
+ e) libc_cv_test_cc_wfree_labels= ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_cc_wfree_labels" >&5
+printf "%s\n" "$libc_cv_test_cc_wfree_labels" >&6; }
+
+CC="$saved_CC"
+
+fi
+
+config_vars="$config_vars
+cc-option-wfree-labels = $libc_cv_cc_wfree_labels"
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wmissing-parameter-name" >&5
+printf %s "checking for -Wmissing-parameter-name... " >&6; }
+if test ${libc_cv_cc_wmissing_parameter_name+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} -Werror -Wmissing-parameter-name -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ libc_cv_cc_wmissing_parameter_name=-Wmissing-parameter-name
+else case e in #(
+ e) libc_cv_cc_wmissing_parameter_name= ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_wmissing_parameter_name" >&5
+printf "%s\n" "$libc_cv_cc_wmissing_parameter_name" >&6; }
+if test "$TEST_CC" = "$CC"; then
+ libc_cv_test_cc_wmissing_parameter_name=$libc_cv_cc_wmissing_parameter_name
+else
+
+saved_CC="$CC"
+CC="$TEST_CC"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wmissing-parameter-name in testing" >&5
+printf %s "checking for -Wmissing-parameter-name in testing... " >&6; }
+if test ${libc_cv_test_cc_wmissing_parameter_name+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if { ac_try='${CC-cc} -Werror -Wmissing-parameter-name -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ libc_cv_test_cc_wmissing_parameter_name=-Wmissing-parameter-name
+else case e in #(
+ e) libc_cv_test_cc_wmissing_parameter_name= ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_cc_wmissing_parameter_name" >&5
+printf "%s\n" "$libc_cv_test_cc_wmissing_parameter_name" >&6; }
+
+CC="$saved_CC"
+
+fi
+
+config_vars="$config_vars
+cc-option-wmissing-parameter-name = $libc_cv_cc_wmissing_parameter_name"
+
+
conftest_code="
void bar (void (*callback) (void));
int foo (void)
@@ -9181,6 +9358,134 @@ have-libgcc_s = $libc_cv_have_libgcc_s"
+enable_gsframe=no
+if test $use_sframe = yes; then
+ # SFrame requires to be explicit enabled by the architecture
+ if test -z $libc_cv_support_sframe; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "the architecture doesn't support SFrame
+See 'config.log' for more details" "$LINENO" 5; }
+ fi
+
+ # SFrame requires binutils 2.45 or higher.
+ libc_cv_sframe_readelf_version=yes
+ for ac_prog in $READELF
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_READELF+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_READELF="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi ;;
+esac
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+printf "%s\n" "$READELF" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$READELF" && break
+done
+
+if test -z "$READELF"; then
+ ac_verc_fail=yes
+else
+ # Found it, now check the version.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of $READELF" >&5
+printf %s "checking version of $READELF... " >&6; }
+ ac_prog_version=`$READELF --version 2>&1 | sed -n 's/^.*GNU readelf.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 2.4[5-9]*|2.[5-9][0-9]*|2.[1-9][0-9][0-9]*|[3-9]*|[1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+printf "%s\n" "$ac_prog_version" >&6; }
+fi
+if test $ac_verc_fail = yes; then
+ libc_cv_sframe_readelf_version=no
+fi
+
+ if test $libc_cv_sframe_readelf_version = no; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "binutils too old to enable SFrame
+See 'config.log' for more details" "$LINENO" 5; }
+ fi
+
+ # Check if the current toolchain supports SFrame
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SFrame support" >&5
+printf %s "checking for SFrame support... " >&6; }
+if test ${libc_cv_default_sframe+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) cat > conftest.c <<EOF
+int test_function(void)
+{
+ return 42;
+}
+EOF
+ libc_cv_default_sframe=no
+ if ${CC} -c conftest.c -o conftest.o -Wa,--gsframe >/dev/null 2>&1 && \
+ # Check if .sframe section is present and if version > 1
+ $READELF --sframe conftest.o | grep "SFRAME_VER" | grep -qv "VERSION_1"; then
+ libc_cv_default_sframe=yes
+ fi
+ rm -f conftest.c conftest.o
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_default_sframe" >&5
+printf "%s\n" "$libc_cv_default_sframe" >&6; }
+
+ if test $libc_cv_default_sframe = no; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "toolchain doesn't support SFrame v2 or higher
+See 'config.log' for more details" "$LINENO" 5; }
+ fi
+
+ enable_gsframe=yes
+ printf "%s\n" "#define ENABLE_SFRAME 1" >>confdefs.h
+
+fi
+config_vars="$config_vars
+enable-gsframe = $enable_gsframe"
+
# Set the `multidir' variable by grabbing the variable from the compiler.
# We do it once and save the result in a generated makefile.
libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory`