Bug#783360: cross-gcc: fix libstdc++ header install location

YunQiang Su <[email protected]>
Newsgroups gmane.linux.debian.devel.toolchain
Message-ID <CAKcpw6XsUyKSeVOfzVOM6B1vGxYYj17=fPG84eCpSxRJEFTtDQ__1803.58620496026$1430048192$gmane$org@mail.gmail.com>
Package: src:cross-gcc
Version: 16

in patch ma-cross-install-location.diff,
libstdc++-v3 is lost, so headers will be installed into usr/<triplet>/include.

Please consider this patch.

To test it you, you will need build gcc with option BACKPORT=false



with_deps_on_target_arch_pkgs=yes DH_VERBOSE=1 WITH_SYSROOT=/
BACKPORT=false PKG_IGNORE_CURRENTLY_BUILDING=1
DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -b -uc -us -d

this command is what I used to test it.


-- 
YunQiang Su
libstdcxx-header-location.patch (application/octet-stream, 1.4 KB)
diff --git a/patches/gcc-5/0004-reverted-removal-of-with_deps_on_target_arch_pkgs-in.patch b/patches/gcc-5/0004-reverted-removal-of-with_deps_on_target_arch_pkgs-in.patch
index 50fc6ce..abfda99 100644
--- a/patches/gcc-5/0004-reverted-removal-of-with_deps_on_target_arch_pkgs-in.patch
+++ b/patches/gcc-5/0004-reverted-removal-of-with_deps_on_target_arch_pkgs-in.patch
@@ -437,6 +437,24 @@ index 0000000..6ce481c
 +     multi_os_directory=`$CC -print-multi-os-directory`
 +     case $multi_os_directory in
 +       .) ;; # Avoid trailing /.
++Index: b/src/libstdc++-v3/acinclude.m4
++===================================================================
++--- a/src/libstdc++-v3/acinclude.m4
+++++ b/src/libstdc++-v3/acinclude.m4
++@@ -816,12 +816,7 @@ AC_DEFUN([GLIBCXX_EXPORT_INSTALL_INFO],
++   # Default case for install directory for include files.
++   if test $version_specific_libs = no && test $gxx_include_dir = no; then
++     gxx_include_dir='include/c++/${gcc_version}'
++-    if test -n "$with_cross_host" &&
++-       test x"$with_cross_host" != x"no"; then
++-      gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir"
++-    else
++-      gxx_include_dir='${prefix}/'"$gxx_include_dir"
++-    fi
+++    gxx_include_dir='${prefix}/'"$gxx_include_dir"
++   fi
++ 
++   # Version-specific runtime libs processing.
 diff --git a/debian/rules.conf b/debian/rules.conf
 index 270e009..240ad7a 100644
 --- a/debian/rules.conf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.