From 221681eeebd621287bd7587475da27d4e7dd17fc Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 13 Dec 2022 17:53:41 +0100 Subject: [PATCH] SConscript: force use of -pthread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With gpsd 3.24, the build system fails to properly detect that our GCC supports -pthread. When attempting to build without it, the build fails as follows. …/ld: gpsd-3.24/libgpsd.a(ppsthread.o): undefined reference to symbol 'pthread_create@@GLIBC_2.4' …/tmp/ERROR: scons build execution failed. …/gpsd/3.24-r0/recipe-sysroot/lib/libpthread.so.0: error adding symbols: DSO missing from command line | collect2: error: ld returned 1 exit status --- SConscript | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SConscript b/SConscript index ddffe068d..ec660c458 100644 --- a/SConscript +++ b/SConscript @@ -942,9 +942,7 @@ if not cleaning and not helping: if not config.CheckCC(): announce("ERROR: CC doesn't work") - if ((config.CheckCompilerOption("-pthread") and - not config.env['target_platform'].startswith('darwin'))): - config.env.MergeFlags("-pthread") + config.env.MergeFlags("-pthread") confdefs = ["/* gpsd_config.h generated by scons, do not hand-hack. */\n"] -- 2.34.1