Kbuild.include (c4c5551df136a7c4edd7c2f433d9a296b39826a2) | Kbuild.include (c931d34ea0853d41349e93f871bd3f17f1c03a6b) |
---|---|
1#### 2# kbuild: Generic definitions 3 4# Convenient variables 5comma := , 6quote := " 7squote := ' 8empty := --- 149 unchanged lines hidden (view full) --- 158cc-if-fullversion = $(shell [ $(cc-fullversion) $(1) $(2) ] && echo $(3) || echo $(4)) 159 160# cc-ldoption 161# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) 162cc-ldoption = $(call try-run,\ 163 $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) 164 165# ld-option | 1#### 2# kbuild: Generic definitions 3 4# Convenient variables 5comma := , 6quote := " 7squote := ' 8empty := --- 149 unchanged lines hidden (view full) --- 158cc-if-fullversion = $(shell [ $(cc-fullversion) $(1) $(2) ] && echo $(3) || echo $(4)) 159 160# cc-ldoption 161# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) 162cc-ldoption = $(call try-run,\ 163 $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) 164 165# ld-option |
166# Usage: LDFLAGS += $(call ld-option, -X) 167ld-option = $(call try-run, $(LD) $(LDFLAGS) $(1) -v,$(1),$(2)) | 166# Usage: LDFLAGS += $(call ld-option, -X, -Y) 167ld-option = $(call try-run, $(LD) $(LDFLAGS) $(1) -v,$(1),$(2),$(3)) |
168 169# ar-option 170# Usage: KBUILD_ARFLAGS := $(call ar-option,D) 171# Important: no spaces around options 172ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) 173 174# ld-version 175# Note this is mainly for HJ Lu's 3 number binutil versions --- 33 unchanged lines hidden (view full) --- 209# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.headersinst obj= 210# Usage: 211# $(Q)$(MAKE) $(hdr-inst)=dir 212hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj 213 214# Prefix -I with $(srctree) if it is not an absolute path. 215# skip if -I has no parameter 216addtree = $(if $(patsubst -I%,%,$(1)), \ | 168 169# ar-option 170# Usage: KBUILD_ARFLAGS := $(call ar-option,D) 171# Important: no spaces around options 172ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) 173 174# ld-version 175# Note this is mainly for HJ Lu's 3 number binutil versions --- 33 unchanged lines hidden (view full) --- 209# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.headersinst obj= 210# Usage: 211# $(Q)$(MAKE) $(hdr-inst)=dir 212hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj 213 214# Prefix -I with $(srctree) if it is not an absolute path. 215# skip if -I has no parameter 216addtree = $(if $(patsubst -I%,%,$(1)), \ |
217$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)),$(1)) | 217$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1))) |
218 219# Find all -I options and call addtree 220flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) 221 222# echo command. 223# Short version is used, if $(quiet) equals `quiet_', otherwise full one. 224echo-cmd = $(if $($(quiet)cmd_$(1)),\ 225 echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) --- 177 unchanged lines hidden --- | 218 219# Find all -I options and call addtree 220flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) 221 222# echo command. 223# Short version is used, if $(quiet) equals `quiet_', otherwise full one. 224echo-cmd = $(if $($(quiet)cmd_$(1)),\ 225 echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) --- 177 unchanged lines hidden --- |