]> git.ozlabs.org Git - ppp.git/commit
Fix linking error with lld linkers (#438)
authorBrahmajit Das <brahmajit.xyz@gmail.com>
Thu, 2 Nov 2023 05:56:18 +0000 (11:26 +0530)
committerGitHub <noreply@github.com>
Thu, 2 Nov 2023 05:56:18 +0000 (16:56 +1100)
commit9b4bdca70081abbad26277b009ef9c4ab7e276d0
tree51a8defa03a98eb10ea1cc5314c042dba8bc5553
parent7a3f478a4b7128d4f70ea64d99fedec766b1c009
Fix linking error with lld linkers (#438)

When using lld linker, build fails with

ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/Scrt1.o is incompatible with elf32-i386
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/crti.o is incompatible with elf32-i386
ld.lld: error: /usr/lib/llvm/16/bin/../../../../lib/clang/16/lib/linux

The fix is to check pkg-config first, and not force manual -L /usr/lib.
If pkg-config succeeded, then we don't bother with -L /usr/lib

Our guess is this what the actual intention was based upon the coments

if pkg-config is installed and openssl has installed a .pc file,
then use that information and don't search ssldirs

First found on gentoo linux with llvm profile, please check out Bug:
section of the commit for more info and a complete build log.

Bug: https://bugs.gentoo.org/905442

Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Co-authored-by: Sam James <sam@gentoo.org>
m4/ax_check_openssl.m4