]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Allow link flags to be given
authorSimon Glass <sjg@chromium.org>
Sun, 27 Mar 2022 20:26:17 +0000 (14:26 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 18 Apr 2022 21:53:56 +0000 (17:53 -0400)
At present the link flags are not used for sandbox. Update the command
line to use them.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/config.mk

index 2b1b657831c58110513cdd712a916cf00c611f06..02a3ba0c0e941a5e2d2b3c8d3e20783d181e8727 100644 (file)
@@ -16,7 +16,7 @@ PLATFORM_CPPFLAGS += $(shell $(SDL_CONFIG) --cflags)
 endif
 
 cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \
-       $(LTO_FINAL_LDFLAGS) \
+       $(KBUILD_LDFLAGS:%=-Wl,%)$(LTO_FINAL_LDFLAGS) \
        -Wl,--whole-archive \
                $(u-boot-main) \
                $(u-boot-keep-syms-lto) \
@@ -24,7 +24,7 @@ cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \
        $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
 
 cmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \
-       $(LTO_FINAL_LDFLAGS) \
+       $(KBUILD_LDFLAGS:%=-Wl,%) $(LTO_FINAL_LDFLAGS) \
        $(patsubst $(obj)/%,%,$(u-boot-spl-init)) \
        -Wl,--whole-archive \
                $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \