History

kbuild: Fix build with binutils <= 2.19

The D option of ar is only available in newer versions.

Michal Marek committed 15 years ago

Commit 40df7591 parent a8b80174 files · +16 −2Browse files

Showing the changes to scripts (2 of 4 files). Show all

Unified · Split

2 files
  1. scripts/Kbuild.include +5 −0
  2. scripts/Makefile.build +2 −2
scripts/Kbuild.include+5−0
@@ -141,6 +141,11 @@ cc-ldoption = $(call try-run,\ · 140 unmodified lines
141ld-option = $(call try-run,\141ld-option = $(call try-run,\
142 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))142 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
143 143
144# ar-option
145# Usage: KBUILD_ARFLAGS := $(call ar-option,D)
146# Important: no spaces around options
147ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2))
148
144######149######
145 150
146###151###
scripts/Makefile.build+2−2
@@ -345,7 +345,7 @@ quiet_cmd_link_o_target = LD $@ · 344 unmodified lines
345cmd_link_o_target = $(if $(strip $(obj-y)),\345cmd_link_o_target = $(if $(strip $(obj-y)),\
346 $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \346 $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \
347 $(cmd_secanalysis),\347 $(cmd_secanalysis),\
348 rm -f $@; $(AR) rcsD $@)348 rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@)
349 349
350$(builtin-target): $(obj-y) FORCE350$(builtin-target): $(obj-y) FORCE
351 $(call if_changed,link_o_target)351 $(call if_changed,link_o_target)
@@ -371,7 +371,7 @@ $(modorder-target): $(subdir-ym) FORCE · 19 unmodified lines
371#371#
372ifdef lib-target372ifdef lib-target
373quiet_cmd_link_l_target = AR $@373quiet_cmd_link_l_target = AR $@
374cmd_link_l_target = rm -f $@; $(AR) rcsD $@ $(lib-y)374cmd_link_l_target = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib-y)
375 375
376$(lib-target): $(lib-y) FORCE376$(lib-target): $(lib-y) FORCE
377 $(call if_changed,link_l_target)377 $(call if_changed,link_l_target)