[Concept,02/10] sandbox: Make use of PLATFORM_LIBS for ulib_test

Message ID 20250905212330.354827-3-sjg@u-boot.org
State New
Headers
Series ulib: Provide examples for building outside the tree |

Commit Message

Simon Glass Sept. 5, 2025, 9:23 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Rather than specifying the sandbox-specific arguments in the main
Makefile, make use of PLATFORM_LIBS which has (more than) what we need.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/Makefile b/Makefile
index e3b95290384..2e2f276eee6 100644
--- a/Makefile
+++ b/Makefile
@@ -1905,7 +1905,7 @@  quiet_cmd_ulib_test_static = HOSTCC  $@
 	-I$(srctree)/arch/sandbox/include -o $@ $< \
 	-Wl,-T,$(LIB_STATIC_LDS) \
 	-Wl,--whole-archive $(obj)/libu-boot.a -Wl,--no-whole-archive \
-	-lpthread -ldl -lSDL2 -lrt -Wl,-z,noexecstack
+	-ldl $(PLATFORM_LIBS) -Wl,-z,noexecstack
 
 test/ulib/ulib_test_static: test/ulib/ulib_test.o libu-boot.a \
 		$(LIB_STATIC_LDS) FORCE