parisc: autoselect 32/64bit compiler
Helge Deller
maintainerPATCH 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
@@ -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
Helge Deller
maintainerQuoted 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.Signed-off-by Helge Deller <[email protected]>
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@@ -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