* [PATCH] parisc: make default cross compiler search more robust (v3)
@ 2013-05-11 19:04 Helge Deller
2013-05-11 19:13 ` John David Anglin
2013-05-11 21:55 ` [PATCH] parisc: make default cross compiler search more robust (v4) Helge Deller
0 siblings, 2 replies; 5+ messages in thread
From: Helge Deller @ 2013-05-11 19:04 UTC (permalink / raw)
To: linux-parisc, James Bottomley, John David Anglin, Mike Frysinger,
Jeroen Roovers
People/distros vary how they prefix the toolchain name for 64bit builds.
Rather than enforce one convention over another, add a for loop which
does a search for all the general prefixes.
For 64bit builds, we now search for (in order):
hppa64-unknown-linux-gnu
hppa64-linux-gnu
hppa64-linux
For 32bit builds, we look for:
hppa-unknown-linux-gnu
hppa-linux-gnu
hppa-linux
hppa1.1-unknown-linux-gnu
hppa1.1-linux-gnu
hppa1.1-linux
hppa2.0-unknown-linux-gnu
hppa2.0-linux-gnu
hppa2.0-linux
This patch was initiated by Mike Frysinger, with feedback from Jeroen
Roovers, John David Anglin and Helge Deller.
Signed-off-by: Helge Deller <deller@gmx.de>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Jeroen Roovers <jer@gentoo.org>
CC: John David Anglin <dave.anglin@bell.net>
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 2f967cc..4e5b7b5 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -23,24 +23,21 @@ NM = sh $(srctree)/arch/parisc/nm
CHECKFLAGS += -D__hppa__=1
LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
-MACHINE := $(shell uname -m)
-NATIVE := $(if $(filter parisc%,$(MACHINE)),1,0)
-
ifdef CONFIG_64BIT
UTS_MACHINE := parisc64
CHECKFLAGS += -D__LP64__=1 -m64
-WIDTH := 64
+CC_ARCHES = hppa64
else # 32-bit
-WIDTH :=
+CC_ARCHES = hppa hppa1.1 hppa2.0
endif
-# attempt to help out folks who are cross-compiling
-ifeq ($(NATIVE),1)
-CROSS_COMPILE := hppa$(WIDTH)-linux-
-else
- ifeq ($(CROSS_COMPILE),)
- CROSS_COMPILE := hppa$(WIDTH)-linux-gnu-
- endif
+ifneq ($(SUBARCH),$(ARCH))
+ ifeq ($(CROSS_COMPILE),)
+ CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
+ CROSS_COMPILE := $(call cc-cross-prefix, \
+ $(foreach a,$(CC_ARCHES), \
+ $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
+ endif
endif
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: make default cross compiler search more robust (v3)
2013-05-11 19:04 [PATCH] parisc: make default cross compiler search more robust (v3) Helge Deller
@ 2013-05-11 19:13 ` John David Anglin
2013-05-11 21:55 ` [PATCH] parisc: make default cross compiler search more robust (v4) Helge Deller
1 sibling, 0 replies; 5+ messages in thread
From: John David Anglin @ 2013-05-11 19:13 UTC (permalink / raw)
To: Helge Deller
Cc: linux-parisc, James Bottomley, Mike Frysinger, Jeroen Roovers
On 11-May-13, at 3:04 PM, Helge Deller wrote:
> People/distros vary how they prefix the toolchain name for 64bit
> builds.
> Rather than enforce one convention over another, add a for loop which
> does a search for all the general prefixes.
>
> For 64bit builds, we now search for (in order):
> hppa64-unknown-linux-gnu
> hppa64-linux-gnu
> hppa64-linux
>
> For 32bit builds, we look for:
> hppa-unknown-linux-gnu
> hppa-linux-gnu
> hppa-linux
> hppa1.1-unknown-linux-gnu
> hppa1.1-linux-gnu
> hppa1.1-linux
> hppa2.0-unknown-linux-gnu
> hppa2.0-linux-gnu
> hppa2.0-linux
As I tried to say before, I would search for hppa2.0 before hppa1.1 in
case both are installed.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: make default cross compiler search more robust (v4)
2013-05-11 19:04 [PATCH] parisc: make default cross compiler search more robust (v3) Helge Deller
2013-05-11 19:13 ` John David Anglin
@ 2013-05-11 21:55 ` Helge Deller
2013-05-12 18:22 ` Mike Frysinger
2013-05-12 18:33 ` Jeroen Roovers
1 sibling, 2 replies; 5+ messages in thread
From: Helge Deller @ 2013-05-11 21:55 UTC (permalink / raw)
To: linux-parisc, James Bottomley, John David Anglin
Cc: Mike Frysinger, Jeroen Roovers
People/distros vary how they prefix the toolchain name for 64bit builds.
Rather than enforce one convention over another, add a for loop which
does a search for all the general prefixes.
For 64bit builds, we now search for (in order):
hppa64-unknown-linux-gnu
hppa64-linux-gnu
hppa64-linux
For 32bit builds, we look for:
hppa-unknown-linux-gnu
hppa-linux-gnu
hppa-linux
hppa2.0-unknown-linux-gnu
hppa2.0-linux-gnu
hppa2.0-linux
hppa1.1-unknown-linux-gnu
hppa1.1-linux-gnu
hppa1.1-linux
This patch was initiated by Mike Frysinger, with feedback from Jeroen
Roovers, John David Anglin and Helge Deller.
CC: Mike Frysinger <vapier@gentoo.org>
CC: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 2f967cc..4e5b7b5 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -23,24 +23,21 @@ NM = sh $(srctree)/arch/parisc/nm
CHECKFLAGS += -D__hppa__=1
LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
-MACHINE := $(shell uname -m)
-NATIVE := $(if $(filter parisc%,$(MACHINE)),1,0)
-
ifdef CONFIG_64BIT
UTS_MACHINE := parisc64
CHECKFLAGS += -D__LP64__=1 -m64
-WIDTH := 64
+CC_ARCHES = hppa64
else # 32-bit
-WIDTH :=
+CC_ARCHES = hppa hppa2.0 hppa1.1
endif
-# attempt to help out folks who are cross-compiling
-ifeq ($(NATIVE),1)
-CROSS_COMPILE := hppa$(WIDTH)-linux-
-else
- ifeq ($(CROSS_COMPILE),)
- CROSS_COMPILE := hppa$(WIDTH)-linux-gnu-
- endif
+ifneq ($(SUBARCH),$(UTS_MACHINE))
+ ifeq ($(CROSS_COMPILE),)
+ CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
+ CROSS_COMPILE := $(call cc-cross-prefix, \
+ $(foreach a,$(CC_ARCHES), \
+ $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
+ endif
endif
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: make default cross compiler search more robust (v4)
2013-05-11 21:55 ` [PATCH] parisc: make default cross compiler search more robust (v4) Helge Deller
@ 2013-05-12 18:22 ` Mike Frysinger
2013-05-12 18:33 ` Jeroen Roovers
1 sibling, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2013-05-12 18:22 UTC (permalink / raw)
To: Helge Deller
Cc: linux-parisc, James Bottomley, John David Anglin, Jeroen Roovers
[-- Attachment #1: Type: Text/Plain, Size: 56 bytes --]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] parisc: make default cross compiler search more robust (v4)
2013-05-11 21:55 ` [PATCH] parisc: make default cross compiler search more robust (v4) Helge Deller
2013-05-12 18:22 ` Mike Frysinger
@ 2013-05-12 18:33 ` Jeroen Roovers
1 sibling, 0 replies; 5+ messages in thread
From: Jeroen Roovers @ 2013-05-12 18:33 UTC (permalink / raw)
To: Helge Deller
Cc: linux-parisc, James Bottomley, John David Anglin, Mike Frysinger
On Sat, 11 May 2013 23:55:55 +0200
Helge Deller <deller@gmx.de> wrote:
> People/distros vary how they prefix the toolchain name for 64bit
> builds. Rather than enforce one convention over another, add a for
> loop which does a search for all the general prefixes.
>
> For 64bit builds, we now search for (in order):
> hppa64-unknown-linux-gnu
> hppa64-linux-gnu
> hppa64-linux
>
> For 32bit builds, we look for:
> hppa-unknown-linux-gnu
> hppa-linux-gnu
> hppa-linux
> hppa2.0-unknown-linux-gnu
> hppa2.0-linux-gnu
> hppa2.0-linux
> hppa1.1-unknown-linux-gnu
> hppa1.1-linux-gnu
> hppa1.1-linux
>
> This patch was initiated by Mike Frysinger, with feedback from Jeroen
> Roovers, John David Anglin and Helge Deller.
>
> CC: Mike Frysinger <vapier@gentoo.org>
> CC: Jeroen Roovers <jer@gentoo.org>
> Signed-off-by: John David Anglin <dave.anglin@bell.net>
> Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
jer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-12 18:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-11 19:04 [PATCH] parisc: make default cross compiler search more robust (v3) Helge Deller
2013-05-11 19:13 ` John David Anglin
2013-05-11 21:55 ` [PATCH] parisc: make default cross compiler search more robust (v4) Helge Deller
2013-05-12 18:22 ` Mike Frysinger
2013-05-12 18:33 ` Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox