fwts-22.03.00 build fix patch
orbea
orbea at riseup.net
Wed May 11 16:43:20 UTC 2022
Hi,
When building fwts with slibtool
(https://dev.midipix.org/cross/slibtool) the build fail with undefined
references. This is because the build system is using -lfoo linker
flags for internal dependencies instead of using the libtool archive
(.la) files instead. Additionally there are several instances of
hardcoded pkg-config calls and linker flags in LDFLAGS rather than
LIBADD and LDADD.
I attached a patch that fixes the issues by doing a few things.
* Removed hardcoded pkg-config calls and replaced them with
PKG_CHECK_MODULES as needed.
* Clearly delimited LDFLAGS from LDADD and LIBADD. Build systems should
only add non-dependency linker flags to LDFLAGS while LDADD and
LIBADD should be for any required dependencies.
* Removed any -lfoo linker flags for internal dependencies and added
them as .la files to link the fwts binary which now uses
-no-undefined. Using -lfoo linker flags should be only for external
dependencies and often results in undefined errors or the linker
flags entirely not found with slibtool. Slibtool is far more strict
about user error than GNU libtool which often silently hides such
issues.
* Cleared out a few unneeded or redundant linker flags.
Gentoo bug: https://bugs.gentoo.org/780372
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fwts-22.03.00-slibtool.patch
Type: text/x-patch
Size: 4777 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20220511/9c8783cf/attachment.bin>
More information about the fwts-devel
mailing list