multiarch support for non-glibc linux systems
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 28 Jun 2017 16:02:42 +0000 (16:02 +0000)
committerSzabolcs Nagy <nsz@gcc.gnu.org>
Wed, 28 Jun 2017 16:02:42 +0000 (16:02 +0000)
Current multiarch directory name is always *-linux-gnu* on linux,
this patch configures different names for uclibc and musl targets.

2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>

* config.gcc (*-linux-musl*): Add t-musl tmake_file.
(*-linux-uclibc*): Add t-uclibc tmake_file.
* config/t-musl: New.
* config/t-uclibc: New.

From-SVN: r249745

gcc/ChangeLog
gcc/config.gcc
gcc/config/t-musl [new file with mode: 0644]
gcc/config/t-uclibc [new file with mode: 0644]

index 0849c901faca4c7ecb0089821e69ed60afed00be..2ecc04d9c19fdca74b2f5593ffde2b77c9e01ce9 100644 (file)
@@ -1,3 +1,10 @@
+2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       * config.gcc (*-linux-musl*): Add t-musl tmake_file.
+       (*-linux-uclibc*): Add t-uclibc tmake_file.
+       * config/t-musl: New.
+       * config/t-uclibc: New.
+
 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
 
        * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
index a97bbc856a4791fbe951f1a7d190882db97f7af7..c5ae8cab7d95df50696205a422ceb3937f905bd8 100644 (file)
@@ -3112,6 +3112,16 @@ powerpc*-*-* | rs6000-*-*)
        tm_file="${tm_file} ${cpu_type}/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-*)
diff --git a/gcc/config/t-musl b/gcc/config/t-musl
new file mode 100644 (file)
index 0000000..e203fce
--- /dev/null
@@ -0,0 +1,2 @@
+MULTIARCH_DIRNAME := $(subst -linux-gnu,-linux-musl,$(MULTIARCH_DIRNAME))
+MULTILIB_OSDIRNAMES := $(subst -linux-gnu,-linux-musl,$(MULTILIB_OSDIRNAMES))
diff --git a/gcc/config/t-uclibc b/gcc/config/t-uclibc
new file mode 100644 (file)
index 0000000..c9b3a7b
--- /dev/null
@@ -0,0 +1,2 @@
+MULTIARCH_DIRNAME := $(subst -linux-gnu,-linux-uclibc,$(MULTIARCH_DIRNAME))
+MULTILIB_OSDIRNAMES := $(subst -linux-gnu,-linux-uclibc,$(MULTILIB_OSDIRNAMES))