meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/0004-SConscript-force-use-o...

39 lines
1.3 KiB
Diff
Raw Normal View History

gpsd: upgrade to 3.24 Usually when upgrading packages, we just copy the upstream package and adjust it slightly. I've looked at the upstream package here: https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-navigation/gpsd (HEAD at f3d14d41ad60d2d52a0ea795ae10fe0882146ed1) But as I compared both packaging trees, I found ours is quite different than upstream. We have a lot of additional patches, still use python2 and have these extra files: ├── gpsd │ ├── 60-gpsd.rules │ ├── gpsd │ ├── gpsd-default │ ├── gpsd.service │ ├── oc2g │ │ ├── gpsd-default │ │ └── gpsd.service │ ├── sysmobts2100 │ │ └── gpsd-default │ ├── sysmobts-v2 │ │ └── gpsd-default │ └── sysmocom-idu │ └── gpsd-default Therefore I didn't start with the upstream packaging but instead increased the gpsd version in our packaging and went through each patch to see if it can be dropped or needs to be forward ported. Change the version by renaming the .bb file. Reset the version of the recipe (PR) back to "r0" again, as it is common practice after changing the package version. The previous value "r3.20" looked a bit like a package version, but it's not that. Rebase patches: * 0001-gps2udp-Add-a-label-timestamp-and-mac-address-to-eac.patch * 0002-gps2udp-leave-argv-untouched.patch (leave-argv-untouched.patch) * 0003-tsip-configure-and-enable-1PPS.patch (gpsd-tsip-pps.patch) Add build fixes: * 0004-SConscript-force-use-of-pthread.patch Drop patches: * 0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch: unused in previous version * 0001-SConstruct-disable-html-and-man-docs-building-becaus.patch: doesn't apply, instead disable docs building via manbuild='no' * 0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch: not needed anymore (no splintopts line in 3.24) * gpsd-3.3-ldflags.patch: fixed upstream * no-rpath-please.patch: doesn't apply, not needed anymore (see 5df2de36 in gpsd.git) Related: https://docs.yoctoproject.org/bitbake/2.2/bitbake-user-manual/bitbake-user-manual-ref-variables.html#term-PR Related: SYS#6222 Change-Id: I2debe481c5f1cc4ee8290ad0dc883d6a4ea73741
2022-12-13 12:28:40 +00:00
From 221681eeebd621287bd7587475da27d4e7dd17fc Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
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