]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Alpha CFLAGS fix
authorSam Ravnborg <sam@ravnborg.org>
Sat, 22 Feb 2003 09:20:46 +0000 (01:20 -0800)
committerRichard Henderson <rth@kanga.twiddle.net>
Sat, 22 Feb 2003 09:20:46 +0000 (01:20 -0800)
Hi Richard.

I noticed you have set -Werror in all alpha architecture
specific makefiles - good initiative. I wish we could do that in general.

But the correct way to alter CFLAGS in kbuild makefiles is to use
EXTRA_CFLAGS.
The following patch fixes this.
You could argue that this is a stylistic issue, but in this way
you follow Documentation/kbuild/makefiles.txt

I stumbled over:
EXTRA_AFLAGS := $(CFLAGS)
I could not realise the purpose with this assignment, and I noticed
that it did not include -Werror, becuse you did hat assignment in
the following line.
Wanted to inform you about it but I see no problem. It is just that
I did not understand it.

In math-emu I see this:
EXTRA_CFLAGS := -Iinclude/math-emu -w
Grepping the src I see no reason to have the -Iinclude/math-emu
Relevant files are prefixed with math-emu (soft-fp, single, double)
I did not fix it, because I cannot compile alpha.

Sam (the Makefile nitpicker)

===== arch/alpha/kernel/Makefile 1.24 vs edited =====

arch/alpha/kernel/Makefile
arch/alpha/lib/Makefile
arch/alpha/math-emu/Makefile
arch/alpha/mm/Makefile

index 0077e49009ecf49a13fa87672419d2afc5a3e5b5..dd960e15b3575051aa6bb6b36cd94079d3fcadb6 100644 (file)
@@ -4,7 +4,7 @@
 
 EXTRA_TARGETS  := head.o
 EXTRA_AFLAGS   := $(CFLAGS)
-CFLAGS         += -Werror -Wno-sign-compare
+EXTRA_CFLAGS   := -Werror -Wno-sign-compare
 
 obj-y    := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
            irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \
index 8e0e2a128e9e63fe9c8a14aab4bdaa8c6935c944..dd5717a27297898512793b5fb8e3587f75d6f182 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 EXTRA_AFLAGS := $(CFLAGS)
-CFLAGS += -Werror
+EXTRA_CFLAGS := -Werror
 
 L_TARGET := lib.a
 
index dd59ab12c946319d6e76c5528f524c281ee09659..8bf301404ecbe2ba683579f50850493099da7242 100644 (file)
@@ -2,6 +2,6 @@
 # Makefile for the FPU instruction emulation.
 #
 
-CFLAGS += -Iinclude/math-emu -w
+EXTRA_CFLAGS := -Iinclude/math-emu -w
 
 obj-$(CONFIG_MATHEMU) += math.o qrnnd.o
index 8c01db38753cb6d2de23ab90fa355c71c08250f6..6edd9a09ea4fdcd3c267c16a9cf9a2deffb11b6d 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux alpha-specific parts of the memory manager.
 #
 
-CFLAGS += -Werror
+EXTRA_CFLAGS := -Werror
 
 obj-y  := init.o fault.o extable.o remap.o