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>
Showing
- arch/powerpc/Makefile 12 additions, 12 deletionsarch/powerpc/Makefile
- arch/ppc/Makefile 5 additions, 5 deletionsarch/ppc/Makefile
- arch/s390/Makefile 4 additions, 4 deletionsarch/s390/Makefile
- arch/sh/Makefile 2 additions, 2 deletionsarch/sh/Makefile
- arch/sh/boot/compressed/Makefile 1 addition, 1 deletionarch/sh/boot/compressed/Makefile
- arch/sh64/Makefile 2 additions, 2 deletionsarch/sh64/Makefile
- arch/sparc/Makefile 3 additions, 3 deletionsarch/sparc/Makefile
- arch/sparc64/Makefile 3 additions, 3 deletionsarch/sparc64/Makefile
- arch/um/Makefile 5 additions, 5 deletionsarch/um/Makefile
- arch/um/Makefile-i386 2 additions, 2 deletionsarch/um/Makefile-i386
- arch/um/Makefile-os-Linux 1 addition, 1 deletionarch/um/Makefile-os-Linux
- arch/um/Makefile-x86_64 1 addition, 1 deletionarch/um/Makefile-x86_64
- arch/um/drivers/Makefile 1 addition, 1 deletionarch/um/drivers/Makefile
- arch/um/sys-i386/Makefile 1 addition, 1 deletionarch/um/sys-i386/Makefile
- arch/um/sys-x86_64/Makefile 1 addition, 1 deletionarch/um/sys-x86_64/Makefile
- arch/v850/Makefile 4 additions, 4 deletionsarch/v850/Makefile
- arch/x86/boot/Makefile 2 additions, 2 deletionsarch/x86/boot/Makefile
- arch/x86/boot/compressed/Makefile_32 1 addition, 1 deletionarch/x86/boot/compressed/Makefile_32
- arch/x86/boot/compressed/Makefile_64 2 additions, 2 deletionsarch/x86/boot/compressed/Makefile_64
- arch/x86/vdso/Makefile 2 additions, 2 deletionsarch/x86/vdso/Makefile
Loading
Please register or sign in to comment