Skip to contentSkip to conversation

parisc: autoselect 32/64bit compiler

PATCH In review Helge Deller 1 participant 2 messages Feb 16, 2009 – Feb 17, 2009 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc: autoselect 32/64bit compiler

Automatically select correct 32- or 64bit (cross) compiler, independent if the kernel is built locally (e.g. 64bit kernel target on 32bit userspace) or cross-compiled from another architecture. This patch allows one to just run
make ARCH=parisc when run as cross compiler, or just
make when run locally.

arch/parisc/Makefile +0 -8
index da6f669..9d0bd90 100644
@@ -22,23 +22,12 @@ KBUILD_DEFCONFIG := default_defconfig
 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-
 else # 32-bit
-WIDTH		:=
-endif
author maintainer
#1 lore raw
Quoted 8 lines · Helge Deller

Automatically select correct 32- or 64bit (cross) compiler, independent if the kernel is built locally (e.g. 64bit kernel target on 32bit userspace) or cross-compiled from another architecture. This patch allows one to just run
make ARCH=parisc when run as cross compiler, or just
make when run locally.

Just ignore/drop this patch.
Although IMHO the idea is good, it breaks if people name their (cross-)compiler "hppa-linux-gcc" instead of "hppa-linux-gnu-gcc".

Helge

Quoted 30 lines
arch/parisc/Makefile +1 -12
index da6f669..9d0bd90 100644
@@ -22,23 +22,12 @@ KBUILD_DEFCONFIG := default_defconfig
 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-
 else # 32-bit
-WIDTH		:=
-endif
-
-# attempt to help out folks who are cross-compiling
-ifeq ($(NATIVE),1)
-CROSS_COMPILE	:= hppa$(WIDTH)-linux-
+CROSS_COMPILE	:= hppa-linux-gnu-
 endif
 
 OBJCOPY_FLAGS =-O binary -R .note -R .comment -S