[PATCH v3 01/23] Makefile.compiler: add objcopy-option
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Jan 8 08:25:27 PST 2026
On 1/8/26 4:49 PM, Sascha Hauer wrote:
> Similar to other *-option macros this one is for testing if objcopy
> flags are supported.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> scripts/Makefile.compiler | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/Makefile.compiler b/scripts/Makefile.compiler
> index 1d34239b3bbaf49dede33f67d69ebeb511b5dc28..f2fdddd07bbef9ea90da219602086b5be591a75d 100644
> --- a/scripts/Makefile.compiler
> +++ b/scripts/Makefile.compiler
> @@ -69,6 +69,11 @@ cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
> ld-option = $(call try-run,\
> $(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
>
> +# objcopy-option
> +# Usage: KBUILD_LDFLAGS += $(call objcopy-option,--strip-section-headers,--strip-all)
> +objcopy-option = $(call try-run,\
> + $(CC) -x c /dev/null -c -o "$$TMPO"; $(OBJCOPY) $(1) "$$TMPO" "$$TMP",$(1),$(2))
> +
> # Prefix -I with $(srctree) if it is not an absolute path.
> # skip if -I has no parameter
> addtree = $(if $(patsubst -I%,%,$(1)), \
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list