b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | --- a/configure.ac |
| 2 | +++ b/configure.ac |
| 3 | @@ -1401,13 +1401,13 @@ if test -z "$LD"; then |
| 4 | fi |
| 5 | fi |
| 6 | |
| 7 | -# Check whether -static-libstdc++ -static-libgcc is supported. |
| 8 | +# Check whether -static-libstdc++ is supported. |
| 9 | have_static_libs=no |
| 10 | if test "$GCC" = yes; then |
| 11 | saved_LDFLAGS="$LDFLAGS" |
| 12 | |
| 13 | - LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" |
| 14 | - AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) |
| 15 | + LDFLAGS="$LDFLAGS -static-libstdc++" |
| 16 | + AC_MSG_CHECKING([whether g++ accepts -static-libstdc++]) |
| 17 | AC_LANG_PUSH(C++) |
| 18 | AC_LINK_IFELSE([AC_LANG_SOURCE([ |
| 19 | #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) |
| 20 | @@ -1837,7 +1837,7 @@ AC_ARG_WITH(stage1-ldflags, |
| 21 | # trust that they are doing what they want. |
| 22 | if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ |
| 23 | -a "$have_static_libs" = yes; then |
| 24 | - stage1_ldflags="-static-libstdc++ -static-libgcc" |
| 25 | + stage1_ldflags="-static-libstdc++" |
| 26 | fi]) |
| 27 | AC_SUBST(stage1_ldflags) |
| 28 | |
| 29 | @@ -1866,7 +1866,7 @@ AC_ARG_WITH(boot-ldflags, |
| 30 | # statically. But if the user explicitly specified the libraries to |
| 31 | # use, trust that they are doing what they want. |
| 32 | if test "$poststage1_libs" = ""; then |
| 33 | - poststage1_ldflags="-static-libstdc++ -static-libgcc" |
| 34 | + poststage1_ldflags="-static-libstdc++" |
| 35 | fi]) |
| 36 | case $target in |
| 37 | *-darwin2* | *-darwin1[[56789]]*) |
| 38 | --- a/configure |
| 39 | +++ b/configure |
| 40 | @@ -5414,14 +5414,14 @@ if test -z "$LD"; then |
| 41 | fi |
| 42 | fi |
| 43 | |
| 44 | -# Check whether -static-libstdc++ -static-libgcc is supported. |
| 45 | +# Check whether -static-libstdc++ is supported. |
| 46 | have_static_libs=no |
| 47 | if test "$GCC" = yes; then |
| 48 | saved_LDFLAGS="$LDFLAGS" |
| 49 | |
| 50 | - LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" |
| 51 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5 |
| 52 | -$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; } |
| 53 | + LDFLAGS="$LDFLAGS -static-libstdc++" |
| 54 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++" >&5 |
| 55 | +$as_echo_n "checking whether g++ accepts -static-libstdc++... " >&6; } |
| 56 | ac_ext=cpp |
| 57 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 58 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 59 | @@ -8465,7 +8465,7 @@ else |
| 60 | # trust that they are doing what they want. |
| 61 | if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ |
| 62 | -a "$have_static_libs" = yes; then |
| 63 | - stage1_ldflags="-static-libstdc++ -static-libgcc" |
| 64 | + stage1_ldflags="-static-libstdc++" |
| 65 | fi |
| 66 | fi |
| 67 | |
| 68 | @@ -8501,7 +8501,7 @@ else |
| 69 | # statically. But if the user explicitly specified the libraries to |
| 70 | # use, trust that they are doing what they want. |
| 71 | if test "$poststage1_libs" = ""; then |
| 72 | - poststage1_ldflags="-static-libstdc++ -static-libgcc" |
| 73 | + poststage1_ldflags="-static-libstdc++" |
| 74 | fi |
| 75 | fi |
| 76 | |