aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@neptun.(none)>2007-10-14 16:21:35 -0400
committerSam Ravnborg <sam@neptun.(none)>2007-10-14 16:21:35 -0400
commita0f97e06a43cf524e616f09e6af3398e1e9c1c5b (patch)
tree2503b24bdbc144aea9ea5bde6ead94b3406eaf98 /arch/frv/Makefile
parent9a39e273d4df0560c724c5fe71f6314a0583ca2b (diff)
kbuild: enable 'make CFLAGS=...' to add additional options to CC
The variable CFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of CFLAGS with KBUILD_CFLAGS all over the tree and enabling one to use: make CFLAGS=... to specify additional gcc commandline options. One usecase is when trying to find gcc bugs but other use cases has been requested too. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k Test was simple to do a defconfig build, apply the patch and check that nothing got rebuild. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/frv/Makefile')
-rw-r--r--arch/frv/Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 9bf7345c5cc9..ec89886ed455 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -39,13 +39,13 @@ endif
39ARCHMODFLAGS += -G0 -mlong-calls 39ARCHMODFLAGS += -G0 -mlong-calls
40 40
41ifdef CONFIG_GPREL_DATA_8 41ifdef CONFIG_GPREL_DATA_8
42CFLAGS += -G8 42KBUILD_CFLAGS += -G8
43else 43else
44ifdef CONFIG_GPREL_DATA_4 44ifdef CONFIG_GPREL_DATA_4
45CFLAGS += -G4 45KBUILD_CFLAGS += -G4
46else 46else
47ifdef CONFIG_GPREL_DATA_NONE 47ifdef CONFIG_GPREL_DATA_NONE
48CFLAGS += -G0 48KBUILD_CFLAGS += -G0
49endif 49endif
50endif 50endif
51endif 51endif
@@ -53,25 +53,25 @@ endif
53#LDFLAGS_vmlinux := -Map linkmap.txt 53#LDFLAGS_vmlinux := -Map linkmap.txt
54 54
55ifdef CONFIG_GC_SECTIONS 55ifdef CONFIG_GC_SECTIONS
56CFLAGS += -ffunction-sections -fdata-sections 56KBUILD_CFLAGS += -ffunction-sections -fdata-sections
57LINKFLAGS += --gc-sections 57LINKFLAGS += --gc-sections
58endif 58endif
59 59
60ifndef CONFIG_FRAME_POINTER 60ifndef CONFIG_FRAME_POINTER
61CFLAGS += -mno-linked-fp 61KBUILD_CFLAGS += -mno-linked-fp
62endif 62endif
63 63
64ifdef CONFIG_CPU_FR451_COMPILE 64ifdef CONFIG_CPU_FR451_COMPILE
65CFLAGS += -mcpu=fr450 65KBUILD_CFLAGS += -mcpu=fr450
66AFLAGS += -mcpu=fr450 66AFLAGS += -mcpu=fr450
67ASFLAGS += -mcpu=fr450 67ASFLAGS += -mcpu=fr450
68else 68else
69ifdef CONFIG_CPU_FR551_COMPILE 69ifdef CONFIG_CPU_FR551_COMPILE
70CFLAGS += -mcpu=fr550 70KBUILD_CFLAGS += -mcpu=fr550
71AFLAGS += -mcpu=fr550 71AFLAGS += -mcpu=fr550
72ASFLAGS += -mcpu=fr550 72ASFLAGS += -mcpu=fr550
73else 73else
74CFLAGS += -mcpu=fr400 74KBUILD_CFLAGS += -mcpu=fr400
75AFLAGS += -mcpu=fr400 75AFLAGS += -mcpu=fr400
76ASFLAGS += -mcpu=fr400 76ASFLAGS += -mcpu=fr400
77endif 77endif
@@ -80,15 +80,15 @@ endif
80# pretend the kernel is going to run on an FR400 with no media-fp unit 80# pretend the kernel is going to run on an FR400 with no media-fp unit
81# - reserve CC3 for use with atomic ops 81# - reserve CC3 for use with atomic ops
82# - all the extra registers are dealt with only at context switch time 82# - all the extra registers are dealt with only at context switch time
83CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media 83KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
84CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 84KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
85AFLAGS += -mno-fdpic 85AFLAGS += -mno-fdpic
86ASFLAGS += -mno-fdpic 86ASFLAGS += -mno-fdpic
87 87
88# make sure the .S files get compiled with debug info 88# make sure the .S files get compiled with debug info
89# and disable optimisations that are unhelpful whilst debugging 89# and disable optimisations that are unhelpful whilst debugging
90ifdef CONFIG_DEBUG_INFO 90ifdef CONFIG_DEBUG_INFO
91#CFLAGS += -O1 91#KBUILD_CFLAGS += -O1
92AFLAGS += -Wa,--gdwarf2 92AFLAGS += -Wa,--gdwarf2
93ASFLAGS += -Wa,--gdwarf2 93ASFLAGS += -Wa,--gdwarf2
94endif 94endif