This patch reverts upstream commit b4d3485e4fc1d: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b4d3485e4fc1d029e620a59deb54b3f4f3f6b209 Otherwise, GCC ends up searching the wrong target directory for cross-headers. diff --git a/gcc/configure b/gcc/configure --- a/gcc/configure +++ b/gcc/configure @@ -3689,11 +3689,6 @@ esac fi -# If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate -# the former in the latter and, upon success, compute gcc_gxx_include_dir as -# relative to the sysroot. -gcc_gxx_include_dir_add_sysroot=0 - # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. if test x${gcc_gxx_include_dir} = x; then if test x${enable_version_specific_runtime_libs} = xyes; then @@ -3705,10 +3700,15 @@ if test x${gcc_gxx_include_dir} = x; then fi gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" fi -elif test "${with_sysroot+set}" = set; then +fi + +gcc_gxx_include_dir_add_sysroot=0 +if test "${with_sysroot+set}" = set; then gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` if test "${gcc_gxx_without_sysroot}"; then - gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" + if test x${with_sysroot} != x/; then + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" + fi gcc_gxx_include_dir_add_sysroot=1 fi fi diff --git a/gcc/configure.ac b/gcc/configure.ac index 715fcba0482..88136e232df 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -204,11 +204,6 @@ no) ;; *) gcc_gxx_include_dir=$with_gxx_include_dir ;; esac]) -# If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate -# the former in the latter and, upon success, compute gcc_gxx_include_dir as -# relative to the sysroot. -gcc_gxx_include_dir_add_sysroot=0 - # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. if test x${gcc_gxx_include_dir} = x; then if test x${enable_version_specific_runtime_libs} = xyes; then @@ -220,10 +215,15 @@ if test x${gcc_gxx_include_dir} = x; then fi gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" fi -elif test "${with_sysroot+set}" = set; then +fi + +gcc_gxx_include_dir_add_sysroot=0 +if test "${with_sysroot+set}" = set; then gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` if test "${gcc_gxx_without_sysroot}"; then - gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" + if test x${with_sysroot} != x/; then + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" + fi gcc_gxx_include_dir_add_sysroot=1 fi fi 8644280b'>tests: Make builds less expensive....The switch to the reduced bootstrap broke build time assumptions made by tests, notably the assumption that GNU-MAKE-BOOT0 was cheap to build. This commit adjusts this to make these tests cheaper. * gnu/packages/bootstrap.scm (%bootstrap-inputs-for-tests): New variable. * guix/tests.scm (gnu-make-for-tests): New variable. * tests/guix-environment.sh: Use GNU-MAKE-FOR-TESTS instead of GNU-MAKE-BOOT0. Remove test with FINDUTILS-BOOT0. * tests/guix-package-net.sh (boot_make): Use GNU-MAKE-FOR-TESTS. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/profiles.scm ("profile-derivation relative symlinks, two entries"): Likewise. * tests/union.scm (%bootstrap-inputs): Remove. ("union-build"): Use %BOOTSTRAP-INPUTS-FOR-TESTS instead of %BOOTSTRAP-INPUTS. Ludovic Courtès 2018-09-23bootstrap: %bootstrap-inputs+toolchain: Replace %bootstrap-inputs....* gnu/packages/commencement.scm (%bootstrap-inputs+toolchain): : New procedure replacing %bootstrap-inputs to prepare for Mes bootstrap. Update users. * tests/union.scm (%bootstrap-inputs): New variable: set to %bootstrap-inputs+toolchain. Jan Nieuwenhuizen 2018-09-22bootstrap: %bootstrap-inputs: Wrap input lists into thunks....* gnu/packages/bootstrap.scm (%bootstrap-inputs): Change to procedure. Update users; prepares for Mes bootstrap. * gnu/packages/commencement.scm (%boot0-inputs, %boot1-inputs, %boot2-inputs, %boot3-inputs, %boot4-inputs, %boot5-inputs, %boot-6-inputs): Change to procedure. Update users. * tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths): Make a procedure, filter on package?. Update users. Jan Nieuwenhuizen 2018-05-10union: Add 'relative-file-name'....* guix/build/union.scm (%not-slash): New variable. (relative-file-name): New procedure. * tests/union.scm (test-relative-file-name): New macro and tests. Ludovic Courtès 2018-04-08union: Allow callers to choose the collision resolution policy....* guix/build/union.scm (warn-about-collision): New procedure. (union-build): Add #:resolve-collision. [resolve-collisions]: Call it. * tests/union.scm ("union-build collision first & last"): New test. Ludovic Courtès 2017-03-26union: Add create-all-directories? parameter to 'union-build'....* guix/build/union.scm (union-build): Add create-all-directories? keyword parameter. * tests/union.scm ("union-build #:create-all-directories? #t"): New test. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Huang Ying