Skip to contentSkip to conversation

parisc: fix NATIVE set up in build

PATCH In review Mike Frysinger 3 participants 4 messages May 4, 2013 – May 9, 2013 PA-RISC architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parisc: fix NATIVE set up in build

The ifeq operator does not accept globs, so this little bit of code will never match (unless uname literally prints out "parsic*"). Rewrite to use a pattern matching operator so that NATIVE is set to 1 on parisc.

---
 arch/parisc/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/parisc/Makefile +1 -3
index 113e282..2f967cc 100644
@@ -24,9 +24,7 @@ CHECKFLAGS	+= -D__hppa__=1
 LIBGCC		= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
 MACHINE		:= $(shell uname -m)
-ifeq ($(MACHINE),parisc*)
-NATIVE		:= 1
-endif
+NATIVE		:= $(if $(filter parisc%,$(MACHINE)),1,0)
 
 ifdef CONFIG_64BIT
 UTS_MACHINE	:= parisc64
Signature · 1 line
1.8.2.1
#1 lore raw

Am 04.05.2013 18:50, schrieb Mike Frysinger:

Quoted 2 lines

The ifeq operator does not accept globs, so this little bit of code will never match (unless uname literally prints out "parsic*"). Rewrite to

                                                  ^^^^^^

That would never match ;)

Eike

#2 lore raw
In reply to Mike Frysinger

This patch breaks builds on current Debian systems that want compiler prefixes like hppa64-linux-gnu-", "hppa-linux-gnu-" or no prefix for native 32-bit. The NATIVE match previous failed and we got the correct FSF prefix.

Dave

Quoted 22 lines · Mike Frysinger

The ifeq operator does not accept globs, so this little bit of code will never match (unless uname literally prints out "parsic*"). Rewrite to use a pattern matching operator so that NATIVE is set to 1 on parisc.

---
arch/parisc/Makefile | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)
arch/parisc/Makefile +1 -3
index 113e282..2f967cc 100644
@@ -24,9 +24,7 @@ CHECKFLAGS	+= -D__hppa__=1
 LIBGCC		= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
 MACHINE		:= $(shell uname -m)
-ifeq ($(MACHINE),parisc*)
-NATIVE		:= 1
-endif
+NATIVE		:= $(if $(filter parisc%,$(MACHINE)),1,0)
 
Quoted 10 lines

ifdef CONFIG_64BIT
UTS_MACHINE := parisc64

Signature · 6 lines
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
John David Anglin [email protected]

#3 lore raw
Quoted 5 lines · On Tuesday 07 May 2013 19:24:04 John David Anglin wrote:

This patch breaks builds on current Debian systems that want compiler prefixes
like hppa64-linux-gnu-", "hppa-linux-gnu-" or no prefix for native 32- bit. The NATIVE
match previous failed and we got the correct FSF prefix.

that was the intention of the code
-mike