Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / parisc / Makefile
index 17ecb61..9b7e424 100644 (file)
 # Mike Shaver, Helge Deller and Martin K. Petersen
 #
 NM             = sh $(srctree)/arch/parisc/nm
-ifdef CONFIG_PARISC64
-CROSS_COMPILE  := hppa64-linux-
+CHECKFLAGS     += -D__hppa__=1
+
+ifdef CONFIG_64BIT
+CROSS_COMPILE  := $(shell if [ -x /usr/bin/hppa64-linux-gnu-gcc ]; then \
+                       echo hppa64-linux-gnu-; else echo hppa64-linux-; fi)
 UTS_MACHINE    := parisc64
+CHECKFLAGS     += -D__LP64__=1 -m64
 else
 MACHINE := $(subst 64,,$(shell uname -m))
 ifneq ($(MACHINE),parisc)
@@ -31,6 +35,14 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
 
 OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
 
+GCC_VERSION     := $(call cc-version)
+ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
+$(error Sorry, couldn't find ($(cc-version)).)
+endif
+ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
+$(error Sorry, your compiler is too old ($(GCC_VERSION)).  GCC v3.3 or above is required.)
+endif
+
 cflags-y       := -pipe
 
 # These flags should be implied by an hppa-linux configuration, but they
@@ -40,7 +52,7 @@ cflags-y      += -mno-space-regs -mfast-indirect-calls
 # Currently we save and restore fpregs on all kernel entry/interruption paths.
 # If that gets optimized, we might need to disable the use of fpregs in the
 # kernel.
-#cflags-y      += -mdisable-fpregs
+cflags-y       += -mdisable-fpregs
 
 # Without this, "ld -r" results in .text sections that are too big
 # (> 0x40000) for branches to reach stubs.
@@ -65,8 +77,12 @@ libs-y       += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
 
 drivers-$(CONFIG_OPROFILE)             += arch/parisc/oprofile/
 
+PALO := $(shell if which palo; then : ; \
+       elif [ -x /sbin/palo ]; then echo /sbin/palo; \
+       fi)
+
 palo: vmlinux
-       @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \
+       @if [ -x $PALO ]; then \
                echo 'ERROR: Please install palo first (apt-get install palo)';\
                echo 'or build it from source and install it somewhere in your $$PATH';\
                false; \
@@ -78,7 +94,7 @@ palo: vmlinux
                echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
                false; \
        fi
-       palo -f ./palo.conf
+       $(PALO) -f ./palo.conf
 
 oldpalo: vmlinux
        export TOPDIR=`pwd`; \
@@ -93,15 +109,7 @@ kernel_install: vmlinux
 
 install: kernel_install modules_install
 
-prepare: include/asm-parisc/offsets.h
-
-arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/config/MARKER
-
-include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
-
-CLEAN_FILES    += lifimage include/asm-parisc/offsets.h
+CLEAN_FILES    += lifimage
 MRPROPER_FILES += palo.conf
 
 define archhelp