diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2019-04-23 17:27:41 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-20 11:02:59 -0400 |
commit | 055efab3120bae7ab1ed841317774f3c953f6e1b (patch) | |
tree | d464025628dc65e9e36430ee53e35749639431be /scripts | |
parent | cb6f8739fbf98203d0fb0bc2c2dbbec0ddfe978a (diff) |
kbuild: drop support for cc-ldoption
If you want to see if your linker supports a certain flag, then ask the
linker directly with ld-option (not the compiler with cc-ldoption).
Checking for linker flag support is an antipattern that complicates the
usage of various linkers other than bfd via -fuse-ld={bfd|gold|lld}.
Cc: clang-built-linux@googlegroups.com
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 5 |
1 files changed, 0 insertions, 5 deletions
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)) |