To check the linker version. Used by the LTO makefile.
Showing the changes to scripts/Kbuild.include (1 of 2 files). Show all
Unified · Split
| @@ -155,6 +155,15 @@ ld-option = $(call try-run,\ · 154 unmodified lines | ||
| 155 | 155 | # Important: no spaces around options |
| 156 | 156 | ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) |
| 157 | 157 | |
| 158 | +# ld-version | |
| 159 | +# Usage: $(call ld-version) | |
| 160 | +# Note this is mainly for HJ Lu's 3 number binutil versions | |
| 161 | +ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh) | |
| 162 | + | |
| 163 | +# ld-ifversion | |
| 164 | +# Usage: $(call ld-ifversion, -ge, 22252, y) | |
| 165 | +ld-ifversion = $(shell [ $(call ld-version) $(1) $(2) ] && echo $(3)) | |
| 166 | + | |
| 158 | 167 | ###### |
| 159 | 168 | |
| 160 | 169 | ### |