Przeglądaj źródła

Toolchain+Ports: Skip link tests for libstdc++v3

This makes stdlib.h and stdio.h functions available in the std
namespace for C++.

libstdc++v3's link tests can fail if you don't have an up-to-date
build directory, for example:

1. Have libc with missing _Exit symbol because you haven't done
   a build since that was added.

2. Run toolchain rebuild. libstdc++v3's configure script will
   realize that it can do link tests in general but will fail
   later on when it tries to link a program that tests for _Exit.

Even though this is a toolchain patch this does not necessarily
require rebuilding the toolchain right away. This is only required
once we start using any of these new members in the std namespace,
e.g. for ports.
Gunnar Beutner 4 lat temu
rodzic
commit
b223233b15
2 zmienionych plików z 40 dodań i 0 usunięć
  1. 20 0
      Ports/gcc/patches/gcc.patch
  2. 20 0
      Toolchain/Patches/gcc.patch

+ 20 - 0
Ports/gcc/patches/gcc.patch

@@ -6297,3 +6297,23 @@ diff -Naur gcc-11.1.0-RC-20210420/libstdc++-v3/crossconfig.m4 gcc-11.1.0-RC-2021
    arm*-*-symbianelf*)
    arm*-*-symbianelf*)
      # This is a freestanding configuration; there is nothing to do here.
      # This is a freestanding configuration; there is nothing to do here.
      ;;
      ;;
+diff -Naur gcc-11.1.0/libstdc++-v3/configure gcc-11.1.0.serenity/libstdc++-v3/configure
+--- gcc-11.1.0/libstdc++-v3/configure	2021-05-08 23:33:02.665399548 +0200
++++ gcc-11.1.0.serenity/libstdc++-v3/configure	2021-05-09 08:49:22.325309643 +0200
+@@ -4219,15 +4219,7 @@
+ }
+ _ACEOF
+ # FIXME: Cleanup?
+-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+-  (eval $ac_link) 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then :
+-  gcc_no_link=no
+-else
+-  gcc_no_link=yes
+-fi
++gcc_no_link=yes
+ if test x$gcc_no_link = xyes; then
+   # Setting cross_compile will disable run tests; it will
+   # also disable AC_CHECK_FILE but that's generally

+ 20 - 0
Toolchain/Patches/gcc.patch

@@ -6297,3 +6297,23 @@ diff -Naur gcc-11.1.0-RC-20210420/libstdc++-v3/crossconfig.m4 gcc-11.1.0-RC-2021
    arm*-*-symbianelf*)
    arm*-*-symbianelf*)
      # This is a freestanding configuration; there is nothing to do here.
      # This is a freestanding configuration; there is nothing to do here.
      ;;
      ;;
+diff -Naur gcc-11.1.0/libstdc++-v3/configure gcc-11.1.0.serenity/libstdc++-v3/configure
+--- gcc-11.1.0/libstdc++-v3/configure	2021-05-08 23:33:02.665399548 +0200
++++ gcc-11.1.0.serenity/libstdc++-v3/configure	2021-05-09 08:49:22.325309643 +0200
+@@ -4219,15 +4219,7 @@
+ }
+ _ACEOF
+ # FIXME: Cleanup?
+-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+-  (eval $ac_link) 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then :
+-  gcc_no_link=no
+-else
+-  gcc_no_link=yes
+-fi
++gcc_no_link=yes
+ if test x$gcc_no_link = xyes; then
+   # Setting cross_compile will disable run tests; it will
+   # also disable AC_CHECK_FILE but that's generally