From 77bd30282ceeb17c9e56a08aea5e5f3afacd26d1 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sat, 30 Nov 2019 22:23:52 +0800 Subject: [PATCH] build: Support non-standard ldso in executables --- src/build/config/gcc/BUILD.gn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/build/config/gcc/BUILD.gn b/src/build/config/gcc/BUILD.gn index 747245f376..190390d803 100644 --- a/src/build/config/gcc/BUILD.gn +++ b/src/build/config/gcc/BUILD.gn @@ -108,6 +108,11 @@ config("executable_config") { "-Wl,--disable-new-dtags", ] } + + # Needed for non-standard ldso on OpenWRT + if (current_toolchain == default_toolchain && ldso_path != "") { + ldflags += [ "-Wl,--dynamic-linker=${ldso_path}" ] + } } # Settings for shared libraries.