public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] 2.4.0-test5-pre4 patch for IA64 make
@ 2000-07-25 22:57 Keith Owens
  2000-07-25 23:16 ` Jim Wilson
  2000-08-11  2:50 ` Jim Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Owens @ 2000-07-25 22:57 UTC (permalink / raw)
  To: linux-ia64

Linus, please apply.  It has been run past the linux-kbuild group.

The IA64 port needs a compile option (-mconstant-gp) turned on for the
kernel but turned off for modules.  gcc only supports the option, not
its negation, -mno-constant-gp is not valid.

This patch against 2.4.0-test5-pre4 splits CFLAGS into common flags
(CFLAGS), flags for kernel only (CFLAGS_KERNEL) and flags for modules
only (the existing MODFLAGS).  Eventually MODFLAGS should be renamed to
CFLAGS_MODULE for consistency but the kbuild group thinks it is too
close to 2.4 to do that now.

Index: 0-test5-pre4.1/arch/ia64/Makefile
--- 0-test5-pre4.1/arch/ia64/Makefile Tue, 18 Jul 2000 13:40:10 +1000 kaos (linux-2.4/c/c/43_Makefile 1.3 644)
+++ 0-test5-pre4.2(w)/arch/ia64/Makefile Wed, 26 Jul 2000 08:52:23 +1000 kaos (linux-2.4/c/c/43_Makefile 1.3 644)
@@ -18,7 +18,8 @@
 EXTRA	 
 CFLAGS := $(CFLAGS) -pipe $(EXTRA) -Wa,-x -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 \
-	  -mconstant-gp -funwind-tables
+	  -funwind-tables
+CFLAGS_KERNEL := -mconstant-gp
 
 ifdef CONFIG_IA64_GENERIC
 	CORE_FILES      :=      arch/$(ARCH)/hp/hp.a	\
Index: 0-test5-pre4.1/Makefile
--- 0-test5-pre4.1/Makefile Wed, 19 Jul 2000 17:53:13 +1000 kaos (linux-2.4/B/c/27_Makefile 1.1.2.2.2.4.1.5 644)
+++ 0-test5-pre4.2(w)/Makefile Wed, 26 Jul 2000 08:53:28 +1000 kaos (linux-2.4/B/c/27_Makefile 1.1.2.2.2.6.1.2 644)
@@ -36,6 +36,7 @@
 MAKEFILES	= $(TOPDIR)/.config
 GENKSYMS	= /sbin/genksyms
 MODFLAGS	= -DMODULE
+CFLAGS_KERNEL	 PERL		= perl
 
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
@@ -190,7 +191,7 @@
 	@rm -f include/linux/compile.h
 
 boot: vmlinux
-	@$(MAKE) -C arch/$(ARCH)/boot
+	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
 
 vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
 	$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
@@ -231,7 +232,7 @@
 linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
 
 $(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
-	$(MAKE) -C $(patsubst _dir_%, %, $@)
+	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
 
 $(TOPDIR)/include/linux/version.h: include/linux/version.h
 $(TOPDIR)/include/linux/compile.h: include/linux/compile.h
@@ -268,13 +269,13 @@
 	@mv -f .ver $@
 
 init/version.o: init/version.c include/linux/compile.h include/config/MARKER
-	$(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
+	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
 
 init/main.o: init/main.c include/config/MARKER
-	$(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
+	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $<
 
 fs lib mm ipc kernel drivers net: dummy
-	$(MAKE) $(subst $@, _dir_$@, $@)
+	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
 
 TAGS: dummy
 	etags `find include/asm-$(ARCH) -name '*.h'`




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-11  2:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-25 22:57 [Linux-ia64] 2.4.0-test5-pre4 patch for IA64 make Keith Owens
2000-07-25 23:16 ` Jim Wilson
2000-08-11  2:50 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox