From 5f56cb030e4bcf14be2233332d5cd83fff62a376 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 1 Nov 2023 03:11:57 +0900 Subject: kbuild: support 'userldlibs' syntax This syntax is useful to specify libraries linked to all userspace programs in the Makefile. Signed-off-by: Masahiro Yamada --- scripts/Makefile.userprogs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/Makefile.userprogs') diff --git a/scripts/Makefile.userprogs b/scripts/Makefile.userprogs index fb415297337a..f3a7e1ef3753 100644 --- a/scripts/Makefile.userprogs +++ b/scripts/Makefile.userprogs @@ -19,19 +19,19 @@ user-cobjs := $(addprefix $(obj)/, $(user-cobjs)) user_ccflags = -Wp,-MMD,$(depfile) $(KBUILD_USERCFLAGS) $(userccflags) \ $($(target-stem)-userccflags) user_ldflags = $(KBUILD_USERLDFLAGS) $(userldflags) $($(target-stem)-userldflags) +user_ldlibs = $(userldlibs) $($(target-stem)-userldlibs) # Create an executable from a single .c file quiet_cmd_user_cc_c = CC [U] $@ cmd_user_cc_c = $(CC) $(user_ccflags) $(user_ldflags) -o $@ $< \ - $($(target-stem)-userldlibs) + $(user_ldlibs) $(user-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,user_cc_c) # Link an executable based on list of .o files quiet_cmd_user_ld = LD [U] $@ cmd_user_ld = $(CC) $(user_ldflags) -o $@ \ - $(addprefix $(obj)/, $($(target-stem)-objs)) \ - $($(target-stem)-userldlibs) + $(addprefix $(obj)/, $($(target-stem)-objs)) $(user_ldlibs) $(user-cmulti): FORCE $(call if_changed,user_ld) $(call multi_depend, $(user-cmulti), , -objs) -- cgit v1.2.3