[parisc-linux-cvs] CPU selection
Matthew Wilcox
willy@ldl.fc.hp.com
Fri, 23 Feb 2001 08:53:17 -0700
Allow the user to select which processor to compile for.
Index: arch/parisc/Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile 2001/01/28 04:16:38 1.20
+++ Makefile 2001/02/23 15:37:53
@@ -17,7 +17,7 @@
# Mike Shaver, Helge Deller and Martin K. Petersen
#
-CROSS_COMPILE = hppa-linux-
+CROSS_COMPILE := hppa-linux-
FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
@@ -34,12 +34,28 @@ CFLAGS := $(CFLAGS) -D__linux__ $(CFLAGS
# enable them by default.
CFLAGS += -mno-space-regs -mfast-indirect-calls
-# If we become able to compile for specific platforms, this should be
-# conditional on that.
-CFLAGS += -mschedule=7200
-
# No fixed-point multiply
CFLAGS += -mdisable-fpregs
+
+# select which processor to optimise for
+ifdef CONFIG_PA7100
+CFLAGS += -march=1.1 -mschedule=7100
+endif
+
+ifdef CONFIG_PA7200
+CFLAGS += -march=1.1 -mschedule=7200
+endif
+
+ifdef CONFIG_PA7100LC
+CFLAGS += -march=1.1 -mschedule=7100LC
+endif
+
+ifdef CONFIG_PA8X00
+CFLAGS += -march=2.0 -mschedule=8000
+ ifdef CONFIG_PARISC64
+ CROSS_COMPILE := hppa64-linux-
+ endif
+endif
ASFLAGS := -D__ASSEMBLY__ -traditional
Index: arch/parisc/config.common
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/config.common,v
retrieving revision 1.3
diff -u -p -r1.3 config.common
--- config.common 2001/02/18 22:03:26 1.3
+++ config.common 2001/02/23 15:37:53
@@ -16,11 +16,26 @@ endmenu
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
-if [ "$CONFIG_MODULES" = "y" ]; then
+if [ "$CONFIG_MODULES" = "y" ] ; then
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
bool 'Kernel module loader' CONFIG_KMOD
fi
endmenu
+
+mainmenu_option next_comment
+comment 'Processor type'
+choice 'Processor family' \
+ "PA7000/PA7100 CONFIG_PA7100 \
+ PA7200 CONFIG_PA7200 \
+ PA7100LC/PA7300LC CONFIG_PA7100LC \
+ PA8x00 CONFIG_PA8X00" PA7000
+
+if [ "$CONFIG_PA8X00" = "y" ] ; then
+ define_bool CONFIG_PA20 y
+ bool '64-bit kernel' CONFIG_PARISC64 n
+else
+ define_bool CONFIG_PA11 y
+fi
mainmenu_option next_comment
comment 'General options'