From bd199de25f62c8961c917fb0ad81cd335b368e63 Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Thu, 11 Apr 2024 15:50:15 +0200 Subject: [PATCH] added a seccond change to the talloc patch --- overlays/patches/talloc-satic.patch | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/overlays/patches/talloc-satic.patch b/overlays/patches/talloc-satic.patch index b19ee56..b5b6eed 100644 --- a/overlays/patches/talloc-satic.patch +++ b/overlays/patches/talloc-satic.patch @@ -1,12 +1,11 @@ diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript -index 30cb366..56b939a 100644 +index 30cb366..d9abf06 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript -@@ -303,6 +303,15 @@ def configure(conf): - conf.CHECK_CC_ENV() +@@ -304,6 +304,15 @@ def configure(conf): conf.load('compiler_c') -+ + + # This seems to be the only way to not include the -Wl,-Bdynamic in the linker gcc cmdline + # because it is assumed as a common gcc flag in $src/third_party/waf/waflib/Tools/gcc.py + # and disabled only for certain platforms with no way to disable it from eg an ENV Variable @@ -15,6 +14,24 @@ index 30cb366..56b939a 100644 + # on the alpine static build it is no problem to have both -Wl,-Bdynamic and -Wl,-Bstatic + # but on nix it is a problem + conf.env.SHLIB_MARKER = "" - ++ conf.CHECK_STANDARD_LIBPATH() + # we need git for 'waf dist' +diff --git a/wscript b/wscript +index 075f1ec..79ea64b 100644 +--- a/wscript ++++ b/wscript +@@ -81,6 +81,13 @@ def configure(conf): + def build(bld): + bld.RECURSE('lib/replace') + ++ # without this following line the tasks: talloc-compat1-$VERSION, talloc_testsuite, talloc_test_magic_differs_helper ++ # have the -Wl,-Bstatic set before the -ltalloc, so the linker would look for a libtalloc.a, which isn't made anywhere ++ # copying the libtalloc made in postInstall manually to /build/talloc-x.x.x/bin/default would also make those commands work ++ # so another solution would be to run this ar command after all the .o files are made and before those 3 tasks ++ # but i am too lazy to make a task for this ar command and shedule it properly ++ bld.env.STLIB_MARKER = "" ++ + if bld.env.standalone_talloc: + private_library = False