diff options
| -rw-r--r-- | Documentation/kbuild/makefiles.txt | 14 | ||||
| -rw-r--r-- | scripts/Kbuild.include | 5 | ||||
| -rwxr-xr-x | scripts/modules-check.sh | 6 |
3 files changed, 3 insertions, 22 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 03c065855eaf..d65ad5746f94 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
| @@ -437,20 +437,6 @@ more details, with real examples. | |||
| 437 | The second argument is optional, and if supplied will be used | 437 | The second argument is optional, and if supplied will be used |
| 438 | if first argument is not supported. | 438 | if first argument is not supported. |
| 439 | 439 | ||
| 440 | cc-ldoption | ||
| 441 | cc-ldoption is used to check if $(CC) when used to link object files | ||
| 442 | supports the given option. An optional second option may be | ||
| 443 | specified if first option are not supported. | ||
| 444 | |||
| 445 | Example: | ||
| 446 | #arch/x86/kernel/Makefile | ||
| 447 | vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) | ||
| 448 | |||
| 449 | In the above example, vsyscall-flags will be assigned the option | ||
| 450 | -Wl$(comma)--hash-style=sysv if it is supported by $(CC). | ||
| 451 | The second argument is optional, and if supplied will be used | ||
| 452 | if first argument is not supported. | ||
| 453 | |||
| 454 | as-instr | 440 | as-instr |
| 455 | as-instr checks if the assembler reports a specific instruction | 441 | as-instr checks if the assembler reports a specific instruction |
| 456 | and then outputs either option1 or option2 | 442 | and then outputs either option1 or option2 |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index a675ce11a573..e2de6c4dce90 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -138,11 +138,6 @@ cc-disable-warning = $(call try-run,\ | |||
| 138 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) | 138 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) |
| 139 | cc-ifversion = $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $(3) || echo $(4)) | 139 | cc-ifversion = $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $(3) || echo $(4)) |
| 140 | 140 | ||
| 141 | # cc-ldoption | ||
| 142 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) | ||
| 143 | cc-ldoption = $(call try-run,\ | ||
| 144 | $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) | ||
| 145 | |||
| 146 | # ld-option | 141 | # ld-option |
| 147 | # Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y) | 142 | # Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y) |
| 148 | ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3)) | 143 | ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3)) |
diff --git a/scripts/modules-check.sh b/scripts/modules-check.sh index 2f659530e1ec..39e8cb36ba19 100755 --- a/scripts/modules-check.sh +++ b/scripts/modules-check.sh | |||
| @@ -6,10 +6,10 @@ set -e | |||
| 6 | # Check uniqueness of module names | 6 | # Check uniqueness of module names |
| 7 | check_same_name_modules() | 7 | check_same_name_modules() |
| 8 | { | 8 | { |
| 9 | for m in $(sed 's:.*/::' modules.order modules.builtin | sort | uniq -d) | 9 | for m in $(sed 's:.*/::' modules.order | sort | uniq -d) |
| 10 | do | 10 | do |
| 11 | echo "warning: same basename if the following are built as modules:" >&2 | 11 | echo "warning: same module names found:" >&2 |
| 12 | sed "/\/$m/!d;s:^kernel/: :" modules.order modules.builtin >&2 | 12 | sed -n "/\/$m/s:^kernel/: :p" modules.order >&2 |
| 13 | done | 13 | done |
| 14 | } | 14 | } |
| 15 | 15 | ||
