Commit 821f3eff authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
  kbuild: introduce ccflags-y, asflags-y and ldflags-y
  kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
  kbuild: enable use of AFLAGS and CFLAGS on commandline
  kbuild: enable 'make AFLAGS=...' to add additional options to AS
  kbuild: fix AFLAGS use in h8300 and m68knommu
  kbuild: check for wrong use of CFLAGS
  kbuild: enable 'make CFLAGS=...' to add additional options to CC
  kbuild: fix up CFLAGS usage
  kbuild: make modpost detect unterminated device id lists
  kbuild: call export_report from the Makefile
  kbuild: move Kai Germaschewski to CREDITS
  kconfig/menuconfig: distinguish between selected-by-another options and comments
  kconfig: tristate choices with mixed tristate and boolean values
  include/linux/Kbuild: remove duplicate entries
  kbuild: kill backward compatibility checks
  kbuild: kill EXTRA_ARFLAGS
  kbuild: fix documentation in makefiles.txt
  kbuild: call make once for all targets when O=.. is used
  kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
  kbuild: update _shipped files for kconfig syntax cleanup
  ...

Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
parents ebc28311 f77bf014
...@@ -1165,6 +1165,12 @@ S: 600 North Bell Avenue, Suite 160 ...@@ -1165,6 +1165,12 @@ S: 600 North Bell Avenue, Suite 160
S: Carnegie, Pennsylvania 15106-4304 S: Carnegie, Pennsylvania 15106-4304
S: USA S: USA
N: Kai Germaschewski
E: kai@germaschewski.name
D: Major kbuild rework during the 2.5 cycle
D: ISDN Maintainer
S: USA
N: Philip Gladstone N: Philip Gladstone
E: philip@gladstonefamily.net E: philip@gladstonefamily.net
D: Kernel / timekeeping stuff D: Kernel / timekeeping stuff
......
...@@ -276,41 +276,39 @@ more details, with real examples. ...@@ -276,41 +276,39 @@ more details, with real examples.
--- 3.7 Compilation flags --- 3.7 Compilation flags
EXTRA_CFLAGS, EXTRA_AFLAGS, EXTRA_LDFLAGS, EXTRA_ARFLAGS ccflags-y, asflags-y and ldflags-y
The three flags listed above applies only to the kbuild makefile
where they are assigned. They are used for all the normal
cc, as and ld invocation happenign during a recursive build.
Note: Flags with the same behaviour were previously named:
EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
They are yet supported but their use are deprecated.
All the EXTRA_ variables apply only to the kbuild makefile ccflags-y specifies options for compiling C files with $(CC).
where they are assigned. The EXTRA_ variables apply to all
commands executed in the kbuild makefile.
$(EXTRA_CFLAGS) specifies options for compiling C files with
$(CC).
Example: Example:
# drivers/sound/emu10k1/Makefile # drivers/sound/emu10k1/Makefile
EXTRA_CFLAGS += -I$(obj) ccflags-y += -I$(obj)
ifdef DEBUG ccflags-$(DEBUG) += -DEMU10K1_DEBUG
EXTRA_CFLAGS += -DEMU10K1_DEBUG
endif
This variable is necessary because the top Makefile owns the This variable is necessary because the top Makefile owns the
variable $(CFLAGS) and uses it for compilation flags for the variable $(KBUILD_CFLAGS) and uses it for compilation flags for the
entire tree. entire tree.
$(EXTRA_AFLAGS) is a similar string for per-directory options asflags-y is a similar string for per-directory options
when compiling assembly language source. when compiling assembly language source.
Example: Example:
#arch/x86_64/kernel/Makefile #arch/x86_64/kernel/Makefile
EXTRA_AFLAGS := -traditional asflags-y := -traditional
$(EXTRA_LDFLAGS) and $(EXTRA_ARFLAGS) are similar strings for ldflags-y is a string for per-directory options to $(LD).
per-directory options to $(LD) and $(AR).
Example: Example:
#arch/m68k/fpsp040/Makefile #arch/m68k/fpsp040/Makefile
EXTRA_LDFLAGS := -x ldflags-y := -x
CFLAGS_$@, AFLAGS_$@ CFLAGS_$@, AFLAGS_$@
...@@ -425,6 +423,7 @@ more details, with real examples. ...@@ -425,6 +423,7 @@ more details, with real examples.
as-instr checks if the assembler reports a specific instruction as-instr checks if the assembler reports a specific instruction
and then outputs either option1 or option2 and then outputs either option1 or option2
C escapes are supported in the test instruction C escapes are supported in the test instruction
Note: as-instr-option uses KBUILD_AFLAGS for $(AS) options
cc-option cc-option
cc-option is used to check if $(CC) supports a given option, and not cc-option is used to check if $(CC) supports a given option, and not
...@@ -438,6 +437,7 @@ more details, with real examples. ...@@ -438,6 +437,7 @@ more details, with real examples.
-march=pentium-mmx if supported by $(CC), otherwise -march=i586. -march=pentium-mmx if supported by $(CC), otherwise -march=i586.
The second argument to cc-option is optional, and if omitted, The second argument to cc-option is optional, and if omitted,
cflags-y will be assigned no value if first option is not supported. cflags-y will be assigned no value if first option is not supported.
Note: cc-option uses KBUILD_CFLAGS for $(CC) options
cc-option-yn cc-option-yn
cc-option-yn is used to check if gcc supports a given option cc-option-yn is used to check if gcc supports a given option
...@@ -453,6 +453,7 @@ more details, with real examples. ...@@ -453,6 +453,7 @@ more details, with real examples.
option. When $(biarch) equals 'y', the expanded variables $(aflags-y) option. When $(biarch) equals 'y', the expanded variables $(aflags-y)
and $(cflags-y) will be assigned the values -a32 and -m32, and $(cflags-y) will be assigned the values -a32 and -m32,
respectively. respectively.
Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options
cc-option-align cc-option-align
gcc versions >= 3.0 changed the type of options used to specify gcc versions >= 3.0 changed the type of options used to specify
...@@ -464,10 +465,11 @@ more details, with real examples. ...@@ -464,10 +465,11 @@ more details, with real examples.
cc-option-align = -falign cc-option-align = -falign
Example: Example:
CFLAGS += $(cc-option-align)-functions=4 KBUILD_CFLAGS += $(cc-option-align)-functions=4
In the above example, the option -falign-functions=4 is used for In the above example, the option -falign-functions=4 is used for
gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used.
Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options
cc-version cc-version
cc-version returns a numerical version of the $(CC) compiler version. cc-version returns a numerical version of the $(CC) compiler version.
...@@ -492,9 +494,9 @@ more details, with real examples. ...@@ -492,9 +494,9 @@ more details, with real examples.
Example: Example:
#fs/reiserfs/Makefile #fs/reiserfs/Makefile
EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1) ccflags-y := $(call cc-ifversion, -lt, 0402, -O1)
In this example, EXTRA_CFLAGS will be assigned the value -O1 if the In this example, ccflags-y will be assigned the value -O1 if the
$(CC) version is less than 4.2. $(CC) version is less than 4.2.
cc-ifversion takes all the shell operators: cc-ifversion takes all the shell operators:
-eq, -ne, -lt, -le, -gt, and -ge -eq, -ne, -lt, -le, -gt, and -ge
...@@ -780,8 +782,8 @@ When kbuild executes, the following steps are followed (roughly): ...@@ -780,8 +782,8 @@ When kbuild executes, the following steps are followed (roughly):
Example: Example:
#arch/s390/Makefile #arch/s390/Makefile
LDFLAGS := -m elf_s390 LDFLAGS := -m elf_s390
Note: EXTRA_LDFLAGS and LDFLAGS_$@ can be used to further customise Note: ldflags-y can be used to further customise
the flags used. See chapter 7. the flags used. See chapter 3.7.
LDFLAGS_MODULE Options for $(LD) when linking modules LDFLAGS_MODULE Options for $(LD) when linking modules
...@@ -817,26 +819,26 @@ When kbuild executes, the following steps are followed (roughly): ...@@ -817,26 +819,26 @@ When kbuild executes, the following steps are followed (roughly):
In this example, the binary $(obj)/image is a binary version of In this example, the binary $(obj)/image is a binary version of
vmlinux. The usage of $(call if_changed,xxx) will be described later. vmlinux. The usage of $(call if_changed,xxx) will be described later.
AFLAGS $(AS) assembler flags KBUILD_AFLAGS $(AS) assembler flags
Default value - see top level Makefile Default value - see top level Makefile
Append or modify as required per architecture. Append or modify as required per architecture.
Example: Example:
#arch/sparc64/Makefile #arch/sparc64/Makefile
AFLAGS += -m64 -mcpu=ultrasparc KBUILD_AFLAGS += -m64 -mcpu=ultrasparc
CFLAGS $(CC) compiler flags KBUILD_CFLAGS $(CC) compiler flags
Default value - see top level Makefile Default value - see top level Makefile
Append or modify as required per architecture. Append or modify as required per architecture.
Often, the CFLAGS variable depends on the configuration. Often, the KBUILD_CFLAGS variable depends on the configuration.
Example: Example:
#arch/i386/Makefile #arch/i386/Makefile
cflags-$(CONFIG_M386) += -march=i386 cflags-$(CONFIG_M386) += -march=i386
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
Many arch Makefiles dynamically run the target C compiler to Many arch Makefiles dynamically run the target C compiler to
probe supported options: probe supported options:
...@@ -848,7 +850,7 @@ When kbuild executes, the following steps are followed (roughly): ...@@ -848,7 +850,7 @@ When kbuild executes, the following steps are followed (roughly):
-march=pentium2,-march=i686) -march=pentium2,-march=i686)
... ...
# Disable unit-at-a-time mode ... # Disable unit-at-a-time mode ...
CFLAGS += $(call cc-option,-fno-unit-at-a-time) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time)
... ...
...@@ -1096,8 +1098,8 @@ When kbuild executes, the following steps are followed (roughly): ...@@ -1096,8 +1098,8 @@ When kbuild executes, the following steps are followed (roughly):
specified options when building the target vmlinux.lds. specified options when building the target vmlinux.lds.
When building the *.lds target, kbuild uses the variables: When building the *.lds target, kbuild uses the variables:
CPPFLAGS : Set in top-level Makefile KBUILD_CPPFLAGS : Set in top-level Makefile
EXTRA_CPPFLAGS : May be set in the kbuild makefile cppflags-y : May be set in the kbuild makefile
CPPFLAGS_$(@F) : Target specific flags. CPPFLAGS_$(@F) : Target specific flags.
Note that the full filename is used in this Note that the full filename is used in this
assignment. assignment.
......
...@@ -2138,8 +2138,6 @@ S: Maintained ...@@ -2138,8 +2138,6 @@ S: Maintained
ISDN SUBSYSTEM ISDN SUBSYSTEM
P: Karsten Keil P: Karsten Keil
M: kkeil@suse.de M: kkeil@suse.de
P: Kai Germaschewski
M: kai.germaschewski@gmx.de
L: isdn4linux@listserv.isdn4linux.de L: isdn4linux@listserv.isdn4linux.de
W: http://www.isdn4linux.de W: http://www.isdn4linux.de
T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git
...@@ -2208,8 +2206,6 @@ L: autofs@linux.kernel.org ...@@ -2208,8 +2206,6 @@ L: autofs@linux.kernel.org
S: Maintained S: Maintained
KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*)
P: Kai Germaschewski
M: kai@germaschewski.name
P: Sam Ravnborg P: Sam Ravnborg
M: sam@ravnborg.org M: sam@ravnborg.org
T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
......
...@@ -115,13 +115,20 @@ saved-output := $(KBUILD_OUTPUT) ...@@ -115,13 +115,20 @@ saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \ $(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist)) $(error output directory "$(saved-output)" does not exist))
# Check that OUTPUT directory is not the same as where we have kernel src
$(if $(filter-out $(KBUILD_OUTPUT),$(shell /bin/pwd)),, \
$(error Output directory (O=...) specifies kernel src dir))
PHONY += $(MAKECMDGOALS) PHONY += $(MAKECMDGOALS) sub-make
$(filter-out _all,$(MAKECMDGOALS)) _all: $(filter-out _all sub-make,$(MAKECMDGOALS)) _all: sub-make
$(Q)@:
sub-make: FORCE
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \ KBUILD_SRC=$(CURDIR) \
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@ KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \
$(filter-out _all sub-make,$(MAKECMDGOALS))
# Leave processing to above invocation of make # Leave processing to above invocation of make
skip-makefile := 1 skip-makefile := 1
...@@ -311,12 +318,12 @@ LINUXINCLUDE := -Iinclude \ ...@@ -311,12 +318,12 @@ LINUXINCLUDE := -Iinclude \
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \ $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
-include include/linux/autoconf.h -include include/linux/autoconf.h
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \ -fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration -Werror-implicit-function-declaration
AFLAGS := -D__ASSEMBLY__ KBUILD_AFLAGS := -D__ASSEMBLY__
# Read KERNELRELEASE from include/config/kernel.release (if it exists) # Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
...@@ -327,9 +334,9 @@ export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC ...@@ -327,9 +334,9 @@ export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
# When compiling out-of-tree modules, put MODVERDIR in the module # When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might # tree rather than in the kernel tree. The kernel tree might
...@@ -485,35 +492,41 @@ endif # $(dot-config) ...@@ -485,35 +492,41 @@ endif # $(dot-config)
all: vmlinux all: vmlinux
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
CFLAGS += -Os KBUILD_CFLAGS += -Os
else else
CFLAGS += -O2 KBUILD_CFLAGS += -O2
endif endif
include $(srctree)/arch/$(ARCH)/Makefile include $(srctree)/arch/$(ARCH)/Makefile
ifdef CONFIG_FRAME_POINTER ifdef CONFIG_FRAME_POINTER
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else else
CFLAGS += -fomit-frame-pointer KBUILD_CFLAGS += -fomit-frame-pointer
endif endif
ifdef CONFIG_DEBUG_INFO ifdef CONFIG_DEBUG_INFO
CFLAGS += -g KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -gdwarf-2
endif endif
# Force gcc to behave correct even for buggy distributions # Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector) KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
# arch Makefile may override CC so keep this after arch Makefile is included # arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS) CHECKFLAGS += $(NOSTDINC_FLAGS)
# warn about C99 declaration after statement # warn about C99 declaration after statement
CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
# disable pointer signed / unsigned warnings in gcc 4.0 # disable pointer signed / unsigned warnings in gcc 4.0
CFLAGS += $(call cc-option,-Wno-pointer-sign,) KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
KBUILD_CPPFLAGS += $(CPPFLAGS)
KBUILD_AFLAGS += $(AFLAGS)
KBUILD_CFLAGS += $(CFLAGS)
# Use --build-id when available. # Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
...@@ -1149,6 +1162,7 @@ help: ...@@ -1149,6 +1162,7 @@ help:
@echo 'Static analysers' @echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs' @echo ' checkstack - Generate a list of stack hogs'
@echo ' namespacecheck - Name space analysis on compiled kernel' @echo ' namespacecheck - Name space analysis on compiled kernel'
@echo ' export_report - List the usages of all exported symbols'
@if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \ @if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
echo ' headers_check - Sanity check on exported headers'; \ echo ' headers_check - Sanity check on exported headers'; \
fi fi
...@@ -1255,8 +1269,10 @@ $(clean-dirs): ...@@ -1255,8 +1269,10 @@ $(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
clean: rm-dirs := $(MODVERDIR) clean: rm-dirs := $(MODVERDIR)
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
clean: $(clean-dirs) clean: $(clean-dirs)
$(call cmd,rmdirs) $(call cmd,rmdirs)
$(call cmd,rmfiles)
@find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
...@@ -1411,6 +1427,9 @@ versioncheck: ...@@ -1411,6 +1427,9 @@ versioncheck:
namespacecheck: namespacecheck:
$(PERL) $(srctree)/scripts/namespace.pl $(PERL) $(srctree)/scripts/namespace.pl
export_report:
$(PERL) $(srctree)/scripts/export_report.pl
endif #ifeq ($(config-targets),1) endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1) endif #ifeq ($(mixed-targets),1)
...@@ -1488,8 +1507,8 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) ...@@ -1488,8 +1507,8 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))
cmd_rmfiles = rm -f $(rm-files) cmd_rmfiles = rm -f $(rm-files)
a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
$(NOSTDINC_FLAGS) $(CPPFLAGS) \ $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
$(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o)
quiet_cmd_as_o_S = AS $@ quiet_cmd_as_o_S = AS $@
......
...@@ -33,7 +33,7 @@ cflags-y += $(cpuflags-y) ...@@ -33,7 +33,7 @@ cflags-y += $(cpuflags-y)
# For TSUNAMI, we must have the assembler not emulate our instructions. # For TSUNAMI, we must have the assembler not emulate our instructions.
# The same is true for IRONGATE, POLARIS, PYXIS. # The same is true for IRONGATE, POLARIS, PYXIS.
# BWX is most important, but we don't really want any emulation ever. # BWX is most important, but we don't really want any emulation ever.
CFLAGS += $(cflags-y) -Wa,-mev6 KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6
head-y := arch/alpha/kernel/head.o head-y := arch/alpha/kernel/head.o
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
extra-y := head.o vmlinux.lds extra-y := head.o vmlinux.lds
EXTRA_AFLAGS := $(CFLAGS) EXTRA_AFLAGS := $(KBUILD_CFLAGS)
EXTRA_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 \ obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Makefile for alpha-specific library files.. # Makefile for alpha-specific library files..
# #
EXTRA_AFLAGS := $(CFLAGS) EXTRA_AFLAGS := $(KBUILD_CFLAGS)
EXTRA_CFLAGS := -Werror EXTRA_CFLAGS := -Werror
# Many of these routines have implementations tuned for ev6. # Many of these routines have implementations tuned for ev6.
......
...@@ -14,9 +14,9 @@ LDFLAGS_vmlinux :=-p --no-undefined -X ...@@ -14,9 +14,9 @@ LDFLAGS_vmlinux :=-p --no-undefined -X
CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
GZFLAGS :=-9 GZFLAGS :=-9
#CFLAGS +=-pipe #KBUILD_CFLAGS +=-pipe
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
CFLAGS +=$(call cc-option,-marm,) KBUILD_CFLAGS +=$(call cc-option,-marm,)
# Do not use arch/arm/defconfig - it's always outdated. # Do not use arch/arm/defconfig - it's always outdated.
# Select a platform tht is kept up-to-date # Select a platform tht is kept up-to-date
...@@ -28,15 +28,15 @@ MMUEXT := -nommu ...@@ -28,15 +28,15 @@ MMUEXT := -nommu
endif endif
ifeq ($(CONFIG_FRAME_POINTER),y) ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
endif endif
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
CPPFLAGS += -mbig-endian KBUILD_CPPFLAGS += -mbig-endian
AS += -EB AS += -EB
LD += -EB LD += -EB
else else
CPPFLAGS += -mlittle-endian KBUILD_CPPFLAGS += -mlittle-endian
AS += -EL AS += -EL
LD += -EL LD += -EL
endif endif
...@@ -85,8 +85,8 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-th ...@@ -85,8 +85,8 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-th
endif endif
# Need -Uarm for gcc < 3.x # Need -Uarm for gcc < 3.x
CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
CHECKFLAGS += -D__arm__ CHECKFLAGS += -D__arm__
......
...@@ -87,7 +87,7 @@ ifneq ($(PARAMS_PHYS),) ...@@ -87,7 +87,7 @@ ifneq ($(PARAMS_PHYS),)
LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
endif endif
LDFLAGS_vmlinux += -p --no-undefined -X \ LDFLAGS_vmlinux += -p --no-undefined -X \
$(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name) -T
# Don't allow any static data in misc.o, which # Don't allow any static data in misc.o, which
# would otherwise mess up our GOT table # would otherwise mess up our GOT table
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# EXTRA_CFLAGS := -DDEBUG # EXTRA_CFLAGS := -DDEBUG
# EXTRA_AFLAGS := -DDEBUG # EXTRA_AFLAGS := -DDEBUG
AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp)
LDFLAGS +=--no-warn-mismatch LDFLAGS +=--no-warn-mismatch
obj-y += vfp.o obj-y += vfp.o
......
...@@ -11,15 +11,15 @@ all: uImage vmlinux.elf ...@@ -11,15 +11,15 @@ all: uImage vmlinux.elf
KBUILD_DEFCONFIG := atstk1002_defconfig KBUILD_DEFCONFIG := atstk1002_defconfig
CFLAGS += -pipe -fno-builtin -mno-pic KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
AFLAGS += -mrelax -mno-pic KBUILD_AFLAGS += -mrelax -mno-pic
CFLAGS_MODULE += -mno-relax CFLAGS_MODULE += -mno-relax
LDFLAGS_vmlinux += --relax LDFLAGS_vmlinux += --relax
cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000
CFLAGS += $(cpuflags-y) KBUILD_CFLAGS += $(cpuflags-y)
AFLAGS += $(cpuflags-y) KBUILD_AFLAGS += $(cpuflags-y)
CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
......
...@@ -758,7 +758,7 @@ config BFIN_DMA_5XX ...@@ -758,7 +758,7 @@ config BFIN_DMA_5XX
choice choice
prompt "Uncached SDRAM region" prompt "Uncached SDRAM region"
default DMA_UNCACHED_1M default DMA_UNCACHED_1M
depends BFIN_DMA_5XX depends on BFIN_DMA_5XX
config DMA_UNCACHED_2M config DMA_UNCACHED_2M
bool "Enable 2M DMA region" bool "Enable 2M DMA region"
config DMA_UNCACHED_1M config DMA_UNCACHED_1M
......
...@@ -53,8 +53,8 @@ rev-$(CONFIG_BF_REV_0_5) := 0.5 ...@@ -53,8 +53,8 @@ rev-$(CONFIG_BF_REV_0_5) := 0.5
rev-$(CONFIG_BF_REV_NONE) := none rev-$(CONFIG_BF_REV_NONE) := none
rev-$(CONFIG_BF_REV_ANY) := any rev-$(CONFIG_BF_REV_ANY) := any
CFLAGS += -mcpu=$(cpu-y)-$(rev-y) KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
AFLAGS += -mcpu=$(cpu-y)-$(rev-y) KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
......
...@@ -29,18 +29,18 @@ LD = $(CROSS_COMPILE)ld -mcrislinux ...@@ -29,18 +29,18 @@ LD = $(CROSS_COMPILE)ld -mcrislinux
OBJCOPYFLAGS := -O binary -R .note -R .comment -S OBJCOPYFLAGS := -O binary -R .note -R .comment -S
CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
AFLAGS += -mlinux KBUILD_AFLAGS += -mlinux
CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe
ifdef CONFIG_FRAME_POINTER ifdef CONFIG_FRAME_POINTER
CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
CFLAGS += -fno-omit-frame-pointer KBUILD_CFLAGS += -fno-omit-frame-pointer
endif endif
head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o
LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a) LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
......
...@@ -39,13 +39,13 @@ endif ...@@ -39,13 +39,13 @@ endif
ARCHMODFLAGS += -G0 -mlong-calls ARCHMODFLAGS += -G0 -mlong-calls
ifdef CONFIG_GPREL_DATA_8 ifdef CONFIG_GPREL_DATA_8
CFLAGS += -G8 KBUILD_CFLAGS += -G8
else else
ifdef CONFIG_GPREL_DATA_4 ifdef CONFIG_GPREL_DATA_4
CFLAGS += -G4 KBUILD_CFLAGS += -G4
else else
ifdef CONFIG_GPREL_DATA_NONE ifdef CONFIG_GPREL_DATA_NONE
CFLAGS += -G0 KBUILD_CFLAGS += -G0
endif endif
endif endif
endif endif
...@@ -53,26 +53,26 @@ endif ...@@ -53,26 +53,26 @@ endif
#LDFLAGS_vmlinux := -Map linkmap.txt #LDFLAGS_vmlinux := -Map linkmap.txt
ifdef CONFIG_GC_SECTIONS ifdef CONFIG_GC_SECTIONS
CFLAGS += -ffunction-sections -fdata-sections KBUILD_CFLAGS += -ffunction-sections -fdata-sections
LINKFLAGS += --gc-sections LINKFLAGS += --gc-sections
endif endif
ifndef CONFIG_FRAME_POINTER ifndef CONFIG_FRAME_POINTER
CFLAGS += -mno-linked-fp KBUILD_CFLAGS += -mno-linked-fp
endif endif
ifdef CONFIG_CPU_FR451_COMPILE ifdef CONFIG_CPU_FR451_COMPILE
CFLAGS += -mcpu=fr450 KBUILD_CFLAGS += -mcpu=fr450
AFLAGS += -mcpu=fr450 KBUILD_AFLAGS += -mcpu=fr450
ASFLAGS += -mcpu=fr450 ASFLAGS += -mcpu=fr450
else else
ifdef CONFIG_CPU_FR551_COMPILE ifdef CONFIG_CPU_FR551_COMPILE
CFLAGS += -mcpu=fr550 KBUILD_CFLAGS += -mcpu=fr550
AFLAGS += -mcpu=fr550 KBUILD_AFLAGS += -mcpu=fr550
ASFLAGS += -mcpu=fr550 ASFLAGS += -mcpu=fr550
else else
CFLAGS += -mcpu=fr400 KBUILD_CFLAGS += -mcpu=fr400
AFLAGS += -mcpu=fr400 KBUILD_AFLAGS += -mcpu=fr400
ASFLAGS += -mcpu=fr400 ASFLAGS += -mcpu=fr400
endif endif
endif endif
...@@ -80,16 +80,16 @@ endif ...@@ -80,16 +80,16 @@ endif
# pretend the kernel is going to run on an FR400 with no media-fp unit # pretend the kernel is going to run on an FR400 with no media-fp unit
# - reserve CC3 for use with atomic ops # - reserve CC3 for use with atomic ops
# - all the extra registers are dealt with only at context switch time # - all the extra registers are dealt with only at context switch time
CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
AFLAGS += -mno-fdpic KBUILD_AFLAGS += -mno-fdpic
ASFLAGS += -mno-fdpic ASFLAGS += -mno-fdpic
# make sure the .S files get compiled with debug info # make sure the .S files get compiled with debug info
# and disable optimisations that are unhelpful whilst debugging # and disable optimisations that are unhelpful whilst debugging
ifdef CONFIG_DEBUG_INFO ifdef CONFIG_DEBUG_INFO
#CFLAGS += -O1 #KBUILD_CFLAGS += -O1
AFLAGS += -Wa,--gdwarf2 KBUILD_AFLAGS += -Wa,--gdwarf2
ASFLAGS += -Wa,--gdwarf2 ASFLAGS += -Wa,--gdwarf2
endif endif
......
...@@ -30,16 +30,16 @@ ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf ...@@ -30,16 +30,16 @@ ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf
cflags-$(CONFIG_CPU_H8S) := -ms cflags-$(CONFIG_CPU_H8S) := -ms
ldflags-$(CONFIG_CPU_H8S) := -mh8300self ldflags-$(CONFIG_CPU_H8S) := -mh8300self
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
CFLAGS += -mint32 -fno-builtin KBUILD_CFLAGS += -mint32 -fno-builtin
CFLAGS += -g KBUILD_CFLAGS += -g
CFLAGS += -D__linux__ KBUILD_CFLAGS += -D__linux__
CFLAGS += -DUTS_SYSNAME=\"uClinux\" KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
LDFLAGS += $(ldflags-y) LDFLAGS += $(ldflags-y)
CROSS_COMPILE = h8300-elf- CROSS_COMPILE = h8300-elf-
LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
......
...@@ -2,7 +2,4 @@ ...@@ -2,7 +2,4 @@
# Makefile for H8/300-specific library files.. # Makefile for H8/300-specific library files..
# #
.S.o:
$(CC) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@
lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o
...@@ -34,10 +34,10 @@ LDFLAGS_vmlinux := --emit-relocs ...@@ -34,10 +34,10 @@ LDFLAGS_vmlinux := --emit-relocs
endif endif
CHECKFLAGS += -D__i386__ CHECKFLAGS += -D__i386__
CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
# prevent gcc from keeping the stack 16 byte aligned # prevent gcc from keeping the stack 16 byte aligned
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
# CPU-specific tuning. Anything which can be shared with UML should go here. # CPU-specific tuning. Anything which can be shared with UML should go here.
include $(srctree)/arch/i386/Makefile.cpu include $(srctree)/arch/i386/Makefile.cpu
...@@ -51,17 +51,17 @@ cflags-y += -maccumulate-outgoing-args ...@@ -51,17 +51,17 @@ cflags-y += -maccumulate-outgoing-args
# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
# a lot more stack due to the lack of sharing of stacklots: # a lot more stack due to the lack of sharing of stacklots:
CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
# do binutils support CFI? # do binutils support CFI?
cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
# is .cfi_signal_frame supported too? # is .cfi_signal_frame supported too?
cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
# Default subarch .c files # Default subarch .c files
mcore-y := arch/x86/mach-default mcore-y := arch/x86/mach-default
...@@ -116,8 +116,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/ ...@@ -116,8 +116,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
drivers-$(CONFIG_PM) += arch/x86/power/ drivers-$(CONFIG_PM) += arch/x86/power/
drivers-$(CONFIG_FB) += arch/x86/video/ drivers-$(CONFIG_FB) += arch/x86/video/
CFLAGS += $(mflags-y) KBUILD_CFLAGS += $(mflags-y)
AFLAGS += $(mflags-y) KBUILD_AFLAGS += $(mflags-y)
boot := arch/x86/boot boot := arch/x86/boot
......
...@@ -29,7 +29,7 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ ...@@ -29,7 +29,7 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
CFLAGS_KERNEL := -mconstant-gp CFLAGS_KERNEL := -mconstant-gp
GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
ifeq ($(GAS_STATUS),buggy) ifeq ($(GAS_STATUS),buggy)
$(error Sorry, you need a newer version of the assember, one that is built from \ $(error Sorry, you need a newer version of the assember, one that is built from \
...@@ -44,7 +44,7 @@ ifeq ($(call cc-version),0304) ...@@ -44,7 +44,7 @@ ifeq ($(call cc-version),0304)
cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
endif endif
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
libs-y += arch/ia64/lib/ libs-y += arch/ia64/lib/
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved. # Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved.
# #
CPPFLAGS += -I$(srctree)/arch/ia64/sn/include EXTRA_CFLAGS += -Iarch/ia64/sn/include
obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \
huberror.o io_acpi_init.o io_common.o \ huberror.o io_acpi_init.o io_common.o \
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# sn2 specific kernel files # sn2 specific kernel files
# #
CPPFLAGS += -I$(srctree)/arch/ia64/sn/include EXTRA_CFLAGS += -Iarch/ia64/sn/include
obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \
prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o
...@@ -7,6 +7,6 @@ ...@@ -7,6 +7,6 @@
# #
# Makefile for the sn pci general routines. # Makefile for the sn pci general routines.
CPPFLAGS += -I$(srctree)/arch/ia64/sn/include EXTRA_CFLAGS += -Iarch/ia64/sn/include
obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# Makefile for the sn2 io routines. # Makefile for the sn2 io routines.
CPPFLAGS += -I$(srctree)/arch/ia64/sn/include EXTRA_CFLAGS += -Iarch/ia64/sn/include
obj-y += pcibr_dma.o pcibr_reg.o \ obj-y += pcibr_dma.o pcibr_reg.o \
pcibr_ate.o pcibr_provider.o pcibr_ate.o pcibr_provider.o
...@@ -9,7 +9,7 @@ LDFLAGS := ...@@ -9,7 +9,7 @@ LDFLAGS :=
OBJCOPYFLAGS := -O binary -R .note -R .comment -S OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux := LDFLAGS_vmlinux :=
CFLAGS += -pipe -fno-schedule-insns KBUILD_CFLAGS += -pipe -fno-schedule-insns
CFLAGS_KERNEL += -mmodel=medium CFLAGS_KERNEL += -mmodel=medium
CFLAGS_MODULE += -mmodel=large CFLAGS_MODULE += -mmodel=large
...@@ -24,14 +24,14 @@ endif ...@@ -24,14 +24,14 @@ endif
cflags-$(CONFIG_ISA_M32R) += -DNO_FPU cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
AFLAGS += $(aflags-y) KBUILD_AFLAGS += $(aflags-y)
CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
libs-y += arch/m32r/lib/ $(LIBGCC) libs-y += arch/m32r/lib/ $(LIBGCC)
core-y += arch/m32r/kernel/ \ core-y += arch/m32r/kernel/ \
......
...@@ -32,18 +32,18 @@ endif ...@@ -32,18 +32,18 @@ endif
CHECKFLAGS += -D__mc68000__ CHECKFLAGS += -D__mc68000__
# without -fno-strength-reduce the 53c7xx.c driver fails ;-( # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
# enable processor switch if compiled only for a single cpu # enable processor switch if compiled only for a single cpu
ifndef CONFIG_M68020 ifndef CONFIG_M68020
ifndef CONFIG_M68030 ifndef CONFIG_M68030
ifndef CONFIG_M68060 ifndef CONFIG_M68060
CFLAGS := $(CFLAGS) -m68040 KBUILD_CFLAGS += -m68040
endif endif
ifndef CONFIG_M68040 ifndef CONFIG_M68040
CFLAGS := $(CFLAGS) -m68060 KBUILD_CFLAGS += -m68060
endif endif
endif endif
...@@ -52,7 +52,7 @@ endif ...@@ -52,7 +52,7 @@ endif
ifdef CONFIG_KGDB ifdef CONFIG_KGDB
# If configured for kgdb support, include debugging infos and keep the # If configured for kgdb support, include debugging infos and keep the
# frame pointer # frame pointer
CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
endif endif
ifndef CONFIG_SUN3 ifndef CONFIG_SUN3
......
...@@ -102,11 +102,11 @@ cflags-$(CONFIG_M68EZ328) := -m68000 ...@@ -102,11 +102,11 @@ cflags-$(CONFIG_M68EZ328) := -m68000
cflags-$(CONFIG_M68VZ328) := -m68000 cflags-$(CONFIG_M68VZ328) := -m68000
cflags-$(CONFIG_M68360) := -m68332 cflags-$(CONFIG_M68360) := -m68332
AFLAGS += $(cflags-y) KBUILD_AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
CFLAGS += -D__linux__ KBUILD_CFLAGS += -D__linux__
CFLAGS += -DUTS_SYSNAME=\"uClinux\" KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-$(CONFIG_COLDFIRE) += entry.o vectors.o obj-$(CONFIG_COLDFIRE) += entry.o vectors.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
#obj-y := config.o usb-mcf532x.o spi-mcf532x.o #obj-y := config.o usb-mcf532x.o spi-mcf532x.o
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
ifdef CONFIG_FULLDEBUG ifdef CONFIG_FULLDEBUG
AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
endif endif
obj-y := config.o obj-y := config.o
......
...@@ -608,14 +608,14 @@ ifdef CONFIG_64BIT ...@@ -608,14 +608,14 @@ ifdef CONFIG_64BIT
endif endif
endif endif
AFLAGS += $(cflags-y) KBUILD_AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y) \ KBUILD_CFLAGS += $(cflags-y) \
-D"VMLINUX_LOAD_ADDRESS=$(load-y)" -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
LDFLAGS += -m $(ld-emul) LDFLAGS += -m $(ld-emul)
ifdef CONFIG_MIPS ifdef CONFIG_MIPS
CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
ifdef CONFIG_64BIT ifdef CONFIG_64BIT
...@@ -632,7 +632,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo ...@@ -632,7 +632,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo
# #
CPPFLAGS_vmlinux.lds := \ CPPFLAGS_vmlinux.lds := \
$(CFLAGS) \ $(KBUILD_CFLAGS) \
-D"LOADADDR=$(load-y)" \ -D"LOADADDR=$(load-y)" \
-D"JIFFIES=$(JIFFIES)" \ -D"JIFFIES=$(JIFFIES)" \
-D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)" -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
......
...@@ -71,7 +71,7 @@ obj-$(CONFIG_PCSPEAKER) += pcspeaker.o ...@@ -71,7 +71,7 @@ obj-$(CONFIG_PCSPEAKER) += pcspeaker.o
obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
......
...@@ -63,7 +63,7 @@ cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000 ...@@ -63,7 +63,7 @@ cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000
head-y := arch/parisc/kernel/head.o head-y := arch/parisc/kernel/head.o
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
kernel-$(CONFIG_HPUX) += hpux/ kernel-$(CONFIG_HPUX) += hpux/
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# See arch/parisc/math-emu/README # See arch/parisc/math-emu/README
CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
-Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \ -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
-Wno-implicit-int -Wno-implicit-int
......
...@@ -144,7 +144,7 @@ config BDI_SWITCH ...@@ -144,7 +144,7 @@ config BDI_SWITCH
config BOOTX_TEXT config BOOTX_TEXT
bool "Support for early boot text console (BootX or OpenFirmware only)" bool "Support for early boot text console (BootX or OpenFirmware only)"
depends PPC_OF && PPC_MULTIPLATFORM depends on PPC_OF && PPC_MULTIPLATFORM
help help
Say Y here to see progress messages from the boot firmware in text Say Y here to see progress messages from the boot firmware in text
mode. Requires either BootX or Open Firmware. mode. Requires either BootX or Open Firmware.
...@@ -234,12 +234,12 @@ endchoice ...@@ -234,12 +234,12 @@ endchoice
config PPC_EARLY_DEBUG_44x_PHYSLOW config PPC_EARLY_DEBUG_44x_PHYSLOW
hex "Low 32 bits of early debug UART physical address" hex "Low 32 bits of early debug UART physical address"
depends PPC_EARLY_DEBUG_44x depends on PPC_EARLY_DEBUG_44x
default "0x40000200" default "0x40000200"
config PPC_EARLY_DEBUG_44x_PHYSHIGH config PPC_EARLY_DEBUG_44x_PHYSHIGH
hex "EPRN of early debug UART physical address" hex "EPRN of early debug UART physical address"
depends PPC_EARLY_DEBUG_44x depends on PPC_EARLY_DEBUG_44x
default "0x1" default "0x1"
config PPC_EARLY_DEBUG_CPM_ADDR config PPC_EARLY_DEBUG_CPM_ADDR
......
...@@ -75,10 +75,10 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) ...@@ -75,10 +75,10 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
CPPFLAGS += $(CPPFLAGS-y) KBUILD_CPPFLAGS += $(CPPFLAGS-y)
AFLAGS += $(AFLAGS-y) KBUILD_AFLAGS += $(AFLAGS-y)
CFLAGS += -msoft-float -pipe $(CFLAGS-y) KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y)
CPP = $(CC) -E $(CFLAGS) CPP = $(CC) -E $(KBUILD_CFLAGS)
CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
...@@ -88,35 +88,35 @@ GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi ...@@ -88,35 +88,35 @@ GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi
ifeq ($(CONFIG_POWER4_ONLY),y) ifeq ($(CONFIG_POWER4_ONLY),y)
ifeq ($(CONFIG_ALTIVEC),y) ifeq ($(CONFIG_ALTIVEC),y)
ifeq ($(GCC_BROKEN_VEC),y) ifeq ($(GCC_BROKEN_VEC),y)
CFLAGS += $(call cc-option,-mcpu=970) KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
else else
CFLAGS += $(call cc-option,-mcpu=power4) KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
endif endif
else else
CFLAGS += $(call cc-option,-mcpu=power4) KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
endif endif
else else
CFLAGS += $(call cc-option,-mtune=power4) KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
endif endif
endif endif
ifeq ($(CONFIG_TUNE_CELL),y) ifeq ($(CONFIG_TUNE_CELL),y)
CFLAGS += $(call cc-option,-mtune=cell) KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
endif endif
# No AltiVec instruction when building kernel # No AltiVec instruction when building kernel
CFLAGS += $(call cc-option,-mno-altivec) KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
# Enable unit-at-a-time mode when possible. It shrinks the # Enable unit-at-a-time mode when possible. It shrinks the
# kernel considerably. # kernel considerably.
CFLAGS += $(call cc-option,-funit-at-a-time) KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
# Never use string load/store instructions as they are # Never use string load/store instructions as they are
# often slow when they are implemented at all # often slow when they are implemented at all
CFLAGS += -mno-string KBUILD_CFLAGS += -mno-string
ifeq ($(CONFIG_6xx),y) ifeq ($(CONFIG_6xx),y)
CFLAGS += -mcpu=powerpc KBUILD_CFLAGS += -mcpu=powerpc
endif endif
cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_4xx) += -Wa,-m405
...@@ -125,8 +125,8 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec ...@@ -125,8 +125,8 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
cpu-as-$(CONFIG_E500) += -Wa,-me500 cpu-as-$(CONFIG_E500) += -Wa,-me500
cpu-as-$(CONFIG_E200) += -Wa,-me200 cpu-as-$(CONFIG_E200) += -Wa,-me200
AFLAGS += $(cpu-as-y) KBUILD_AFLAGS += $(cpu-as-y)
CFLAGS += $(cpu-as-y) KBUILD_CFLAGS += $(cpu-as-y)
head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o
head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
......
...@@ -117,7 +117,7 @@ config RTAS_FLASH ...@@ -117,7 +117,7 @@ config RTAS_FLASH
config PPC_PMI config PPC_PMI
tristate "Support for PMI" tristate "Support for PMI"
depends PPC_IBM_CELL_BLADE depends on PPC_IBM_CELL_BLADE
help help
PMI (Platform Management Interrupt) is a way to PMI (Platform Management Interrupt) is a way to
communicate with the BMC (Baseboard Mangement Controller). communicate with the BMC (Baseboard Mangement Controller).
......
...@@ -22,22 +22,22 @@ endif ...@@ -22,22 +22,22 @@ endif
LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
# The -Iarch/$(ARCH)/include is temporary while we are merging # The -Iarch/$(ARCH)/include is temporary while we are merging
CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
AFLAGS += -Iarch/$(ARCH) KBUILD_AFLAGS += -Iarch/$(ARCH)
CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -mmultiple -ffixed-r2 -mmultiple
# No AltiVec instruction when building kernel # No AltiVec instruction when building kernel
CFLAGS += $(call cc-option, -mno-altivec) KBUILD_CFLAGS += $(call cc-option, -mno-altivec)
CPP = $(CC) -E $(CFLAGS) CPP = $(CC) -E $(KBUILD_CFLAGS)
# Temporary hack until we have migrated to asm-powerpc # Temporary hack until we have migrated to asm-powerpc
LINUXINCLUDE += -Iarch/$(ARCH)/include LINUXINCLUDE += -Iarch/$(ARCH)/include
CHECKFLAGS += -D__powerpc__ CHECKFLAGS += -D__powerpc__
ifndef CONFIG_FSL_BOOKE ifndef CONFIG_FSL_BOOKE
CFLAGS += -mstring KBUILD_CFLAGS += -mstring
endif endif
cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_4xx) += -Wa,-m405
...@@ -45,8 +45,8 @@ cpu-as-$(CONFIG_6xx) += -Wa,-maltivec ...@@ -45,8 +45,8 @@ cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
cpu-as-$(CONFIG_E500) += -Wa,-me500 cpu-as-$(CONFIG_E500) += -Wa,-me500
cpu-as-$(CONFIG_E200) += -Wa,-me200 cpu-as-$(CONFIG_E200) += -Wa,-me200
AFLAGS += $(cpu-as-y) KBUILD_AFLAGS += $(cpu-as-y)
CFLAGS += $(cpu-as-y) KBUILD_CFLAGS += $(cpu-as-y)
# Default to the common case. # Default to the common case.
KBUILD_DEFCONFIG := common_defconfig KBUILD_DEFCONFIG := common_defconfig
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# modified by Cort (cort@cs.nmt.edu) # modified by Cort (cort@cs.nmt.edu)
# #
CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
HOSTCFLAGS += -Iarch/$(ARCH)/boot/include HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
......
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
ifndef CONFIG_64BIT ifndef CONFIG_64BIT
LDFLAGS := -m elf_s390 LDFLAGS := -m elf_s390
CFLAGS += -m31 KBUILD_CFLAGS += -m31
AFLAGS += -m31 KBUILD_AFLAGS += -m31
UTS_MACHINE := s390 UTS_MACHINE := s390
STACK_SIZE := 8192 STACK_SIZE := 8192
CHECKFLAGS += -D__s390__ -msize-long CHECKFLAGS += -D__s390__ -msize-long
else else
LDFLAGS := -m elf64_s390 LDFLAGS := -m elf64_s390
MODFLAGS += -fpic -D__PIC__ MODFLAGS += -fpic -D__PIC__
CFLAGS += -m64 KBUILD_CFLAGS += -m64
AFLAGS += -m64 KBUILD_AFLAGS += -m64
UTS_MACHINE := s390x UTS_MACHINE := s390x
STACK_SIZE := 16384 STACK_SIZE := 16384
CHECKFLAGS += -D__s390__ -D__s390x__ CHECKFLAGS += -D__s390__ -D__s390x__
...@@ -77,9 +77,9 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack ...@@ -77,9 +77,9 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack
cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE)
endif endif
CFLAGS += -mbackchain -msoft-float $(cflags-y) KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)
CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
AFLAGS += $(aflags-y) KBUILD_AFLAGS += $(aflags-y)
OBJCOPYFLAGS := -O binary OBJCOPYFLAGS := -O binary
LDFLAGS_vmlinux := -e start LDFLAGS_vmlinux := -e start
......
...@@ -91,12 +91,12 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4' ...@@ -91,12 +91,12 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
LDFLAGS += -EB LDFLAGS += -EB
endif endif
CFLAGS += -pipe $(cflags-y) KBUILD_CFLAGS += -pipe $(cflags-y)
AFLAGS += $(cflags-y) KBUILD_AFLAGS += $(cflags-y)
head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
core-y += arch/sh/kernel/ arch/sh/mm/ core-y += arch/sh/kernel/ arch/sh/mm/
core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
......
...@@ -21,7 +21,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ ...@@ -21,7 +21,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
$(CONFIG_MEMORY_START) + \ $(CONFIG_MEMORY_START) + \
$(CONFIG_BOOT_LINK_OFFSET)]') $(CONFIG_BOOT_LINK_OFFSET)]')
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
......
...@@ -26,7 +26,7 @@ LDFLAGS += -EB -mshelf32_linux ...@@ -26,7 +26,7 @@ LDFLAGS += -EB -mshelf32_linux
endif endif
# No requirements for endianess support from AFLAGS, 'as' always run through gcc # No requirements for endianess support from AFLAGS, 'as' always run through gcc
CFLAGS += $(cpu-y) KBUILD_CFLAGS += $(cpu-y)
LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
--defsym phys_stext_shmedia=phys_stext+1 \ --defsym phys_stext_shmedia=phys_stext+1 \
...@@ -58,7 +58,7 @@ ifneq ($(machine-y),) ...@@ -58,7 +58,7 @@ ifneq ($(machine-y),)
core-y += arch/sh64/mach-$(machine-y)/ core-y += arch/sh64/mach-$(machine-y)/
endif endif
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
libs-y += arch/$(ARCH)/lib/ $(LIBGCC) libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/ drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
# #
# #
# Uncomment the first CFLAGS if you are doing kgdb source level # Uncomment the first KBUILD_CFLAGS if you are doing kgdb source level
# debugging of the kernel to get the proper debugging information. # debugging of the kernel to get the proper debugging information.
AS := $(AS) -32 AS := $(AS) -32
LDFLAGS := -m elf32_sparc LDFLAGS := -m elf32_sparc
CHECKFLAGS += -D__sparc__ CHECKFLAGS += -D__sparc__
#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
AFLAGS := $(AFLAGS) -m32 KBUILD_AFLAGS += -m32
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
# Since 2.5.40, the first stage is left not btfix-ed. # Since 2.5.40, the first stage is left not btfix-ed.
......
...@@ -39,17 +39,17 @@ AS := $(AS) --undeclared-regs ...@@ -39,17 +39,17 @@ AS := $(AS) --undeclared-regs
endif endif
ifneq ($(NEW_GCC),y) ifneq ($(NEW_GCC),y)
CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
-ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
else else
CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
-ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
$(CC_UNDECL) $(CC_UNDECL)
AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
endif endif
ifeq ($(CONFIG_MCOUNT),y) ifeq ($(CONFIG_MCOUNT),y)
CFLAGS := $(CFLAGS) -pg KBUILD_CFLAGS += -pg
endif endif
head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
......
...@@ -49,15 +49,15 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) ...@@ -49,15 +49,15 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
# #
# These apply to USER_CFLAGS to. # These apply to USER_CFLAGS to.
CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
$(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
-Din6addr_loopback=kernel_in6addr_loopback \ -Din6addr_loopback=kernel_in6addr_loopback \
-Din6addr_any=kernel_in6addr_any -Din6addr_any=kernel_in6addr_any
AFLAGS += $(ARCH_INCLUDE) KBUILD_AFLAGS += $(ARCH_INCLUDE)
USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
$(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
-D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
...@@ -67,14 +67,14 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) ...@@ -67,14 +67,14 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
# -Derrno=kernel_errno - This turns all kernel references to errno into # -Derrno=kernel_errno - This turns all kernel references to errno into
# kernel_errno to separate them from the libc errno. This allows -fno-common # kernel_errno to separate them from the libc errno. This allows -fno-common
# in CFLAGS. Otherwise, it would cause ld to complain about the two different # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different
# errnos. # errnos.
# These apply to kernelspace only. # These apply to kernelspace only.
KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
-Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)
CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(KERNEL_DEFINES)
CFLAGS += $(call cc-option,-fno-unit-at-a-time,) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
# These are needed for clean and mrproper, since in that case .config is not # These are needed for clean and mrproper, since in that case .config is not
# included; the values here are meaningless # included; the values here are meaningless
......
...@@ -12,8 +12,8 @@ HEADER_ARCH := x86 ...@@ -12,8 +12,8 @@ HEADER_ARCH := x86
ifeq ("$(origin SUBARCH)", "command line") ifeq ("$(origin SUBARCH)", "command line")
ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
CFLAGS += $(call cc-option,-m32) KBUILD_CFLAGS += $(call cc-option,-m32)
AFLAGS += $(call cc-option,-m32) KBUILD_AFLAGS += $(call cc-option,-m32)
LINK-y += $(call cc-option,-m32) LINK-y += $(call cc-option,-m32)
UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) UML_OBJCOPYFLAGS += -F $(ELF_FORMAT)
...@@ -38,4 +38,4 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) ...@@ -38,4 +38,4 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference. # an unresolved reference.
cflags-y += -ffreestanding cflags-y += -ffreestanding
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
# To get a definition of F_SETSIG # To get a definition of F_SETSIG
USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
CFLAGS += -D_LARGEFILE64_SOURCE KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE
...@@ -9,12 +9,12 @@ _extra_flags_ = -fno-builtin -m64 ...@@ -9,12 +9,12 @@ _extra_flags_ = -fno-builtin -m64
#We #undef __x86_64__ for kernelspace, not for userspace where #We #undef __x86_64__ for kernelspace, not for userspace where
#it's needed for headers to work! #it's needed for headers to work!
ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
CFLAGS += $(_extra_flags_) KBUILD_CFLAGS += $(_extra_flags_)
CHECKFLAGS += -m64 CHECKFLAGS += -m64
AFLAGS += -m64 KBUILD_AFLAGS += -m64
LDFLAGS += -m elf_x86_64 LDFLAGS += -m elf_x86_64
CPPFLAGS += -m64 KBUILD_CPPFLAGS += -m64
ELF_ARCH := i386:x86-64 ELF_ARCH := i386:x86-64
ELF_FORMAT := elf64-x86-64 ELF_FORMAT := elf64-x86-64
......
...@@ -17,7 +17,7 @@ ubd-objs := ubd_kern.o ubd_user.o ...@@ -17,7 +17,7 @@ ubd-objs := ubd_kern.o ubd_user.o
port-objs := port_kern.o port_user.o port-objs := port_kern.o port_user.o
harddog-objs := harddog_kern.o harddog_user.o harddog-objs := harddog_kern.o harddog_user.o
LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
......
OBJ = built-in.o OBJ = built-in.o
.S.o: .S.o:
$(CC) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o $(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \
ptrace_user.o sysrq.o ptrace_user.o sysrq.o
...@@ -57,13 +57,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \ ...@@ -57,13 +57,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \
checksum.o: checksum.S checksum.o: checksum.S
rm -f asm rm -f asm
ln -s $(TOPDIR)/include/asm-ppc asm ln -s $(TOPDIR)/include/asm-ppc asm
$(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
rm -f asm rm -f asm
misc.o: misc.S ppc_defs.h misc.o: misc.S ppc_defs.h
rm -f asm rm -f asm
ln -s $(TOPDIR)/include/asm-ppc asm ln -s $(TOPDIR)/include/asm-ppc asm
$(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
rm -f asm rm -f asm
clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
arch_dir = arch/v850 arch_dir = arch/v850
CFLAGS += -mv850e KBUILD_CFLAGS += -mv850e
# r16 is a fixed pointer to the current task # r16 is a fixed pointer to the current task
CFLAGS += -ffixed-r16 -mno-prolog-function KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function
CFLAGS += -fno-builtin KBUILD_CFLAGS += -fno-builtin
CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\"
# By default, build a kernel that runs on the gdb v850 simulator. # By default, build a kernel that runs on the gdb v850 simulator.
KBUILD_DEFCONFIG := sim_defconfig KBUILD_DEFCONFIG := sim_defconfig
......
...@@ -50,7 +50,7 @@ HOSTCFLAGS_build.o := $(LINUXINCLUDE) ...@@ -50,7 +50,7 @@ HOSTCFLAGS_build.o := $(LINUXINCLUDE)
# that way we can complain to the user if the CPU is insufficient. # that way we can complain to the user if the CPU is insufficient.
cflags-i386 := cflags-i386 :=
cflags-x86_64 := -m32 cflags-x86_64 := -m32
CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
$(cflags-$(ARCH)) \ $(cflags-$(ARCH)) \
-Wall -Wstrict-prototypes \ -Wall -Wstrict-prototypes \
-march=i386 -mregparm=3 \ -march=i386 -mregparm=3 \
...@@ -61,7 +61,7 @@ CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ ...@@ -61,7 +61,7 @@ CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
$(call cc-option, -fno-unit-at-a-time)) \ $(call cc-option, -fno-unit-at-a-time)) \
$(call cc-option, -fno-stack-protector) \ $(call cc-option, -fno-stack-protector) \
$(call cc-option, -mpreferred-stack-boundary=2) $(call cc-option, -mpreferred-stack-boundary=2)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
$(obj)/zImage: IMAGE_OFFSET := 0x1000 $(obj)/zImage: IMAGE_OFFSET := 0x1000
$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) $(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
......
...@@ -11,7 +11,7 @@ EXTRA_AFLAGS := -traditional ...@@ -11,7 +11,7 @@ EXTRA_AFLAGS := -traditional
LDFLAGS_vmlinux := -T LDFLAGS_vmlinux := -T
hostprogs-y := relocs hostprogs-y := relocs
CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ KBUILD_CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
-fno-strict-aliasing -fPIC \ -fno-strict-aliasing -fPIC \
$(call cc-option,-ffreestanding) \ $(call cc-option,-ffreestanding) \
$(call cc-option,-fno-stack-protector) $(call cc-option,-fno-stack-protector)
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o
CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \
-fno-strict-aliasing -fPIC -mcmodel=small \ -fno-strict-aliasing -fPIC -mcmodel=small \
$(call cc-option, -ffreestanding) \ $(call cc-option, -ffreestanding) \
$(call cc-option, -fno-stack-protector) $(call cc-option, -fno-stack-protector)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
LDFLAGS := -m elf_x86_64 LDFLAGS := -m elf_x86_64
LDFLAGS_vmlinux := -T LDFLAGS_vmlinux := -T
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
#DEBUG = -DDEBUGGING #DEBUG = -DDEBUGGING
DEBUG = DEBUG =
PARANOID = -DPARANOID PARANOID = -DPARANOID
CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
EXTRA_AFLAGS := $(PARANOID) EXTRA_AFLAGS := $(PARANOID)
# From 'C' language sources: # From 'C' language sources:
......
...@@ -34,8 +34,8 @@ $(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE ...@@ -34,8 +34,8 @@ $(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE
CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
$(obj)/vclock_gettime.o: CFLAGS = $(CFL) $(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL)
$(obj)/vgetcpu.o: CFLAGS = $(CFL) $(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL)
# We also create a special relocatable object that should mirror the symbol # We also create a special relocatable object that should mirror the symbol
# table and layout of the linked DSO. With ld -R we can then refer to # table and layout of the linked DSO. With ld -R we can then refer to
......
...@@ -61,18 +61,18 @@ cflags-y += -maccumulate-outgoing-args ...@@ -61,18 +61,18 @@ cflags-y += -maccumulate-outgoing-args
# do binutils support CFI? # do binutils support CFI?
cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
# is .cfi_signal_frame supported too? # is .cfi_signal_frame supported too?
cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector )
cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all )
CFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y)
CFLAGS_KERNEL += $(cflags-kernel-y) CFLAGS_KERNEL += $(cflags-kernel-y)
AFLAGS += -m64 KBUILD_AFLAGS += -m64
head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o
......
...@@ -28,11 +28,9 @@ PLATFORM = $(platform-y) ...@@ -28,11 +28,9 @@ PLATFORM = $(platform-y)
export PLATFORM export PLATFORM
# temporarily until string.h is fixed # temporarily until string.h is fixed
cflags-y += -ffreestanding KBUILD_CFLAGS += -ffreestanding
cflags-y += -pipe -mlongcalls KBUILD_CFLAGS += -pipe -mlongcalls
CFLAGS += $(cflags-y)
KBUILD_DEFCONFIG := iss_defconfig KBUILD_DEFCONFIG := iss_defconfig
...@@ -56,7 +54,7 @@ endif ...@@ -56,7 +54,7 @@ endif
# #
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
head-y := arch/xtensa/kernel/head.o head-y := arch/xtensa/kernel/head.o
core-y += arch/xtensa/kernel/ arch/xtensa/mm/ core-y += arch/xtensa/kernel/ arch/xtensa/mm/
......
...@@ -8,13 +8,12 @@ ...@@ -8,13 +8,12 @@
# #
CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
HOSTFLAGS += -Iarch/$(ARCH)/boot/include HOSTFLAGS += -Iarch/$(ARCH)/boot/include
BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
export CFLAGS export EXTRA_CFLAGS
export AFLAGS
export BIG_ENDIAN export BIG_ENDIAN
subdir-y := lib subdir-y := lib
......
...@@ -19,7 +19,7 @@ boot-y := bootstrap.o ...@@ -19,7 +19,7 @@ boot-y := bootstrap.o
OBJS := $(addprefix $(obj)/,$(boot-y)) OBJS := $(addprefix $(obj)/,$(boot-y))
LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
zImage: vmlinux $(OBJS) $(LIBS) zImage: vmlinux $(OBJS) $(LIBS)
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \
......
...@@ -41,7 +41,7 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y) ...@@ -41,7 +41,7 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
# guess the target endianess to choose the right PCA-200E firmware image # guess the target endianess to choose the right PCA-200E firmware image
ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y) ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h
CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) $(CPPFLAGS) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2) CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) $(KBUILD_CPPFLAGS) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2)
endif endif
endif endif
......
...@@ -152,7 +152,7 @@ config INPUT_POWERMATE ...@@ -152,7 +152,7 @@ config INPUT_POWERMATE
config INPUT_YEALINK config INPUT_YEALINK
tristate "Yealink usb-p1k voip phone" tristate "Yealink usb-p1k voip phone"
depends EXPERIMENTAL depends on EXPERIMENTAL
depends on USB_ARCH_HAS_HCD depends on USB_ARCH_HAS_HCD
select USB select USB
help help
......
...@@ -83,7 +83,7 @@ config LEDS_WRAP ...@@ -83,7 +83,7 @@ config LEDS_WRAP
config LEDS_H1940 config LEDS_H1940
tristate "LED Support for iPAQ H1940 device" tristate "LED Support for iPAQ H1940 device"
depends LEDS_CLASS && ARCH_H1940 depends on LEDS_CLASS && ARCH_H1940
help help
This option enables support for the LEDs on the h1940. This option enables support for the LEDs on the h1940.
......
...@@ -19,7 +19,7 @@ if PHONE ...@@ -19,7 +19,7 @@ if PHONE
config PHONE_IXJ config PHONE_IXJ
tristate "QuickNet Internet LineJack/PhoneJack support" tristate "QuickNet Internet LineJack/PhoneJack support"
depends ISA || PCI depends on ISA || PCI
---help--- ---help---
Say M if you have a telephony card manufactured by Quicknet Say M if you have a telephony card manufactured by Quicknet
Technologies, Inc. These include the Internet PhoneJACK and Technologies, Inc. These include the Internet PhoneJACK and
......
...@@ -78,7 +78,6 @@ header-y += if_arcnet.h ...@@ -78,7 +78,6 @@ header-y += if_arcnet.h
header-y += if_bonding.h header-y += if_bonding.h
header-y += if_cablemodem.h header-y += if_cablemodem.h
header-y += if_fc.h header-y += if_fc.h
header-y += if_fddi.h
header-y += if.h header-y += if.h
header-y += if_hippi.h header-y += if_hippi.h
header-y += if_infiniband.h header-y += if_infiniband.h
...@@ -121,7 +120,6 @@ header-y += nl80211.h ...@@ -121,7 +120,6 @@ header-y += nl80211.h
header-y += oom.h header-y += oom.h
header-y += param.h header-y += param.h
header-y += pci_regs.h header-y += pci_regs.h
header-y += personality.h
header-y += pfkeyv2.h header-y += pfkeyv2.h
header-y += pg.h header-y += pg.h
header-y += phantom.h header-y += phantom.h
...@@ -159,7 +157,6 @@ header-y += video_decoder.h ...@@ -159,7 +157,6 @@ header-y += video_decoder.h
header-y += video_encoder.h header-y += video_encoder.h
header-y += videotext.h header-y += videotext.h
header-y += vt.h header-y += vt.h
header-y += wireless.h
header-y += x25.h header-y += x25.h
unifdef-y += acct.h unifdef-y += acct.h
......
...@@ -30,4 +30,4 @@ $(obj)/version.o: include/linux/compile.h ...@@ -30,4 +30,4 @@ $(obj)/version.o: include/linux/compile.h
include/linux/compile.h: FORCE include/linux/compile.h: FORCE
@echo ' CHK $@' @echo ' CHK $@'
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)" "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"
...@@ -75,24 +75,24 @@ try-run = $(shell set -e; \ ...@@ -75,24 +75,24 @@ try-run = $(shell set -e; \
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
as-option = $(call try-run,\ as-option = $(call try-run,\
$(CC) $(CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) $(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2))
# as-instr # as-instr
# Usage: cflags-y += $(call as-instr,instr,option1,option2) # Usage: cflags-y += $(call as-instr,instr,option1,option2)
as-instr = $(call try-run,\ as-instr = $(call try-run,\
echo -e "$(1)" | $(CC) $(AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
# cc-option # cc-option
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
cc-option = $(call try-run,\ cc-option = $(call try-run,\
$(CC) $(CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",$(1),$(2)) $(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",$(1),$(2))
# cc-option-yn # cc-option-yn
# Usage: flag := $(call cc-option-yn,-march=winchip-c6) # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
cc-option-yn = $(call try-run,\ cc-option-yn = $(call try-run,\
$(CC) $(CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n) $(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n)
# cc-option-align # cc-option-align
# Prefix align with either -falign or -malign # Prefix align with either -falign or -malign
......
...@@ -22,16 +22,30 @@ EXTRA_AFLAGS := ...@@ -22,16 +22,30 @@ EXTRA_AFLAGS :=
EXTRA_CFLAGS := EXTRA_CFLAGS :=
EXTRA_CPPFLAGS := EXTRA_CPPFLAGS :=
EXTRA_LDFLAGS := EXTRA_LDFLAGS :=
asflags-y :=
ccflags-y :=
cppflags-y :=
ldflags-y :=
# Read .config if it exist, otherwise ignore # Read .config if it exist, otherwise ignore
-include include/config/auto.conf -include include/config/auto.conf
include scripts/Kbuild.include include scripts/Kbuild.include
# For backward compatibility check that these variables does not change
save-cflags := $(CFLAGS)
# The filename Kbuild has precedence over Makefile # The filename Kbuild has precedence over Makefile
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
include $(kbuild-file)
# If the save-* variables changed error out
ifeq ($(KBUILD_NOPEDANTIC),)
ifneq ("$(save-cflags)","$(CFLAGS)")
$(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS)
endif
endif
include scripts/Makefile.lib include scripts/Makefile.lib
ifdef host-progs ifdef host-progs
...@@ -55,31 +69,6 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) ...@@ -55,31 +69,6 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
endif endif
ifdef EXTRA_TARGETS
$(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.6. Please fix!)
endif
ifdef build-targets
$(warning kbuild: $(obj)/Makefile - Usage of build-targets is obsolete in 2.6. Please fix!)
endif
ifdef export-objs
$(warning kbuild: $(obj)/Makefile - Usage of export-objs is obsolete in 2.6. Please fix!)
endif
ifdef O_TARGET
$(warning kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.6. Please fix!)
endif
ifdef L_TARGET
$(error kbuild: $(obj)/Makefile - Use of L_TARGET is replaced by lib-y in 2.6. Please fix!)
endif
ifdef list-multi
$(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.6. Please fix!)
endif
ifndef obj ifndef obj
$(warning kbuild: Makefile.build is included improperly) $(warning kbuild: Makefile.build is included improperly)
endif endif
...@@ -291,7 +280,7 @@ endif # builtin-target ...@@ -291,7 +280,7 @@ endif # builtin-target
# #
ifdef lib-target ifdef lib-target
quiet_cmd_link_l_target = AR $@ quiet_cmd_link_l_target = AR $@
cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-y) cmd_link_l_target = rm -f $@; $(AR) rcs $@ $(lib-y)
$(lib-target): $(lib-y) FORCE $(lib-target): $(lib-y) FORCE
$(call if_changed,link_l_target) $(call if_changed,link_l_target)
......
...@@ -40,7 +40,7 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) ...@@ -40,7 +40,7 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
# build a list of files to remove, usually releative to the current # build a list of files to remove, usually releative to the current
# directory # directory
__clean-files := $(extra-y) $(EXTRA_TARGETS) $(always) \ __clean-files := $(extra-y) $(always) \
$(targets) $(clean-files) \ $(targets) $(clean-files) \
$(host-progs) \ $(host-progs) \
$(hostprogs-y) $(hostprogs-m) $(hostprogs-) $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
......
# Backward compatibility - to be removed... # Backward compatibility
extra-y += $(EXTRA_TARGETS) asflags-y += $(EXTRA_AFLAGS)
ccflags-y += $(EXTRA_CFLAGS)
cppflags-y += $(EXTRA_CPPFLAGS)
ldflags-y += $(EXTRA_LDFLAGS)
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
# =========================================================================== # ===========================================================================
...@@ -44,9 +48,9 @@ multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y))) ...@@ -44,9 +48,9 @@ multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
multi-objs := $(multi-objs-y) $(multi-objs-m) multi-objs := $(multi-objs-y) $(multi-objs-m)
# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
# in the local directory # tell kbuild to descend
subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) subdir-obj-y := $(filter %/built-in.o, $(obj-y))
# $(obj-dirs) is a list of directories that contain object files # $(obj-dirs) is a list of directories that contain object files
obj-dirs := $(dir $(multi-objs) $(subdir-obj-y)) obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
...@@ -86,9 +90,9 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" ...@@ -86,9 +90,9 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
modname_flags = $(if $(filter 1,$(words $(modname))),\ modname_flags = $(if $(filter 1,$(words $(modname))),\
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) _c_flags = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(basetarget).o)
_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) _a_flags = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(basetarget).o)
_cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
# If building the kernel in a separate objtree expand all occurrences # If building the kernel in a separate objtree expand all occurrences
# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
...@@ -108,16 +112,16 @@ __a_flags = $(call flags,_a_flags) ...@@ -108,16 +112,16 @@ __a_flags = $(call flags,_a_flags)
__cpp_flags = $(call flags,_cpp_flags) __cpp_flags = $(call flags,_cpp_flags)
endif endif
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
$(__c_flags) $(modkern_cflags) \ $(__c_flags) $(modkern_cflags) \
-D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
$(__a_flags) $(modkern_aflags) $(__a_flags) $(modkern_aflags)
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) ld_flags = $(LDFLAGS) $(ldflags-y)
# Finds the multi-part object the current object will be linked into # Finds the multi-part object the current object will be linked into
modname-multi = $(sort $(foreach m,$(multi-used),\ modname-multi = $(sort $(foreach m,$(multi-used),\
...@@ -140,14 +144,14 @@ $(obj)/%:: $(src)/%_shipped ...@@ -140,14 +144,14 @@ $(obj)/%:: $(src)/%_shipped
# target: source(s) FORCE # target: source(s) FORCE
# $(if_changed,ld/objcopy/gzip) # $(if_changed,ld/objcopy/gzip)
# #
# and add target to EXTRA_TARGETS so that we know we have to # and add target to extra-y so that we know we have to
# read in the saved command line # read in the saved command line
# Linking # Linking
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
quiet_cmd_ld = LD $@ quiet_cmd_ld = LD $@
cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
$(filter-out FORCE,$^) -o $@ $(filter-out FORCE,$^) -o $@
# Objcopy # Objcopy
......
### ###
# Makefile.basic list the most basic programs used during the build process. # Makefile.basic lists the most basic programs used during the build process.
# The programs listed herein is what is needed to do the basic stuff, # The programs listed herein are what are needed to do the basic stuff,
# such as fix dependency file. # such as fix file dependencies.
# This initial step is needed to avoid files to be recompiled # This initial step is needed to avoid files to be recompiled
# when kernel configuration changes (which is what happens when # when kernel configuration changes (which is what happens when
# .config is included by main Makefile. # .config is included by main Makefile.
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# fixdep: Used to generate dependency information during build process # fixdep: Used to generate dependency information during build process
# docproc: Used in Documentation/docbook # docproc: Used in Documentation/DocBook
hostprogs-y := fixdep docproc hostprogs-y := fixdep docproc
always := $(hostprogs-y) always := $(hostprogs-y)
......
...@@ -10,8 +10,10 @@ ...@@ -10,8 +10,10 @@
* documentation-frontend * documentation-frontend
* Scans the template file and call kernel-doc for * Scans the template file and call kernel-doc for
* all occurrences of ![EIF]file * all occurrences of ![EIF]file
* Beforehand each referenced file are scanned for * Beforehand each referenced file is scanned for
* any exported sympols "EXPORT_SYMBOL()" statements. * any symbols that are exported via these macros:
* EXPORT_SYMBOL(), EXPORT_SYMBOL_GPL(), &
* EXPORT_SYMBOL_GPL_FUTURE()
* This is used to create proper -function and * This is used to create proper -function and
* -nofunction arguments in calls to kernel-doc. * -nofunction arguments in calls to kernel-doc.
* Usage: docproc doc file.tmpl * Usage: docproc doc file.tmpl
...@@ -73,7 +75,7 @@ void usage (void) ...@@ -73,7 +75,7 @@ void usage (void)
} }
/* /*
* Execute kernel-doc with parameters givin in svec * Execute kernel-doc with parameters given in svec
*/ */
void exec_kernel_doc(char **svec) void exec_kernel_doc(char **svec)
{ {
...@@ -82,7 +84,7 @@ void exec_kernel_doc(char **svec) ...@@ -82,7 +84,7 @@ void exec_kernel_doc(char **svec)
char real_filename[PATH_MAX + 1]; char real_filename[PATH_MAX + 1];
/* Make sure output generated so far are flushed */ /* Make sure output generated so far are flushed */
fflush(stdout); fflush(stdout);
switch(pid=fork()) { switch (pid=fork()) {
case -1: case -1:
perror("fork"); perror("fork");
exit(1); exit(1);
...@@ -133,6 +135,7 @@ struct symfile * add_new_file(char * filename) ...@@ -133,6 +135,7 @@ struct symfile * add_new_file(char * filename)
symfilelist[symfilecnt++].filename = strdup(filename); symfilelist[symfilecnt++].filename = strdup(filename);
return &symfilelist[symfilecnt - 1]; return &symfilelist[symfilecnt - 1];
} }
/* Check if file already are present in the list */ /* Check if file already are present in the list */
struct symfile * filename_exist(char * filename) struct symfile * filename_exist(char * filename)
{ {
...@@ -156,8 +159,8 @@ void noaction2(char * file, char * line) { file = file; line = line; } ...@@ -156,8 +159,8 @@ void noaction2(char * file, char * line) { file = file; line = line; }
void printline(char * line) { printf("%s", line); } void printline(char * line) { printf("%s", line); }
/* /*
* Find all symbols exported with EXPORT_SYMBOL and EXPORT_SYMBOL_GPL * Find all symbols in filename that are exported with EXPORT_SYMBOL &
* in filename. * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
* All symbols located are stored in symfilelist. * All symbols located are stored in symfilelist.
*/ */
void find_export_symbols(char * filename) void find_export_symbols(char * filename)
...@@ -179,15 +182,15 @@ void find_export_symbols(char * filename) ...@@ -179,15 +182,15 @@ void find_export_symbols(char * filename)
perror(real_filename); perror(real_filename);
exit(1); exit(1);
} }
while(fgets(line, MAXLINESZ, fp)) { while (fgets(line, MAXLINESZ, fp)) {
char *p; char *p;
char *e; char *e;
if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) ||
((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) {
/* Skip EXPORT_SYMBOL{_GPL} */ /* Skip EXPORT_SYMBOL{_GPL} */
while (isalnum(*p) || *p == '_') while (isalnum(*p) || *p == '_')
p++; p++;
/* Remove paranteses and additional ws */ /* Remove parentheses & additional whitespace */
while (isspace(*p)) while (isspace(*p))
p++; p++;
if (*p != '(') if (*p != '(')
...@@ -211,7 +214,7 @@ void find_export_symbols(char * filename) ...@@ -211,7 +214,7 @@ void find_export_symbols(char * filename)
* Document all external or internal functions in a file. * Document all external or internal functions in a file.
* Call kernel-doc with following parameters: * Call kernel-doc with following parameters:
* kernel-doc -docbook -nofunction function_name1 filename * kernel-doc -docbook -nofunction function_name1 filename
* function names are obtained from all the src files * Function names are obtained from all the src files
* by find_export_symbols. * by find_export_symbols.
* intfunc uses -nofunction * intfunc uses -nofunction
* extfunc uses -function * extfunc uses -function
...@@ -262,7 +265,7 @@ void singfunc(char * filename, char * line) ...@@ -262,7 +265,7 @@ void singfunc(char * filename, char * line)
vec[idx++] = KERNELDOC; vec[idx++] = KERNELDOC;
vec[idx++] = DOCBOOK; vec[idx++] = DOCBOOK;
/* Split line up in individual parameters preceeded by FUNCTION */ /* Split line up in individual parameters preceded by FUNCTION */
for (i=0; line[i]; i++) { for (i=0; line[i]; i++) {
if (isspace(line[i])) { if (isspace(line[i])) {
line[i] = '\0'; line[i] = '\0';
...@@ -292,7 +295,7 @@ void parse_file(FILE *infile) ...@@ -292,7 +295,7 @@ void parse_file(FILE *infile)
{ {
char line[MAXLINESZ]; char line[MAXLINESZ];
char * s; char * s;
while(fgets(line, MAXLINESZ, infile)) { while (fgets(line, MAXLINESZ, infile)) {
if (line[0] == '!') { if (line[0] == '!') {
s = line + 2; s = line + 2;
switch (line[1]) { switch (line[1]) {
...@@ -351,9 +354,9 @@ int main(int argc, char *argv[]) ...@@ -351,9 +354,9 @@ int main(int argc, char *argv[])
{ {
/* Need to do this in two passes. /* Need to do this in two passes.
* First pass is used to collect all symbols exported * First pass is used to collect all symbols exported
* in the various files. * in the various files;
* Second pass generate the documentation. * Second pass generate the documentation.
* This is required because function are declared * This is required because some functions are declared
* and exported in different files :-(( * and exported in different files :-((
*/ */
/* Collect symbols */ /* Collect symbols */
...@@ -396,4 +399,3 @@ int main(int argc, char *argv[]) ...@@ -396,4 +399,3 @@ int main(int argc, char *argv[])
fflush(stdout); fflush(stdout);
return exitstatus; return exitstatus;
} }
#!/bin/sh
# Find Kconfig variables used in source code but never defined in Kconfig
# Copyright (C) 2007, Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
# Tested with dash.
paths="$@"
[ -z "$paths" ] && paths=.
# Doing this once at the beginning saves a lot of time, on a cache-hot tree.
Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`"
echo -e "File list \tundefined symbol used"
find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i
do
# Output the bare Kconfig variable and the filename; the _MODULE part at
# the end is not removed here (would need perl an not-hungry regexp for that).
sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Z_]\+\).*!\2 '$i'!p' < $i
done | \
# Smart "sort|uniq" implemented in awk and tuned to collect the names of all
# files which use a given symbol
awk '{map[$1, count[$1]++] = $2; }
END {
for (combIdx in map) {
split(combIdx, separate, SUBSEP);
# The value may have been removed.
if (! ( (separate[1], separate[2]) in map ) )
continue;
symb=separate[1];
printf "%s ", symb;
#Use gawk extension to delete the names vector
delete names;
#Portably delete the names vector
#split("", names);
for (i=0; i < count[symb]; i++) {
names[map[symb, i]] = 1;
# Unfortunately, we may still encounter symb, i in the
# outside iteration.
delete map[symb, i];
}
i=0;
for (name in names) {
if (i > 0)
printf ", %s", name;
else
printf "%s", name;
i++;
}
printf "\n";
}
}' |
while read symb files; do
# Remove the _MODULE suffix when checking the variable name. This should
# be done only on tristate symbols, actually, but Kconfig parsing is
# beyond the purpose of this script.
symb_bare=`echo $symb | sed -e 's/_MODULE//'`
if ! grep -q "\<$symb_bare\>" $Kconfigs; then
echo -e "$files: \t$symb"
fi
done|sort
...@@ -103,16 +103,16 @@ foreach my $thismod (@allcfiles) { ...@@ -103,16 +103,16 @@ foreach my $thismod (@allcfiles) {
my $state=0; my $state=0;
while ( <MODULE_MODULE> ) { while ( <MODULE_MODULE> ) {
chomp; chomp;
if ($state eq 0) { if ($state == 0) {
$state = 1 if ($_ =~ /static const struct modversion_info/); $state = 1 if ($_ =~ /static const struct modversion_info/);
next; next;
} }
if ($state eq 1) { if ($state == 1) {
$state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/); $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/);
next; next;
} }
if ($state eq 2) { if ($state == 2) {
if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { if ( $_ !~ /0x[0-9a-f]+,/ ) {
next; next;
} }
my $sym = (split /([,"])/,)[4]; my $sym = (split /([,"])/,)[4];
...@@ -121,7 +121,7 @@ foreach my $thismod (@allcfiles) { ...@@ -121,7 +121,7 @@ foreach my $thismod (@allcfiles) {
push(@{$MODULE{$thismod}} , $sym); push(@{$MODULE{$thismod}} , $sym);
} }
} }
if ($state ne 2) { if ($state != 2) {
print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";
} }
close(MODULE_MODULE); close(MODULE_MODULE);
......
...@@ -9,10 +9,16 @@ ...@@ -9,10 +9,16 @@
# gcc-2.95.3, `030301' for gcc-3.3.1, etc. # gcc-2.95.3, `030301' for gcc-3.3.1, etc.
# #
if [ $1 = "-p" ] ; then with_patchlevel=1; shift; fi if [[ $1 = "-p" ]] ; then with_patchlevel=1; shift; fi
compiler="$*" compiler="$*"
if [ ${#compiler} -eq 0 ]; then
echo "Error: No compiler specified."
echo -e "Usage:\n\t$0 <gcc-command>"
exit 1
fi
MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1) MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
if [ "x$with_patchlevel" != "x" ] ; then if [ "x$with_patchlevel" != "x" ] ; then
......
...@@ -23,14 +23,16 @@ quiet_cmd_keywords.c = GPERF $@ ...@@ -23,14 +23,16 @@ quiet_cmd_keywords.c = GPERF $@
$(obj)/keywords.c: $(obj)/keywords.gperf FORCE $(obj)/keywords.c: $(obj)/keywords.gperf FORCE
$(call if_changed,keywords.c) $(call if_changed,keywords.c)
cp $@ $@_shipped
# flex # flex
quiet_cmd_lex.c = FLEX $@ quiet_cmd_lex.c = FLEX $@
cmd_lex.c = flex -o$@ -d $(filter-out FORCE,$^) cmd_lex.c = flex -o$@ -d $< $(obj)/parse.h
$(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h FORCE $(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h $(obj)/keywords.c FORCE
$(call if_changed,lex.c) $(call if_changed,lex.c)
cp $@ $@_shipped
# bison # bison
...@@ -39,6 +41,8 @@ quiet_cmd_parse.c = BISON $@ ...@@ -39,6 +41,8 @@ quiet_cmd_parse.c = BISON $@
$(obj)/parse.c: $(obj)/parse.y FORCE $(obj)/parse.c: $(obj)/parse.y FORCE
$(call if_changed,parse.c) $(call if_changed,parse.c)
cp $@ $@_shipped
cp $(@:.c=.h) $(@:.c=.h)_shipped
$(obj)/parse.h: $(obj)/parse.c ; $(obj)/parse.h: $(obj)/parse.c ;
......
/* ANSI-C code produced by gperf version 3.0.1 */ /* ANSI-C code produced by gperf version 3.0.2 */
/* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#line 3 "scripts/genksyms/keywords.gperf" #line 3 "scripts/genksyms/keywords.gperf"
struct resword { const char *name; int token; }; struct resword { const char *name; int token; };
/* maximum key range = 68, duplicates = 0 */ /* maximum key range = 62, duplicates = 0 */
#ifdef __GNUC__ #ifdef __GNUC__
__inline __inline
...@@ -46,32 +46,32 @@ is_reserved_hash (register const char *str, register unsigned int len) ...@@ -46,32 +46,32 @@ is_reserved_hash (register const char *str, register unsigned int len)
{ {
static const unsigned char asso_values[] = static const unsigned char asso_values[] =
{ {
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 0, 65, 65, 65, 65, 65, 65, 65, 65, 65, 5,
71, 71, 71, 71, 71, 71, 35, 71, 71, 71, 65, 65, 65, 65, 65, 65, 35, 65, 65, 65,
5, 71, 71, 71, 71, 71, 71, 71, 71, 71, 0, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 0, 71, 0, 71, 5, 65, 65, 65, 65, 65, 0, 65, 0, 65, 5,
5, 0, 10, 20, 71, 25, 71, 71, 20, 0, 20, 15, 10, 30, 65, 15, 65, 65, 20, 0,
20, 30, 25, 71, 10, 5, 0, 20, 15, 71, 10, 35, 20, 65, 10, 5, 0, 10, 5, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71, 71, 71, 71, 71, 71 65, 65, 65, 65, 65, 65
}; };
return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]];
} }
...@@ -84,17 +84,17 @@ is_reserved_word (register const char *str, register unsigned int len) ...@@ -84,17 +84,17 @@ is_reserved_word (register const char *str, register unsigned int len)
{ {
enum enum
{ {
TOTAL_KEYWORDS = 42, TOTAL_KEYWORDS = 43,
MIN_WORD_LENGTH = 3, MIN_WORD_LENGTH = 3,
MAX_WORD_LENGTH = 24, MAX_WORD_LENGTH = 24,
MIN_HASH_VALUE = 3, MIN_HASH_VALUE = 3,
MAX_HASH_VALUE = 70 MAX_HASH_VALUE = 64
}; };
static const struct resword wordlist[] = static const struct resword wordlist[] =
{ {
{""}, {""}, {""}, {""}, {""}, {""},
#line 25 "scripts/genksyms/keywords.gperf" #line 26 "scripts/genksyms/keywords.gperf"
{"asm", ASM_KEYW}, {"asm", ASM_KEYW},
{""}, {""},
#line 8 "scripts/genksyms/keywords.gperf" #line 8 "scripts/genksyms/keywords.gperf"
...@@ -102,98 +102,98 @@ is_reserved_word (register const char *str, register unsigned int len) ...@@ -102,98 +102,98 @@ is_reserved_word (register const char *str, register unsigned int len)
{""}, {""},
#line 9 "scripts/genksyms/keywords.gperf" #line 9 "scripts/genksyms/keywords.gperf"
{"__asm__", ASM_KEYW}, {"__asm__", ASM_KEYW},
{""}, {""}, {""},
#line 22 "scripts/genksyms/keywords.gperf" #line 52 "scripts/genksyms/keywords.gperf"
{"_restrict", RESTRICT_KEYW},
#line 51 "scripts/genksyms/keywords.gperf"
{"__typeof__", TYPEOF_KEYW}, {"__typeof__", TYPEOF_KEYW},
#line 10 "scripts/genksyms/keywords.gperf" {""},
{"__attribute", ATTRIBUTE_KEYW},
#line 12 "scripts/genksyms/keywords.gperf" #line 12 "scripts/genksyms/keywords.gperf"
{"__const", CONST_KEYW}, {"__const", CONST_KEYW},
#line 11 "scripts/genksyms/keywords.gperf" #line 11 "scripts/genksyms/keywords.gperf"
{"__attribute__", ATTRIBUTE_KEYW}, {"__attribute__", ATTRIBUTE_KEYW},
#line 13 "scripts/genksyms/keywords.gperf" #line 13 "scripts/genksyms/keywords.gperf"
{"__const__", CONST_KEYW}, {"__const__", CONST_KEYW},
#line 17 "scripts/genksyms/keywords.gperf" #line 18 "scripts/genksyms/keywords.gperf"
{"__signed__", SIGNED_KEYW}, {"__signed__", SIGNED_KEYW},
#line 43 "scripts/genksyms/keywords.gperf" #line 44 "scripts/genksyms/keywords.gperf"
{"static", STATIC_KEYW}, {"static", STATIC_KEYW},
{""}, #line 20 "scripts/genksyms/keywords.gperf"
#line 16 "scripts/genksyms/keywords.gperf" {"__volatile__", VOLATILE_KEYW},
{"__signed", SIGNED_KEYW}, #line 39 "scripts/genksyms/keywords.gperf"
#line 31 "scripts/genksyms/keywords.gperf" {"int", INT_KEYW},
#line 32 "scripts/genksyms/keywords.gperf"
{"char", CHAR_KEYW}, {"char", CHAR_KEYW},
{""}, #line 33 "scripts/genksyms/keywords.gperf"
#line 44 "scripts/genksyms/keywords.gperf" {"const", CONST_KEYW},
#line 45 "scripts/genksyms/keywords.gperf"
{"struct", STRUCT_KEYW}, {"struct", STRUCT_KEYW},
#line 23 "scripts/genksyms/keywords.gperf"
{"__restrict__", RESTRICT_KEYW},
#line 24 "scripts/genksyms/keywords.gperf" #line 24 "scripts/genksyms/keywords.gperf"
{"__restrict__", RESTRICT_KEYW},
#line 25 "scripts/genksyms/keywords.gperf"
{"restrict", RESTRICT_KEYW}, {"restrict", RESTRICT_KEYW},
#line 34 "scripts/genksyms/keywords.gperf" #line 23 "scripts/genksyms/keywords.gperf"
{"_restrict", RESTRICT_KEYW},
#line 16 "scripts/genksyms/keywords.gperf"
{"__inline__", INLINE_KEYW},
#line 10 "scripts/genksyms/keywords.gperf"
{"__attribute", ATTRIBUTE_KEYW},
{""},
#line 14 "scripts/genksyms/keywords.gperf"
{"__extension__", EXTENSION_KEYW},
#line 35 "scripts/genksyms/keywords.gperf"
{"enum", ENUM_KEYW}, {"enum", ENUM_KEYW},
#line 18 "scripts/genksyms/keywords.gperf" #line 19 "scripts/genksyms/keywords.gperf"
{"__volatile", VOLATILE_KEYW}, {"__volatile", VOLATILE_KEYW},
#line 35 "scripts/genksyms/keywords.gperf" #line 36 "scripts/genksyms/keywords.gperf"
{"extern", EXTERN_KEYW}, {"extern", EXTERN_KEYW},
#line 19 "scripts/genksyms/keywords.gperf" {""},
{"__volatile__", VOLATILE_KEYW}, #line 17 "scripts/genksyms/keywords.gperf"
#line 38 "scripts/genksyms/keywords.gperf" {"__signed", SIGNED_KEYW},
{"int", INT_KEYW},
#line 7 "scripts/genksyms/keywords.gperf" #line 7 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
#line 32 "scripts/genksyms/keywords.gperf"
{"const", CONST_KEYW},
#line 33 "scripts/genksyms/keywords.gperf"
{"double", DOUBLE_KEYW},
{""}, {""},
#line 14 "scripts/genksyms/keywords.gperf" #line 51 "scripts/genksyms/keywords.gperf"
{"typeof", TYPEOF_KEYW},
#line 46 "scripts/genksyms/keywords.gperf"
{"typedef", TYPEDEF_KEYW},
#line 15 "scripts/genksyms/keywords.gperf"
{"__inline", INLINE_KEYW}, {"__inline", INLINE_KEYW},
#line 30 "scripts/genksyms/keywords.gperf" #line 31 "scripts/genksyms/keywords.gperf"
{"auto", AUTO_KEYW}, {"auto", AUTO_KEYW},
#line 15 "scripts/genksyms/keywords.gperf"
{"__inline__", INLINE_KEYW},
#line 42 "scripts/genksyms/keywords.gperf"
{"signed", SIGNED_KEYW},
{""},
#line 47 "scripts/genksyms/keywords.gperf" #line 47 "scripts/genksyms/keywords.gperf"
{"union", UNION_KEYW},
{""}, {""},
#line 48 "scripts/genksyms/keywords.gperf"
{"unsigned", UNSIGNED_KEYW}, {"unsigned", UNSIGNED_KEYW},
{""}, #line 49 "scripts/genksyms/keywords.gperf"
#line 41 "scripts/genksyms/keywords.gperf" {"void", VOID_KEYW},
#line 42 "scripts/genksyms/keywords.gperf"
{"short", SHORT_KEYW}, {"short", SHORT_KEYW},
{""}, {""},
#line 50 "scripts/genksyms/keywords.gperf" #line 50 "scripts/genksyms/keywords.gperf"
{"typeof", TYPEOF_KEYW},
#line 45 "scripts/genksyms/keywords.gperf"
{"typedef", TYPEDEF_KEYW},
#line 49 "scripts/genksyms/keywords.gperf"
{"volatile", VOLATILE_KEYW}, {"volatile", VOLATILE_KEYW},
{""}, {""},
#line 36 "scripts/genksyms/keywords.gperf"
{"float", FLOAT_KEYW},
{""}, {""},
#line 40 "scripts/genksyms/keywords.gperf"
{"register", REGISTER_KEYW},
#line 48 "scripts/genksyms/keywords.gperf"
{"void", VOID_KEYW},
{""},
#line 37 "scripts/genksyms/keywords.gperf" #line 37 "scripts/genksyms/keywords.gperf"
{"inline", INLINE_KEYW}, {"float", FLOAT_KEYW},
#line 34 "scripts/genksyms/keywords.gperf"
{"double", DOUBLE_KEYW},
{""}, {""},
#line 5 "scripts/genksyms/keywords.gperf" #line 5 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
{""}, {""}, {""},
#line 21 "scripts/genksyms/keywords.gperf" #line 38 "scripts/genksyms/keywords.gperf"
{"_Bool", BOOL_KEYW}, {"inline", INLINE_KEYW},
{""},
#line 6 "scripts/genksyms/keywords.gperf" #line 6 "scripts/genksyms/keywords.gperf"
{"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
{""}, {""}, {""}, {""}, {""}, {""}, #line 41 "scripts/genksyms/keywords.gperf"
#line 39 "scripts/genksyms/keywords.gperf" {"register", REGISTER_KEYW},
{"long", LONG_KEYW}, {""},
{""}, {""}, {""}, {""}, {""}, #line 22 "scripts/genksyms/keywords.gperf"
#line 46 "scripts/genksyms/keywords.gperf" {"_Bool", BOOL_KEYW},
{"union", UNION_KEYW} #line 43 "scripts/genksyms/keywords.gperf"
{"signed", SIGNED_KEYW},
{""}, {""},
#line 40 "scripts/genksyms/keywords.gperf"
{"long", LONG_KEYW}
}; };
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
......
...@@ -11,6 +11,7 @@ __attribute, ATTRIBUTE_KEYW ...@@ -11,6 +11,7 @@ __attribute, ATTRIBUTE_KEYW
__attribute__, ATTRIBUTE_KEYW __attribute__, ATTRIBUTE_KEYW
__const, CONST_KEYW __const, CONST_KEYW
__const__, CONST_KEYW __const__, CONST_KEYW
__extension__, EXTENSION_KEYW
__inline, INLINE_KEYW __inline, INLINE_KEYW
__inline__, INLINE_KEYW __inline__, INLINE_KEYW
__signed, SIGNED_KEYW __signed, SIGNED_KEYW
......
This diff is collapsed.
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.0. */ /* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -15,13 +17,21 @@ ...@@ -15,13 +17,21 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111-1307, USA. */ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
/* As a special exception, when this file is copied by Bison into a This special exception was added by the Free Software Foundation in
Bison output file, you may use that output file without restriction. version 2.2 of Bison. */
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
...@@ -38,39 +48,41 @@ ...@@ -38,39 +48,41 @@
DOUBLE_KEYW = 264, DOUBLE_KEYW = 264,
ENUM_KEYW = 265, ENUM_KEYW = 265,
EXTERN_KEYW = 266, EXTERN_KEYW = 266,
FLOAT_KEYW = 267, EXTENSION_KEYW = 267,
INLINE_KEYW = 268, FLOAT_KEYW = 268,
INT_KEYW = 269, INLINE_KEYW = 269,
LONG_KEYW = 270, INT_KEYW = 270,
REGISTER_KEYW = 271, LONG_KEYW = 271,
RESTRICT_KEYW = 272, REGISTER_KEYW = 272,
SHORT_KEYW = 273, RESTRICT_KEYW = 273,
SIGNED_KEYW = 274, SHORT_KEYW = 274,
STATIC_KEYW = 275, SIGNED_KEYW = 275,
STRUCT_KEYW = 276, STATIC_KEYW = 276,
TYPEDEF_KEYW = 277, STRUCT_KEYW = 277,
UNION_KEYW = 278, TYPEDEF_KEYW = 278,
UNSIGNED_KEYW = 279, UNION_KEYW = 279,
VOID_KEYW = 280, UNSIGNED_KEYW = 280,
VOLATILE_KEYW = 281, VOID_KEYW = 281,
TYPEOF_KEYW = 282, VOLATILE_KEYW = 282,
EXPORT_SYMBOL_KEYW = 283, TYPEOF_KEYW = 283,
ASM_PHRASE = 284, EXPORT_SYMBOL_KEYW = 284,
ATTRIBUTE_PHRASE = 285, ASM_PHRASE = 285,
BRACE_PHRASE = 286, ATTRIBUTE_PHRASE = 286,
BRACKET_PHRASE = 287, BRACE_PHRASE = 287,
EXPRESSION_PHRASE = 288, BRACKET_PHRASE = 288,
CHAR = 289, EXPRESSION_PHRASE = 289,
DOTS = 290, CHAR = 290,
IDENT = 291, DOTS = 291,
INT = 292, IDENT = 292,
REAL = 293, INT = 293,
STRING = 294, REAL = 294,
TYPE = 295, STRING = 295,
OTHER = 296, TYPE = 296,
FILENAME = 297 OTHER = 297,
FILENAME = 298
}; };
#endif #endif
/* Tokens. */
#define ASM_KEYW 258 #define ASM_KEYW 258
#define ATTRIBUTE_KEYW 259 #define ATTRIBUTE_KEYW 259
#define AUTO_KEYW 260 #define AUTO_KEYW 260
...@@ -80,42 +92,43 @@ ...@@ -80,42 +92,43 @@
#define DOUBLE_KEYW 264 #define DOUBLE_KEYW 264
#define ENUM_KEYW 265 #define ENUM_KEYW 265
#define EXTERN_KEYW 266 #define EXTERN_KEYW 266
#define FLOAT_KEYW 267 #define EXTENSION_KEYW 267
#define INLINE_KEYW 268 #define FLOAT_KEYW 268
#define INT_KEYW 269 #define INLINE_KEYW 269
#define LONG_KEYW 270 #define INT_KEYW 270
#define REGISTER_KEYW 271 #define LONG_KEYW 271
#define RESTRICT_KEYW 272 #define REGISTER_KEYW 272
#define SHORT_KEYW 273 #define RESTRICT_KEYW 273
#define SIGNED_KEYW 274 #define SHORT_KEYW 274
#define STATIC_KEYW 275 #define SIGNED_KEYW 275
#define STRUCT_KEYW 276 #define STATIC_KEYW 276
#define TYPEDEF_KEYW 277 #define STRUCT_KEYW 277
#define UNION_KEYW 278 #define TYPEDEF_KEYW 278
#define UNSIGNED_KEYW 279 #define UNION_KEYW 279
#define VOID_KEYW 280 #define UNSIGNED_KEYW 280
#define VOLATILE_KEYW 281 #define VOID_KEYW 281
#define TYPEOF_KEYW 282 #define VOLATILE_KEYW 282
#define EXPORT_SYMBOL_KEYW 283 #define TYPEOF_KEYW 283
#define ASM_PHRASE 284 #define EXPORT_SYMBOL_KEYW 284
#define ATTRIBUTE_PHRASE 285 #define ASM_PHRASE 285
#define BRACE_PHRASE 286 #define ATTRIBUTE_PHRASE 286
#define BRACKET_PHRASE 287 #define BRACE_PHRASE 287
#define EXPRESSION_PHRASE 288 #define BRACKET_PHRASE 288
#define CHAR 289 #define EXPRESSION_PHRASE 289
#define DOTS 290 #define CHAR 290
#define IDENT 291 #define DOTS 291
#define INT 292 #define IDENT 292
#define REAL 293 #define INT 293
#define STRING 294 #define REAL 294
#define TYPE 295 #define STRING 295
#define OTHER 296 #define TYPE 296
#define FILENAME 297 #define OTHER 297
#define FILENAME 298
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE; typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
...@@ -124,5 +137,3 @@ typedef int YYSTYPE; ...@@ -124,5 +137,3 @@ typedef int YYSTYPE;
extern YYSTYPE yylval; extern YYSTYPE yylval;
...@@ -61,6 +61,7 @@ remove_list(struct string_list **pb, struct string_list **pe) ...@@ -61,6 +61,7 @@ remove_list(struct string_list **pb, struct string_list **pe)
%token DOUBLE_KEYW %token DOUBLE_KEYW
%token ENUM_KEYW %token ENUM_KEYW
%token EXTERN_KEYW %token EXTERN_KEYW
%token EXTENSION_KEYW
%token FLOAT_KEYW %token FLOAT_KEYW
%token INLINE_KEYW %token INLINE_KEYW
%token INT_KEYW %token INT_KEYW
...@@ -110,7 +111,9 @@ declaration: ...@@ -110,7 +111,9 @@ declaration:
; ;
declaration1: declaration1:
TYPEDEF_KEYW { is_typedef = 1; } simple_declaration EXTENSION_KEYW TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
{ $$ = $4; }
| TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
{ $$ = $3; } { $$ = $3; }
| simple_declaration | simple_declaration
| function_definition | function_definition
......
...@@ -143,14 +143,8 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ ...@@ -143,14 +143,8 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
.tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
clean-files += mconf qconf gconf clean-files += mconf qconf gconf
# Needed for systems without gettext # Add environment specific flags
KBUILD_HAVE_NLS := $(shell \ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \
then echo yes ; \
else echo no ; fi)
ifeq ($(KBUILD_HAVE_NLS),no)
HOSTCFLAGS += -DKBUILD_NO_NLS
endif
# generated files seem to need this to find local include files # generated files seem to need this to find local include files
HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_lex.zconf.o := -I$(src)
......
#!/bin/sh
# Needed for systems without gettext
$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
#include <libintl.h>
int main()
{
gettext("");
return 0;
}
EOF
if [ ! "$?" -eq "0" ]; then
echo -DKBUILD_NO_NLS;
fi
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -84,12 +84,15 @@ void str_free(struct gstr *gs) ...@@ -84,12 +84,15 @@ void str_free(struct gstr *gs)
/* Append to growable string */ /* Append to growable string */
void str_append(struct gstr *gs, const char *s) void str_append(struct gstr *gs, const char *s)
{ {
size_t l = strlen(gs->s) + strlen(s) + 1; size_t l;
if (l > gs->len) { if (s) {
gs->s = realloc(gs->s, l); l = strlen(gs->s) + strlen(s) + 1;
gs->len = l; if (l > gs->len) {
gs->s = realloc(gs->s, l);
gs->len = l;
}
strcat(gs->s, s);
} }
strcat(gs->s, s);
} }
/* Append printf formatted string to growable string */ /* Append printf formatted string to growable string */
......
...@@ -23,7 +23,6 @@ help, T_HELP, TF_COMMAND ...@@ -23,7 +23,6 @@ help, T_HELP, TF_COMMAND
if, T_IF, TF_COMMAND|TF_PARAM if, T_IF, TF_COMMAND|TF_PARAM
endif, T_ENDIF, TF_COMMAND endif, T_ENDIF, TF_COMMAND
depends, T_DEPENDS, TF_COMMAND depends, T_DEPENDS, TF_COMMAND
requires, T_REQUIRES, TF_COMMAND
optional, T_OPTIONAL, TF_COMMAND optional, T_OPTIONAL, TF_COMMAND
default, T_DEFAULT, TF_COMMAND, S_UNKNOWN default, T_DEFAULT, TF_COMMAND, S_UNKNOWN
prompt, T_PROMPT, TF_COMMAND prompt, T_PROMPT, TF_COMMAND
...@@ -32,7 +31,6 @@ def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE ...@@ -32,7 +31,6 @@ def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE
bool, T_TYPE, TF_COMMAND, S_BOOLEAN bool, T_TYPE, TF_COMMAND, S_BOOLEAN
boolean, T_TYPE, TF_COMMAND, S_BOOLEAN boolean, T_TYPE, TF_COMMAND, S_BOOLEAN
def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN
def_boolean, T_DEFAULT, TF_COMMAND, S_BOOLEAN
int, T_TYPE, TF_COMMAND, S_INT int, T_TYPE, TF_COMMAND, S_INT
hex, T_TYPE, TF_COMMAND, S_HEX hex, T_TYPE, TF_COMMAND, S_HEX
string, T_TYPE, TF_COMMAND, S_STRING string, T_TYPE, TF_COMMAND, S_STRING
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment