From 426b79adc5c7519db89bfb4f8c831a00201532fe Mon Sep 17 00:00:00 2001 From: Thomas Kittelmann Date: Fri, 22 Nov 2024 12:48:10 +0100 Subject: [PATCH] Revert "Use -rpath-link as well in build-flags" This reverts commit 556ebf03c301d828e926f69dc66ed4cf63acd7c6. --- ncrystal_core/app_config/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ncrystal_core/app_config/main.c b/ncrystal_core/app_config/main.c index 1fe0584..34f7ab3 100644 --- a/ncrystal_core/app_config/main.c +++ b/ncrystal_core/app_config/main.c @@ -128,14 +128,12 @@ mcu8str nccfg_buildflags( nccfgstate* state ) //fixme mcu8str res = mcu8str_create_from_cstr("notimplementedonwindowsyet"); #else - //Construct a string like: - //"-Wl,-rpath,$libdir -Wl,-rpath-link,$libdir -Wl,$libpath -I$incdir" - mcu8str res = mcu8str_create( libdir.size*2 + libpath.size + incdir.size + //Construct "-Wl,-rpath,$libdir -Wl,$libpath -I$incdir" + mcu8str res = mcu8str_create( libdir.size + libpath.size + incdir.size + (size_t)128 ); + //+128 in last line for safety (+20 would be enough) mcu8str_append_cstr(&res,"-Wl,-rpath,"); mcu8str_append(&res,&libdir); - mcu8str_append_cstr(&res," -Wl,-rpath-link,"); - mcu8str_append(&res,&libdir); mcu8str_append_cstr(&res," -Wl,"); mcu8str_append(&res,&libpath); mcu8str_append_cstr(&res," -I");