diff options
| author | H.J. Lu <hjl.tools@gmail.com> | 2024-06-20 15:28:12 -0700 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2024-07-02 00:51:34 -0700 |
| commit | 23f12e6e0c95aaf8b5b4973d029db794a43f248a (patch) | |
| tree | 0a1f40e34bcefc6644c16a618e31081e912a7c8d /configure | |
| parent | dce754b1553b86fc6352636f1fa490a85b7cf0ff (diff) | |
| download | glibc-23f12e6e0c95aaf8b5b4973d029db794a43f248a.tar.xz glibc-23f12e6e0c95aaf8b5b4973d029db794a43f248a.zip | |
Add --disable-static-c++-link-check option [BZ #31412]
The current minimum GCC version of glibc build is GCC 6.2 or newer. But
building i686 glibc with GCC 6.4 on Fedora 40 failed since the C++ header
files couldn't be found which was caused by the static C++ link check
failure due to missing __divmoddi4 which was referenced in i686 libc.a
and added to GCC 7. Add --disable-static-c++-link-check configure option
to disable the static C++ link test. The newly built i686 libc.a can be
used by GCC 6.4 to create static C++ tests. This fixes BZ #31412.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -771,6 +771,7 @@ ac_user_opts=' enable_option_checking with_pkgversion with_bugurl +enable_static_c___link_check with_gd with_gd_include with_gd_lib @@ -1440,6 +1441,8 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-static-c++-link-check + disable static C++ link check [default=no] --disable-sanity-checks really do not use threads (should not be used except in special situations) [default=yes] --enable-shared build shared library [default=yes if GNU ld] @@ -3855,6 +3858,15 @@ if test -z "$CPP"; then fi +# Check whether --enable-static-c++-link-check was given. +if test ${enable_static_c___link_check+y} +then : + enableval=$enable_static_c___link_check; static_cxx_link_check=$enableval +else $as_nop + static_cxx_link_check=yes +fi + + # We need the C++ compiler only for testing. @@ -4279,10 +4291,11 @@ esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -# Static case. -old_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -static" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $static_cxx_link_check = yes; then + # Static case. + old_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -static" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <iostream> @@ -4304,7 +4317,8 @@ esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LDFLAGS="$old_LDFLAGS" + LDFLAGS="$old_LDFLAGS" +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
