Source: gcc-7 Severity: wishlist Tags: patch User: helm...@debian.org Usertags: rebootstrap
Hi Matthias, The multiarch stuff in gcc is still not entirely upstream and we are carrying part of it in debian/patches/gcc-multiarch.diff. Notably missing there is support for non-glibc architectures. Would it be reasonable to add the relevant snippets for that support there? I am attaching a diff to gcc-multiarch.diff that makes musl and uclibc work. It would be nice if you could apply it. Thank you Helmut
--- a/debian/patches/gcc-multiarch.diff +++ b/debian/patches/gcc-multiarch.diff @@ -145,6 +145,23 @@ Index: b/src/gcc/config.gcc mips64*-*-linux* | mipsisa64*-*-linux*) default_mips_abi=n32 enable_mips_multilibs="yes" +@@ -3002,6 +3011,16 @@ + tm_file="${tm_file} rs6000/option-defaults.h" + esac + ++# non-glibc systems ++case ${target} in ++*-linux-musl*) ++ tmake_file="${tmake_file} t-musl" ++ ;; ++*-linux-uclibc*) ++ tmake_file="${tmake_file} t-uclibc" ++ ;; ++esac ++ + # Build mkoffload tool + case ${target} in + *-intelmic-* | *-intelmicemul-*) @@ -4507,7 +4516,7 @@ case ${target} in i[34567]86-*-darwin* | x86_64-*-darwin*) ;; @@ -214,3 +231,13 @@ Index: b/src/gcc/config/tilegx/t-tilegx # Directory for prefix to system directories, for # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc. +--- /dev/null ++++ b/src/gcc/config/t-musl +@@ -0,0 +1,2 @@ ++MULTIARCH_DIRNAME := $(subst -linux-gnu,-linux-musl,$(MULTIARCH_DIRNAME)) ++MULTILIB_OSDIRNAMES := $(subst -linux-gnu,-linux-musl,$(MULTILIB_OSDIRNAMES)) +--- /dev/null ++++ b/src/gcc/config/t-uclibc +@@ -0,0 +1,2 @@ ++MULTIARCH_DIRNAME := $(subst -linux-gnu,-linux-uclibc,$(MULTIARCH_DIRNAME)) ++MULTILIB_OSDIRNAMES := $(subst -linux-gnu,-linux-uclibc,$(MULTILIB_OSDIRNAMES))