public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] multiarch support for non-glibc linux systems
@ 2017-06-07 17:22 Szabolcs Nagy
  2017-06-07 18:41 ` Bernhard Reutner-Fischer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Szabolcs Nagy @ 2017-06-07 17:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd, helmutg, doko

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Current multiarch directory name is always *-linux-gnu* on linux,
this patch configures different names for uclibc and musl targets.
(tested by the debian rebootstrap scripts for various *-linux-musl
and *-linux-uclibc targets see debian bug #861588)

gcc/
2017-06-07  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.

[-- Attachment #2: multiarch.diff --]
[-- Type: text/x-patch, Size: 1111 bytes --]

diff --git a/gcc/config.gcc b/gcc/config.gcc
index a311cd95f49..fb7b7cd6d4c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -3096,6 +3096,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
index 00000000000..e203fce7619
--- /dev/null
+++ b/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))
diff --git a/gcc/config/t-uclibc b/gcc/config/t-uclibc
new file mode 100644
index 00000000000..c9b3a7bdfe2
--- /dev/null
+++ b/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))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] multiarch support for non-glibc linux systems
  2017-06-07 17:22 [PATCH] multiarch support for non-glibc linux systems Szabolcs Nagy
@ 2017-06-07 18:41 ` Bernhard Reutner-Fischer
  2017-06-27 15:51 ` Szabolcs Nagy
  2017-06-28  9:34 ` Matthias Klose
  2 siblings, 0 replies; 5+ messages in thread
From: Bernhard Reutner-Fischer @ 2017-06-07 18:41 UTC (permalink / raw)
  To: gcc-patches, Szabolcs Nagy, gcc-patches; +Cc: nd, helmutg, doko

On 7 June 2017 19:22:43 CEST, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>Current multiarch directory name is always *-linux-gnu* on linux,
>this patch configures different names for uclibc and musl targets.
>(tested by the debian rebootstrap scripts for various *-linux-musl
>and *-linux-uclibc targets see debian bug #861588)

FWIW my version since ages uses $libc but in effect is identical, yes.

Cheers,
>
>gcc/
>2017-06-07  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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] multiarch support for non-glibc linux systems
  2017-06-07 17:22 [PATCH] multiarch support for non-glibc linux systems Szabolcs Nagy
  2017-06-07 18:41 ` Bernhard Reutner-Fischer
@ 2017-06-27 15:51 ` Szabolcs Nagy
  2017-06-28  9:34 ` Matthias Klose
  2 siblings, 0 replies; 5+ messages in thread
From: Szabolcs Nagy @ 2017-06-27 15:51 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd, helmutg, doko

On 07/06/17 18:22, Szabolcs Nagy wrote:
> Current multiarch directory name is always *-linux-gnu* on linux,
> this patch configures different names for uclibc and musl targets.
> (tested by the debian rebootstrap scripts for various *-linux-musl
> and *-linux-uclibc targets see debian bug #861588)
> 
> gcc/
> 2017-06-07  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.
> 

ping.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] multiarch support for non-glibc linux systems
  2017-06-07 17:22 [PATCH] multiarch support for non-glibc linux systems Szabolcs Nagy
  2017-06-07 18:41 ` Bernhard Reutner-Fischer
  2017-06-27 15:51 ` Szabolcs Nagy
@ 2017-06-28  9:34 ` Matthias Klose
  2017-06-28 15:51   ` Jeff Law
  2 siblings, 1 reply; 5+ messages in thread
From: Matthias Klose @ 2017-06-28  9:34 UTC (permalink / raw)
  To: Szabolcs Nagy, gcc-patches; +Cc: nd, helmutg, doko

On 07.06.2017 19:22, Szabolcs Nagy wrote:
> Current multiarch directory name is always *-linux-gnu* on linux,
> this patch configures different names for uclibc and musl targets.
> (tested by the debian rebootstrap scripts for various *-linux-musl
> and *-linux-uclibc targets see debian bug #861588)
> 
> gcc/
> 2017-06-07  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.

I can't formally approve that, but this looks ok.

Matthias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] multiarch support for non-glibc linux systems
  2017-06-28  9:34 ` Matthias Klose
@ 2017-06-28 15:51   ` Jeff Law
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Law @ 2017-06-28 15:51 UTC (permalink / raw)
  To: Matthias Klose, Szabolcs Nagy, gcc-patches; +Cc: nd, helmutg, doko

On 06/28/2017 03:33 AM, Matthias Klose wrote:
> On 07.06.2017 19:22, Szabolcs Nagy wrote:
>> Current multiarch directory name is always *-linux-gnu* on linux,
>> this patch configures different names for uclibc and musl targets.
>> (tested by the debian rebootstrap scripts for various *-linux-musl
>> and *-linux-uclibc targets see debian bug #861588)
>>
>> gcc/
>> 2017-06-07  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.
> 
> I can't formally approve that, but this looks ok.
The patch is OK for the trunk.

I must have inadvertently removed it when walking through my pending
patches last week -- the downside of ignoring everything for a month is
it's much easier for something to fall through the cracks.

jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-28 15:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 17:22 [PATCH] multiarch support for non-glibc linux systems Szabolcs Nagy
2017-06-07 18:41 ` Bernhard Reutner-Fischer
2017-06-27 15:51 ` Szabolcs Nagy
2017-06-28  9:34 ` Matthias Klose
2017-06-28 15:51   ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).