diff options
| author | Michal Marek <mmarek@suse.cz> | 2011-06-08 10:01:34 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2011-06-08 10:01:34 -0400 |
| commit | a61944c251c3e68c4bbf6eb96ff61c7b286351c5 (patch) | |
| tree | fd9f82297805d043a45a828626dfd29bddc48b00 /scripts | |
| parent | ac9a126571e76abec76e1c1f46672e82501eab1e (diff) | |
| parent | 55922c9d1b84b89cb946c777fddccb3247e7df2c (diff) | |
Merge commit 'v3.0-rc1' into kbuild/kconfig
Diffstat (limited to 'scripts')
35 files changed, 519 insertions, 214 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore index e2741d23bab8..105b21f08185 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore | |||
| @@ -8,3 +8,4 @@ bin2c | |||
| 8 | unifdef | 8 | unifdef |
| 9 | ihex2fw | 9 | ihex2fw |
| 10 | recordmcount | 10 | recordmcount |
| 11 | docproc | ||
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ed2773edfe71..be39cd1c74cf 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -118,6 +118,11 @@ cc-option-yn = $(call try-run,\ | |||
| 118 | cc-option-align = $(subst -functions=0,,\ | 118 | cc-option-align = $(subst -functions=0,,\ |
| 119 | $(call cc-option,-falign-functions=0,-malign-functions=0)) | 119 | $(call cc-option,-falign-functions=0,-malign-functions=0)) |
| 120 | 120 | ||
| 121 | # cc-disable-warning | ||
| 122 | # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) | ||
| 123 | cc-disable-warning = $(call try-run,\ | ||
| 124 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1))) | ||
| 125 | |||
| 121 | # cc-version | 126 | # cc-version |
| 122 | # Usage gcc-ver := $(call cc-version) | 127 | # Usage gcc-ver := $(call cc-version) |
| 123 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | 128 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) |
| @@ -141,6 +146,11 @@ cc-ldoption = $(call try-run,\ | |||
| 141 | ld-option = $(call try-run,\ | 146 | ld-option = $(call try-run,\ |
| 142 | $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) | 147 | $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) |
| 143 | 148 | ||
| 149 | # ar-option | ||
| 150 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) | ||
| 151 | # Important: no spaces around options | ||
| 152 | ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) | ||
| 153 | |||
| 144 | ###### | 154 | ###### |
| 145 | 155 | ||
| 146 | ### | 156 | ### |
| @@ -187,6 +197,8 @@ ifneq ($(KBUILD_NOCMDDEP),1) | |||
| 187 | # User may override this check using make KBUILD_NOCMDDEP=1 | 197 | # User may override this check using make KBUILD_NOCMDDEP=1 |
| 188 | arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ | 198 | arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ |
| 189 | $(filter-out $(cmd_$@), $(cmd_$(1))) ) | 199 | $(filter-out $(cmd_$@), $(cmd_$(1))) ) |
| 200 | else | ||
| 201 | arg-check = $(if $(strip $(cmd_$@)),,1) | ||
| 190 | endif | 202 | endif |
| 191 | 203 | ||
| 192 | # >'< substitution is for echo to work, | 204 | # >'< substitution is for echo to work, |
diff --git a/scripts/Makefile b/scripts/Makefile index fcea26168bca..df7678febf27 100644 --- a/scripts/Makefile +++ b/scripts/Makefile | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | # pnmttologo: Convert pnm files to logo files | 6 | # pnmttologo: Convert pnm files to logo files |
| 7 | # conmakehash: Create chartable | 7 | # conmakehash: Create chartable |
| 8 | # conmakehash: Create arrays for initializing the kernel console tables | 8 | # conmakehash: Create arrays for initializing the kernel console tables |
| 9 | # docproc: Used in Documentation/DocBook | ||
| 9 | 10 | ||
| 10 | hostprogs-$(CONFIG_KALLSYMS) += kallsyms | 11 | hostprogs-$(CONFIG_KALLSYMS) += kallsyms |
| 11 | hostprogs-$(CONFIG_LOGO) += pnmtologo | 12 | hostprogs-$(CONFIG_LOGO) += pnmtologo |
| @@ -16,12 +17,14 @@ hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount | |||
| 16 | always := $(hostprogs-y) $(hostprogs-m) | 17 | always := $(hostprogs-y) $(hostprogs-m) |
| 17 | 18 | ||
| 18 | # The following hostprogs-y programs are only build on demand | 19 | # The following hostprogs-y programs are only build on demand |
| 19 | hostprogs-y += unifdef | 20 | hostprogs-y += unifdef docproc |
| 20 | 21 | ||
| 21 | # This target is used internally to avoid "is up to date" messages | 22 | # These targets are used internally to avoid "is up to date" messages |
| 22 | PHONY += build_unifdef | 23 | PHONY += build_unifdef |
| 23 | build_unifdef: scripts/unifdef FORCE | 24 | build_unifdef: scripts/unifdef FORCE |
| 24 | @: | 25 | @: |
| 26 | build_docproc: scripts/docproc FORCE | ||
| 27 | @: | ||
| 25 | 28 | ||
| 26 | subdir-$(CONFIG_MODVERSIONS) += genksyms | 29 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
| 27 | subdir-y += mod | 30 | subdir-y += mod |
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic new file mode 100644 index 000000000000..490122c3e2aa --- /dev/null +++ b/scripts/Makefile.asm-generic | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # include/asm-generic contains a lot of files that are used | ||
| 2 | # verbatim by several architectures. | ||
| 3 | # | ||
| 4 | # This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild | ||
| 5 | # and for each file listed in this file with generic-y creates | ||
| 6 | # a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm) | ||
| 7 | |||
| 8 | kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild | ||
| 9 | -include $(kbuild-file) | ||
| 10 | |||
| 11 | include scripts/Kbuild.include | ||
| 12 | |||
| 13 | # Create output directory if not already present | ||
| 14 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | ||
| 15 | |||
| 16 | quiet_cmd_wrap = WRAP $@ | ||
| 17 | cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@ | ||
| 18 | |||
| 19 | all: $(patsubst %, $(obj)/%, $(generic-y)) | ||
| 20 | |||
| 21 | $(obj)/%.h: | ||
| 22 | $(call cmd,wrap) | ||
| 23 | |||
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d5f925abe4d2..a0fd5029cfe7 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
| @@ -51,36 +51,52 @@ ifeq ($(KBUILD_NOPEDANTIC),) | |||
| 51 | endif | 51 | endif |
| 52 | 52 | ||
| 53 | # | 53 | # |
| 54 | # make W=1 settings | 54 | # make W=... settings |
| 55 | # | 55 | # |
| 56 | # $(call cc-option... ) handles gcc -W.. options which | 56 | # W=1 - warnings that may be relevant and does not occur too often |
| 57 | # W=2 - warnings that occur quite often but may still be relevant | ||
| 58 | # W=3 - the more obscure warnings, can most likely be ignored | ||
| 59 | # | ||
| 60 | # $(call cc-option, -W...) handles gcc -W.. options which | ||
| 57 | # are not supported by all versions of the compiler | 61 | # are not supported by all versions of the compiler |
| 58 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | 62 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS |
| 59 | KBUILD_EXTRA_WARNINGS := -Wextra | 63 | warning- := $(empty) |
| 60 | KBUILD_EXTRA_WARNINGS += -Wunused -Wno-unused-parameter | 64 | |
| 61 | KBUILD_EXTRA_WARNINGS += -Waggregate-return | 65 | warning-1 := -Wextra -Wunused -Wno-unused-parameter |
| 62 | KBUILD_EXTRA_WARNINGS += -Wbad-function-cast | 66 | warning-1 += -Wmissing-declarations |
| 63 | KBUILD_EXTRA_WARNINGS += -Wcast-qual | 67 | warning-1 += -Wmissing-format-attribute |
| 64 | KBUILD_EXTRA_WARNINGS += -Wcast-align | 68 | warning-1 += -Wmissing-prototypes |
| 65 | KBUILD_EXTRA_WARNINGS += -Wconversion | 69 | warning-1 += -Wold-style-definition |
| 66 | KBUILD_EXTRA_WARNINGS += -Wdisabled-optimization | 70 | warning-1 += $(call cc-option, -Wmissing-include-dirs) |
| 67 | KBUILD_EXTRA_WARNINGS += -Wlogical-op | 71 | warning-1 += $(call cc-option, -Wunused-but-set-variable) |
| 68 | KBUILD_EXTRA_WARNINGS += -Wmissing-declarations | 72 | |
| 69 | KBUILD_EXTRA_WARNINGS += -Wmissing-format-attribute | ||
