* [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. @ 2012-02-26 23:26 Paul Gortmaker 2012-02-27 0:23 ` Mike Frysinger ` (2 more replies) 0 siblings, 3 replies; 17+ messages in thread From: Paul Gortmaker @ 2012-02-26 23:26 UTC (permalink / raw) To: JBottomley, jejb, kyle, deller Cc: linux-parisc, linux-kernel, linux-next, Paul Gortmaker Using the 64 bit toolchains from kernel.org[1], one finds that you can't build the a500_defconfig, because the Makefile will stomp whatever value you have in your env. for CROSS_COMPILE. This shows up since the kernel.org toolchains for parisc-64 do not have the "-gnu" prefix, and so you run into it always saying hppa64-linux-gnu-gcc not found, regardless of the fact you've not got "-gnu" put anywhere into CROSS_COMPILE. [1] ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 55cca1d..cefff6d 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -31,7 +31,9 @@ ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 WIDTH := 64 -CROSS_COMPILE := hppa64-linux-gnu- +ifndef CROSS_COMPILE + CROSS_COMPILE := hppa64-linux-gnu- +endif else # 32-bit WIDTH := endif -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-26 23:26 [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit Paul Gortmaker @ 2012-02-27 0:23 ` Mike Frysinger 2012-02-27 0:30 ` Paul Gortmaker 2012-02-27 15:14 ` John David Anglin 2012-02-27 20:59 ` [PATCH v2] " Paul Gortmaker 2 siblings, 1 reply; 17+ messages in thread From: Mike Frysinger @ 2012-02-27 0:23 UTC (permalink / raw) To: Paul Gortmaker Cc: JBottomley, jejb, kyle, deller, linux-parisc, linux-kernel, linux-next [-- Attachment #1: Type: Text/Plain, Size: 322 bytes --] On Sunday 26 February 2012 18:26:53 Paul Gortmaker wrote: > --- a/arch/parisc/Makefile > +++ b/arch/parisc/Makefile > > -CROSS_COMPILE := hppa64-linux-gnu- > +ifndef CROSS_COMPILE > + CROSS_COMPILE := hppa64-linux-gnu- > +endif this should accomplish the same thing in practice: CROSS_COMPILE ?= hppa64-linux-gnu- -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-27 0:23 ` Mike Frysinger @ 2012-02-27 0:30 ` Paul Gortmaker 0 siblings, 0 replies; 17+ messages in thread From: Paul Gortmaker @ 2012-02-27 0:30 UTC (permalink / raw) To: Mike Frysinger Cc: JBottomley, jejb, kyle, deller, linux-parisc, linux-kernel, linux-next [Re: [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit.] On 26/02/2012 (Sun 19:23) Mike Frysinger wrote: > On Sunday 26 February 2012 18:26:53 Paul Gortmaker wrote: > > --- a/arch/parisc/Makefile > > +++ b/arch/parisc/Makefile > > > > -CROSS_COMPILE := hppa64-linux-gnu- > > +ifndef CROSS_COMPILE > > + CROSS_COMPILE := hppa64-linux-gnu- > > +endif > > this should accomplish the same thing in practice: > CROSS_COMPILE ?= hppa64-linux-gnu- Good point, I'll wait for a bit in case I was missing something else obvious, and then resend. THanks, P. > -mike ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-26 23:26 [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit Paul Gortmaker 2012-02-27 0:23 ` Mike Frysinger @ 2012-02-27 15:14 ` John David Anglin 2012-02-27 16:28 ` Paul Gortmaker 2012-02-27 20:59 ` [PATCH v2] " Paul Gortmaker 2 siblings, 1 reply; 17+ messages in thread From: John David Anglin @ 2012-02-27 15:14 UTC (permalink / raw) To: Paul Gortmaker Cc: JBottomley, jejb, kyle, deller, linux-parisc, linux-kernel, linux-next On 2/26/2012 6:26 PM, Paul Gortmaker wrote: > Using the 64 bit toolchains from kernel.org[1], one finds that > you can't build the a500_defconfig, because the Makefile will > stomp whatever value you have in your env. for CROSS_COMPILE. > > This shows up since the kernel.org toolchains for parisc-64 > do not have the "-gnu" prefix, and so you run into it always > saying hppa64-linux-gnu-gcc not found, regardless of the fact > you've not got "-gnu" put anywhere into CROSS_COMPILE. > > [1] ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ > > Signed-off-by: Paul Gortmaker<paul.gortmaker@windriver.com> > > diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile > index 55cca1d..cefff6d 100644 > --- a/arch/parisc/Makefile > +++ b/arch/parisc/Makefile > @@ -31,7 +31,9 @@ ifdef CONFIG_64BIT > UTS_MACHINE := parisc64 > CHECKFLAGS += -D__LP64__=1 -m64 > WIDTH := 64 > -CROSS_COMPILE := hppa64-linux-gnu- > +ifndef CROSS_COMPILE > + CROSS_COMPILE := hppa64-linux-gnu- > +endif > else # 32-bit > WIDTH := > endif This change breaks native builds. So, I assume CROSS_COMPILE must be previously defined. I couldn't figure out where it is defined. CONFIG_CROSS_COMPILE in my .config was an empty string and CROSS_COMPILE was not defined in my build environment. The default toolchain prefix on Debian systems contains "gnu-". Given that users can use CONFIG_CROSS_COMPILE or set CROSS_COMPILE in their build env, maybe setting CROSS_COMPILE in the Makefile is a mistake. Dave -- John David Anglin dave.anglin@bell.net ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-27 15:14 ` John David Anglin @ 2012-02-27 16:28 ` Paul Gortmaker 2012-02-27 16:45 ` John David Anglin 0 siblings, 1 reply; 17+ messages in thread From: Paul Gortmaker @ 2012-02-27 16:28 UTC (permalink / raw) To: John David Anglin Cc: JBottomley, jejb, kyle, deller, linux-parisc, linux-kernel, linux-next On 12-02-27 10:14 AM, John David Anglin wrote: > On 2/26/2012 6:26 PM, Paul Gortmaker wrote: >> Using the 64 bit toolchains from kernel.org[1], one finds that >> you can't build the a500_defconfig, because the Makefile will >> stomp whatever value you have in your env. for CROSS_COMPILE. >> >> This shows up since the kernel.org toolchains for parisc-64 >> do not have the "-gnu" prefix, and so you run into it always >> saying hppa64-linux-gnu-gcc not found, regardless of the fact >> you've not got "-gnu" put anywhere into CROSS_COMPILE. >> >> [1] ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ >> >> Signed-off-by: Paul Gortmaker<paul.gortmaker@windriver.com> >> >> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile >> index 55cca1d..cefff6d 100644 >> --- a/arch/parisc/Makefile >> +++ b/arch/parisc/Makefile >> @@ -31,7 +31,9 @@ ifdef CONFIG_64BIT >> UTS_MACHINE := parisc64 >> CHECKFLAGS += -D__LP64__=1 -m64 >> WIDTH := 64 >> -CROSS_COMPILE := hppa64-linux-gnu- >> +ifndef CROSS_COMPILE >> + CROSS_COMPILE := hppa64-linux-gnu- >> +endif >> else # 32-bit >> WIDTH := >> endif > This change breaks native builds. So, I assume CROSS_COMPILE must be > previously defined. You lost me here. As in a native 32bit env. doing a build for the 64 bit case is setting CROSS_COMPILE? > > I couldn't figure out where it is defined. CONFIG_CROSS_COMPILE in my > .config was an empty string and CROSS_COMPILE was not defined in my > build environment. > > The default toolchain prefix on Debian systems contains "gnu-". > > Given that users can use CONFIG_CROSS_COMPILE or set CROSS_COMPILE > in their build env, maybe setting CROSS_COMPILE in the Makefile is a > mistake. Yeah, I'd support a complete nuke-and-pave of the whole Makefile chunk as well. It does seem redundant and causes more issues than it solves. Paul. > > Dave > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-27 16:28 ` Paul Gortmaker @ 2012-02-27 16:45 ` John David Anglin 0 siblings, 0 replies; 17+ messages in thread From: John David Anglin @ 2012-02-27 16:45 UTC (permalink / raw) To: Paul Gortmaker Cc: JBottomley, jejb, kyle, deller, linux-parisc, linux-kernel, linux-next On 2/27/2012 11:28 AM, Paul Gortmaker wrote: > On 12-02-27 10:14 AM, John David Anglin wrote: >> > On 2/26/2012 6:26 PM, Paul Gortmaker wrote: >>> >> Using the 64 bit toolchains from kernel.org[1], one finds that >>> >> you can't build the a500_defconfig, because the Makefile will >>> >> stomp whatever value you have in your env. for CROSS_COMPILE. >>> >> >>> >> This shows up since the kernel.org toolchains for parisc-64 >>> >> do not have the "-gnu" prefix, and so you run into it always >>> >> saying hppa64-linux-gnu-gcc not found, regardless of the fact >>> >> you've not got "-gnu" put anywhere into CROSS_COMPILE. >>> >> >>> >> [1]ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ >>> >> >>> >> Signed-off-by: Paul Gortmaker<paul.gortmaker@windriver.com> >>> >> >>> >> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile >>> >> index 55cca1d..cefff6d 100644 >>> >> --- a/arch/parisc/Makefile >>> >> +++ b/arch/parisc/Makefile >>> >> @@ -31,7 +31,9 @@ ifdef CONFIG_64BIT >>> >> UTS_MACHINE := parisc64 >>> >> CHECKFLAGS += -D__LP64__=1 -m64 >>> >> WIDTH := 64 >>> >> -CROSS_COMPILE := hppa64-linux-gnu- >>> >> +ifndef CROSS_COMPILE >>> >> + CROSS_COMPILE := hppa64-linux-gnu- >>> >> +endif >>> >> else # 32-bit >>> >> WIDTH := >>> >> endif >> > This change breaks native builds. So, I assume CROSS_COMPILE must be >> > previously defined. > You lost me here. As in a native 32bit env. doing a build for the > 64 bit case is setting CROSS_COMPILE? > Yes, native hppa is 32 bit . Building a 64-bit kernel with CONFIG_64BIT causes the setting of CROSS_COMPILE and the selection of hppa64-linux-gnu-gcc, etc. If CROSS_COMPILE wasn't previously defined, your change wouldn't have have affected the 64-bit build. Dave -- John David Anglin dave.anglin@bell.net ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-26 23:26 [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit Paul Gortmaker 2012-02-27 0:23 ` Mike Frysinger 2012-02-27 15:14 ` John David Anglin @ 2012-02-27 20:59 ` Paul Gortmaker 2012-02-27 21:41 ` James Bottomley 2 siblings, 1 reply; 17+ messages in thread From: Paul Gortmaker @ 2012-02-27 20:59 UTC (permalink / raw) To: JBottomley, jejb, kyle, deller Cc: vapier, dave.anglin, linux-parisc, linux-kernel, linux-next, Paul Gortmaker Using the 64 bit toolchains from kernel.org[1], one finds that you can't build the a500_defconfig, because the Makefile will stomp whatever value you have in your env. for CROSS_COMPILE. This shows up since the kernel.org toolchains for parisc-64 do not have the "-gnu" prefix, and so you run into it always saying hppa64-linux-gnu-gcc not found, regardless of the fact you've not got "-gnu" put anywhere into CROSS_COMPILE. Since you can set CROSS_COMPILE from the environment and/or set it in your .config file, there really is no need for it to be poked at by the Makefile at all. So just delete it. [1] ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- [v2: no ifdef/endif -- just delete the offending line.] diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 55cca1d..a533367 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -31,7 +31,6 @@ ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 WIDTH := 64 -CROSS_COMPILE := hppa64-linux-gnu- else # 32-bit WIDTH := endif -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-27 20:59 ` [PATCH v2] " Paul Gortmaker @ 2012-02-27 21:41 ` James Bottomley 2012-02-27 22:03 ` James Bottomley 0 siblings, 1 reply; 17+ messages in thread From: James Bottomley @ 2012-02-27 21:41 UTC (permalink / raw) To: Paul Gortmaker Cc: kyle@mcmartin.ca, deller@gmx.de, vapier@gentoo.org, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2149 bytes --] On Mon, 2012-02-27 at 15:59 -0500, Paul Gortmaker wrote: > Using the 64 bit toolchains from kernel.org[1], one finds that > you can't build the a500_defconfig, because the Makefile will > stomp whatever value you have in your env. for CROSS_COMPILE. > > This shows up since the kernel.org toolchains for parisc-64 > do not have the "-gnu" prefix, and so you run into it always > saying hppa64-linux-gnu-gcc not found, regardless of the fact > you've not got "-gnu" put anywhere into CROSS_COMPILE. > > Since you can set CROSS_COMPILE from the environment and/or set > it in your .config file, there really is no need for it to be > poked at by the Makefile at all. So just delete it. > > [1] ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > > [v2: no ifdef/endif -- just delete the offending line.] > > diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile > index 55cca1d..a533367 100644 > --- a/arch/parisc/Makefile > +++ b/arch/parisc/Makefile > @@ -31,7 +31,6 @@ ifdef CONFIG_64BIT > UTS_MACHINE := parisc64 > CHECKFLAGS += -D__LP64__=1 -m64 > WIDTH := 64 > -CROSS_COMPILE := hppa64-linux-gnu- > else # 32-bit > WIDTH := > endif We can't do that ... it crashes a standard build almost immediately because it doesn't pick the 64 bit compiler (and we have no biarch solution). We need make on a 64 bit config to work out of the box. It breaks with ?= as JDA pointed out because CROSS_COMPILE is always defined. Does this satisfy everyone? James --- diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 55cca1d..19ab7b2 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -31,7 +31,11 @@ ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 WIDTH := 64 + +# FIXME: if no default set, should really try to locate dynamically +ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := hppa64-linux-gnu- +endif else # 32-bit WIDTH := endif ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-27 21:41 ` James Bottomley @ 2012-02-27 22:03 ` James Bottomley 2012-02-28 1:04 ` Mike Frysinger 0 siblings, 1 reply; 17+ messages in thread From: James Bottomley @ 2012-02-27 22:03 UTC (permalink / raw) To: Paul Gortmaker Cc: kyle@mcmartin.ca, deller@gmx.de, vapier@gentoo.org, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3482 bytes --] On Mon, 2012-02-27 at 21:41 +0000, James Bottomley wrote: > On Mon, 2012-02-27 at 15:59 -0500, Paul Gortmaker wrote: > > Using the 64 bit toolchains from kernel.org[1], one finds that > > you can't build the a500_defconfig, because the Makefile will > > stomp whatever value you have in your env. for CROSS_COMPILE. > > > > This shows up since the kernel.org toolchains for parisc-64 > > do not have the "-gnu" prefix, and so you run into it always > > saying hppa64-linux-gnu-gcc not found, regardless of the fact > > you've not got "-gnu" put anywhere into CROSS_COMPILE. > > > > Since you can set CROSS_COMPILE from the environment and/or set > > it in your .config file, there really is no need for it to be > > poked at by the Makefile at all. So just delete it. > > > > [1] ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.2/ > > > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > > --- > > > > [v2: no ifdef/endif -- just delete the offending line.] > > > > diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile > > index 55cca1d..a533367 100644 > > --- a/arch/parisc/Makefile > > +++ b/arch/parisc/Makefile > > @@ -31,7 +31,6 @@ ifdef CONFIG_64BIT > > UTS_MACHINE := parisc64 > > CHECKFLAGS += -D__LP64__=1 -m64 > > WIDTH := 64 > > -CROSS_COMPILE := hppa64-linux-gnu- > > else # 32-bit > > WIDTH := > > endif > > We can't do that ... it crashes a standard build almost immediately > because it doesn't pick the 64 bit compiler (and we have no biarch > solution). > > We need make on a 64 bit config to work out of the box. It breaks > with ?= as JDA pointed out because CROSS_COMPILE is always defined. > Does this satisfy everyone? > > James > > --- > > diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile > index 55cca1d..19ab7b2 100644 > --- a/arch/parisc/Makefile > +++ b/arch/parisc/Makefile > @@ -31,7 +31,11 @@ ifdef CONFIG_64BIT > UTS_MACHINE := parisc64 > CHECKFLAGS += -D__LP64__=1 -m64 > WIDTH := 64 > + > +# FIXME: if no default set, should really try to locate dynamically > +ifeq ($(CROSS_COMPILE),) > CROSS_COMPILE := hppa64-linux-gnu- > +endif > else # 32-bit > WIDTH := > endif There's an awful lot more than just this wrong with that Makefile. For instance, NATIVE can never be set because ifeq() isn't globbing in make scripts ... So I think a final (and dynamically choosing if unset) solution is this one. I'll stop now before I find something else wrong ... James --- diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 55cca1d..c823f4a 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -23,24 +23,20 @@ NM = sh $(srctree)/arch/parisc/nm CHECKFLAGS += -D__hppa__=1 MACHINE := $(shell uname -m) -ifeq ($(MACHINE),parisc*) -NATIVE := 1 -endif ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 WIDTH := 64 -CROSS_COMPILE := hppa64-linux-gnu- + +# if no default set, try to find the corresponding 64 bit compiler +ifeq ($(CROSS_COMPILE),) +CROSS_COMPILE := $(shell $(CC) -dumpmachine | sed s/hppa-\\\(.*\\\)/hppa64-\\1-/) +endif else # 32-bit WIDTH := endif -# attempt to help out folks who are cross-compiling -ifeq ($(NATIVE),1) -CROSS_COMPILE := hppa$(WIDTH)-linux- -endif - OBJCOPY_FLAGS =-O binary -R .note -R .comment -S cflags-y := -pipe ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-27 22:03 ` James Bottomley @ 2012-02-28 1:04 ` Mike Frysinger 2012-02-28 3:17 ` James Bottomley 0 siblings, 1 reply; 17+ messages in thread From: Mike Frysinger @ 2012-02-28 1:04 UTC (permalink / raw) To: James Bottomley Cc: Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Attachment #1: Type: Text/Plain, Size: 532 bytes --] On Monday 27 February 2012 17:03:10 James Bottomley wrote: > --- a/arch/parisc/Makefile > +++ b/arch/parisc/Makefile > > -CROSS_COMPILE := hppa64-linux-gnu- > + > +# if no default set, try to find the corresponding 64 bit compiler > +ifeq ($(CROSS_COMPILE),) > +CROSS_COMPILE := $(shell $(CC) -dumpmachine | sed s/hppa-\\\(.*\\\)/hppa64-\\1-/) > +endif fails when using "hppa2.0-xxx". perhaps: CROSS_COMPILE ?= $(shell $(CC) -dumpmachine | sed 's/^hppa[^-]*-/hppa64-/') don't even need the ifeq check then -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-28 1:04 ` Mike Frysinger @ 2012-02-28 3:17 ` James Bottomley 2012-02-28 6:06 ` Mike Frysinger 0 siblings, 1 reply; 17+ messages in thread From: James Bottomley @ 2012-02-28 3:17 UTC (permalink / raw) To: Mike Frysinger Cc: Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 895 bytes --] On Mon, 2012-02-27 at 20:04 -0500, Mike Frysinger wrote: > On Monday 27 February 2012 17:03:10 James Bottomley wrote: > > --- a/arch/parisc/Makefile > > +++ b/arch/parisc/Makefile > > > > -CROSS_COMPILE := hppa64-linux-gnu- > > + > > +# if no default set, try to find the corresponding 64 bit compiler > > +ifeq ($(CROSS_COMPILE),) > > +CROSS_COMPILE := $(shell $(CC) -dumpmachine | sed s/hppa-\\\(.*\\\)/hppa64-\\1-/) > > +endif > > fails when using "hppa2.0-xxx". perhaps: > CROSS_COMPILE ?= $(shell $(CC) -dumpmachine | sed 's/^hppa[^-]*-/hppa64-/') > > don't even need the ifeq check then How is that different from Carlos' suggestion? The reason it doesn't work is the same ... CROSS_COMPILE is defined to be empty. James ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-28 3:17 ` James Bottomley @ 2012-02-28 6:06 ` Mike Frysinger 2012-02-28 14:10 ` James Bottomley 0 siblings, 1 reply; 17+ messages in thread From: Mike Frysinger @ 2012-02-28 6:06 UTC (permalink / raw) To: James Bottomley Cc: Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Attachment #1: Type: Text/Plain, Size: 1211 bytes --] On Monday 27 February 2012 22:17:01 James Bottomley wrote: > On Mon, 2012-02-27 at 20:04 -0500, Mike Frysinger wrote: > > On Monday 27 February 2012 17:03:10 James Bottomley wrote: > > > --- a/arch/parisc/Makefile > > > +++ b/arch/parisc/Makefile > > > > > > -CROSS_COMPILE := hppa64-linux-gnu- > > > + > > > +# if no default set, try to find the corresponding 64 bit compiler > > > +ifeq ($(CROSS_COMPILE),) > > > +CROSS_COMPILE := $(shell $(CC) -dumpmachine | sed > > > s/hppa-\\\(.*\\\)/hppa64-\\1-/) +endif > > > > fails when using "hppa2.0-xxx". perhaps: > > CROSS_COMPILE ?= $(shell $(CC) -dumpmachine | sed > > 's/^hppa[^-]*-/hppa64-/') > > > > don't even need the ifeq check then > > How is that different from Carlos' suggestion? sorry, but i'm not seeing any e-mails from Carlos in this thread. what is his suggestion ? > The reason it doesn't work is the same ... CROSS_COMPILE is defined to be > empty. my suggestion was purely an incremental improvement on the patch you posted. it improves two things: - detection when the default tuple is hppa2.0-xxx rather than hppa-xxx - one line for set-variable-only-when-its-unset rather than three lines -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-28 6:06 ` Mike Frysinger @ 2012-02-28 14:10 ` James Bottomley 2012-02-28 15:21 ` Mike Frysinger 0 siblings, 1 reply; 17+ messages in thread From: James Bottomley @ 2012-02-28 14:10 UTC (permalink / raw) To: Mike Frysinger Cc: Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org On Tue, 2012-02-28 at 01:06 -0500, Mike Frysinger wrote: > On Monday 27 February 2012 22:17:01 James Bottomley wrote: > > On Mon, 2012-02-27 at 20:04 -0500, Mike Frysinger wrote: > > > On Monday 27 February 2012 17:03:10 James Bottomley wrote: > > > > --- a/arch/parisc/Makefile > > > > +++ b/arch/parisc/Makefile > > > > > > > > -CROSS_COMPILE := hppa64-linux-gnu- > > > > + > > > > +# if no default set, try to find the corresponding 64 bit compiler > > > > +ifeq ($(CROSS_COMPILE),) > > > > +CROSS_COMPILE := $(shell $(CC) -dumpmachine | sed > > > > s/hppa-\\\(.*\\\)/hppa64-\\1-/) +endif > > > > > > fails when using "hppa2.0-xxx". perhaps: Is that a valid prefix? I was thinking hppa32 might be, but hppa2.0 is supposed to be hppa-xxx with -mpa-risc-2-0. But anyway, I think being clever and removing unused stuff is likely orthogonal to the first patch which is just making it all work. > > > CROSS_COMPILE ?= $(shell $(CC) -dumpmachine | sed > > > 's/^hppa[^-]*-/hppa64-/') > > > > > > don't even need the ifeq check then > > > > How is that different from Carlos' suggestion? > > sorry, but i'm not seeing any e-mails from Carlos in this thread. what is his > suggestion ? Actually, I misspoke, it was your suggestion in the first thread. > > The reason it doesn't work is the same ... CROSS_COMPILE is defined to be > > empty. > > my suggestion was purely an incremental improvement on the patch you posted. > it improves two things: > - detection when the default tuple is hppa2.0-xxx rather than hppa-xxx > - one line for set-variable-only-when-its-unset rather than three lines > -mike It can't be done ... defined but empty is different from not defined in makefiles (ifdef or ?= only checks for not defined). CROSS_COMPILE gets automatically defined by the top level Makefile ... that's why we need a check for empty not a check for not defined. James ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-28 14:10 ` James Bottomley @ 2012-02-28 15:21 ` Mike Frysinger 2012-02-28 15:33 ` John David Anglin 0 siblings, 1 reply; 17+ messages in thread From: Mike Frysinger @ 2012-02-28 15:21 UTC (permalink / raw) To: James Bottomley Cc: Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, dave.anglin@bell.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Attachment #1: Type: Text/Plain, Size: 2230 bytes --] On Tuesday 28 February 2012 09:10:45 James Bottomley wrote: > On Tue, 2012-02-28 at 01:06 -0500, Mike Frysinger wrote: > > On Monday 27 February 2012 22:17:01 James Bottomley wrote: > > > On Mon, 2012-02-27 at 20:04 -0500, Mike Frysinger wrote: > > > > On Monday 27 February 2012 17:03:10 James Bottomley wrote: > > > > > --- a/arch/parisc/Makefile > > > > > +++ b/arch/parisc/Makefile > > > > > > > > > > -CROSS_COMPILE := hppa64-linux-gnu- > > > > > + > > > > > +# if no default set, try to find the corresponding 64 bit compiler > > > > > +ifeq ($(CROSS_COMPILE),) > > > > > +CROSS_COMPILE := $(shell $(CC) -dumpmachine | sed > > > > > s/hppa-\\\(.*\\\)/hppa64-\\1-/) +endif > > > > > > > > fails when using "hppa2.0-xxx". perhaps: > > Is that a valid prefix? I was thinking hppa32 might be, but hppa2.0 is > supposed to be hppa-xxx with -mpa-risc-2-0. we've been using hppa2.0 for years. gnuconfig certainly recognizes it: $ grep hppa /usr/share/gnuconfig/config.sub | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ and i've seen diff projects key off of the hppa2.0* to enable newer features by default. > But anyway, I think being clever and removing unused stuff is likely > orthogonal to the first patch which is just making it all work. sure, but your new patch added the sed :) > > > The reason it doesn't work is the same ... CROSS_COMPILE is defined to > > > be empty. > > > > my suggestion was purely an incremental improvement on the patch you > > posted. > > > > it improves two things: > > - detection when the default tuple is hppa2.0-xxx rather than hppa-xxx > > - one line for set-variable-only-when-its-unset rather than three lines > > It can't be done ... defined but empty is different from not defined in > makefiles (ifdef or ?= only checks for not defined). CROSS_COMPILE gets > automatically defined by the top level Makefile ... that's why we need a > check for empty not a check for not defined. yeah, OK ... this behavior changed from what i was remembering. ?= used to work until the top level Makefile was improved. -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-28 15:21 ` Mike Frysinger @ 2012-02-28 15:33 ` John David Anglin [not found] ` <CANEJEGv2Zgtd8TGOzSNO8opMLQT8RsGRP=m2rBPUBBOJ9f+fKQ@mail.gmail.com> 0 siblings, 1 reply; 17+ messages in thread From: John David Anglin @ 2012-02-28 15:33 UTC (permalink / raw) To: Mike Frysinger Cc: James Bottomley, Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org On 2/28/2012 10:21 AM, Mike Frysinger wrote: > we've been using hppa2.0 for years. gnuconfig certainly recognizes it: > $ grep hppa /usr/share/gnuconfig/config.sub > | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ > | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ > > and i've seen diff projects key off of the hppa2.0* to enable newer features by > default. Some of the above are specific to HP-UX, but hppa1.1, hppa2.0, hppa and hppa64 are valid for Linux based on config.guess. Dave -- John David Anglin dave.anglin@bell.net ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <CANEJEGv2Zgtd8TGOzSNO8opMLQT8RsGRP=m2rBPUBBOJ9f+fKQ@mail.gmail.com>]
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. [not found] ` <CANEJEGv2Zgtd8TGOzSNO8opMLQT8RsGRP=m2rBPUBBOJ9f+fKQ@mail.gmail.com> @ 2012-02-28 18:37 ` Mike Frysinger 2012-02-28 19:54 ` Sam Ravnborg 0 siblings, 1 reply; 17+ messages in thread From: Mike Frysinger @ 2012-02-28 18:37 UTC (permalink / raw) To: Grant Grundler Cc: John David Anglin, James Bottomley, Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org [-- Attachment #1: Type: Text/Plain, Size: 1477 bytes --] On Tuesday 28 February 2012 13:22:50 Grant Grundler wrote: > On Tue, Feb 28, 2012 at 7:33 AM, John David Anglin wrote: > > On 2/28/2012 10:21 AM, Mike Frysinger wrote: > >> we've been using hppa2.0 for years. gnuconfig certainly recognizes it: > >> $ grep hppa /usr/share/gnuconfig/config.**sub > >> > >> | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | > >> > >> hppa64 \ > >> > >> | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ > >> > >> and i've seen diff projects key off of the hppa2.0* to enable newer > >> features by > >> default. > > > > Some of the above are specific to HP-UX, but hppa1.1, hppa2.0, hppa and > > hppa64 are > > valid for Linux based on config.guess. > > Mike, et al, > I'd suggest NOT using hppa2.0 as a surrogate for 64-bit build. I'd prefer > hppa64 if 64-bit is meant. > > hppa2.0 can also mean PA2.0 compliant binary compiled using ILP32 model. > right? i don't think that's what the proposed change does. James' patch runs $(CC) to find the active tuple, then replaces the first part with "hppa64" to get a 64bit toolchain automatically. but that magic only works when the tuple is "hppa-xxx" and so will fail when the system is using "hppa2.0-xxx". short story: the proposed change will additionally support turning "hppa2.0- linux-gnu" into "hppa64-linux-gnu" rather than the existing "only turns hppa- linux-gnu" into "hppa64-linux-gnu". -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2] parisc: dont unconditionally override CROSS_COMPILE for 64 bit. 2012-02-28 18:37 ` Mike Frysinger @ 2012-02-28 19:54 ` Sam Ravnborg 0 siblings, 0 replies; 17+ messages in thread From: Sam Ravnborg @ 2012-02-28 19:54 UTC (permalink / raw) To: Mike Frysinger Cc: Grant Grundler, John David Anglin, James Bottomley, Paul Gortmaker, kyle@mcmartin.ca, deller@gmx.de, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org On Tue, Feb 28, 2012 at 01:37:10PM -0500, Mike Frysinger wrote: > On Tuesday 28 February 2012 13:22:50 Grant Grundler wrote: > > On Tue, Feb 28, 2012 at 7:33 AM, John David Anglin wrote: > > > On 2/28/2012 10:21 AM, Mike Frysinger wrote: > > >> we've been using hppa2.0 for years. gnuconfig certainly recognizes it: > > >> $ grep hppa /usr/share/gnuconfig/config.**sub > > >> > > >> | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | > > >> > > >> hppa64 \ > > >> > > >> | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ > > >> > > >> and i've seen diff projects key off of the hppa2.0* to enable newer > > >> features by > > >> default. > > > > > > Some of the above are specific to HP-UX, but hppa1.1, hppa2.0, hppa and > > > hppa64 are > > > valid for Linux based on config.guess. > > > > Mike, et al, > > I'd suggest NOT using hppa2.0 as a surrogate for 64-bit build. I'd prefer > > hppa64 if 64-bit is meant. > > > > hppa2.0 can also mean PA2.0 compliant binary compiled using ILP32 model. > > right? > > i don't think that's what the proposed change does. James' patch runs $(CC) > to find the active tuple, then replaces the first part with "hppa64" to get a > 64bit toolchain automatically. but that magic only works when the tuple is > "hppa-xxx" and so will fail when the system is using "hppa2.0-xxx". > > short story: the proposed change will additionally support turning "hppa2.0- > linux-gnu" into "hppa64-linux-gnu" rather than the existing "only turns hppa- > linux-gnu" into "hppa64-linux-gnu". There is a small helper: cc-cross-prefix Which may be used ifyou have two or mroe candidated for CROSS_COMPILE. >From mips: CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-linux-gnu- $(tool-archpref)-unknown-linux-gnu-) Dunno if this would help parisc in this case.. Sam ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2012-02-28 19:54 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-26 23:26 [PATCH] parisc: dont unconditionally override CROSS_COMPILE for 64 bit Paul Gortmaker 2012-02-27 0:23 ` Mike Frysinger 2012-02-27 0:30 ` Paul Gortmaker 2012-02-27 15:14 ` John David Anglin 2012-02-27 16:28 ` Paul Gortmaker 2012-02-27 16:45 ` John David Anglin 2012-02-27 20:59 ` [PATCH v2] " Paul Gortmaker 2012-02-27 21:41 ` James Bottomley 2012-02-27 22:03 ` James Bottomley 2012-02-28 1:04 ` Mike Frysinger 2012-02-28 3:17 ` James Bottomley 2012-02-28 6:06 ` Mike Frysinger 2012-02-28 14:10 ` James Bottomley 2012-02-28 15:21 ` Mike Frysinger 2012-02-28 15:33 ` John David Anglin [not found] ` <CANEJEGv2Zgtd8TGOzSNO8opMLQT8RsGRP=m2rBPUBBOJ9f+fKQ@mail.gmail.com> 2012-02-28 18:37 ` Mike Frysinger 2012-02-28 19:54 ` Sam Ravnborg
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 NNTP newsgroup(s).