Skip to content

Commit

Permalink
Revert "Use -rpath-link as well in build-flags"
Browse files Browse the repository at this point in the history
This reverts commit 556ebf0.
  • Loading branch information
tkittel committed Nov 22, 2024
1 parent ba2ce72 commit 426b79a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ncrystal_core/app_config/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 426b79a

Please sign in to comment.