From 375d43ee190a01d034cdff0c4a3e5dfa94886529 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sat, 22 Feb 2003 01:20:46 -0800 Subject: [PATCH] [PATCH] Alpha CFLAGS fix 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 | 2 +- arch/alpha/lib/Makefile | 2 +- arch/alpha/math-emu/Makefile | 2 +- arch/alpha/mm/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile index 0077e49009ecf..dd960e15b3575 100644 --- a/arch/alpha/kernel/Makefile +++ b/arch/alpha/kernel/Makefile @@ -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 \ diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index 8e0e2a128e9e6..dd5717a272978 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile @@ -3,7 +3,7 @@ # EXTRA_AFLAGS := $(CFLAGS) -CFLAGS += -Werror +EXTRA_CFLAGS := -Werror L_TARGET := lib.a diff --git a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile index dd59ab12c9463..8bf301404ecbe 100644 --- a/arch/alpha/math-emu/Makefile +++ b/arch/alpha/math-emu/Makefile @@ -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 diff --git a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile index 8c01db38753cb..6edd9a09ea4fd 100644 --- a/arch/alpha/mm/Makefile +++ b/arch/alpha/mm/Makefile @@ -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 -- 2.53.0