diff options
author | maya <maya@pkgsrc.org> | 2020-10-28 16:52:43 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2020-10-28 16:52:43 +0000 |
commit | 214db94e38ebb7e913e6753c453a4a097ea25654 (patch) | |
tree | d8de918994f726389671bd6193f3ca1644b73a89 /bootstrap/bootstrap | |
parent | 29d391ad6e29479238d24e897638c12a16d71e76 (diff) | |
download | pkgsrc-214db94e38ebb7e913e6753c453a4a097ea25654.tar.gz |
Bootstrap: Fix bootstrap on FreeBSD 12.1, likely broken by an issue in lld.
It looks like lld doesn't want to statically link a libarchive without
resolving all of the symbols, even if only a few symbols are used.
In order to resolve all of the symbols, we need to also link with -lmd.
One generic way to do so is inspect Libs.private in the pkgconfig file.
While pkgsrc is likely not at fault here, having a dysfunctional bootstrap
is bad. We should check again in the future to see if this can be removed.
Actually fixes PR pkg/55400.
Diffstat (limited to 'bootstrap/bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index e7c01021d66..4aa833d3bb6 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.294 2020/10/07 10:44:14 jperkin Exp $ +# $NetBSD: bootstrap,v 1.295 2020/10/28 16:52:43 maya Exp $ # # Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> # All rights reserved. @@ -1235,6 +1235,10 @@ yes) echo_msg "Bootstrapping sed" esac # bootstrap pkg_install +extra_libarchive_depends() { + $sedprog -n -e 's/Libs.private: //p' $wrkdir/libarchive/build/pkgconfig/libarchive.pc +} + echo_msg "Bootstrapping pkgtools" copy_src $pkgsrcdir/archivers/libarchive/files libarchive run_cmd "(cd $wrkdir/libarchive; env $BSTRAP_ENV \ @@ -1253,6 +1257,7 @@ LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \ --with-pkgdbdir=$pkgdbdir --infodir=$infodir \ --mandir=$mandir $pkg_install_args && \ STATIC_LIBARCHIVE=$wrkdir/libarchive/.libs/libarchive.a \ +STATIC_LIBARCHIVE_LDADD=`extra_libarchive_depends` \ PKGSRC_MACHINE_ARCH="$machine_arch" $bmake $make_quiet_flags -j$make_jobs)" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/add/pkg_add $wrkdir/sbin/pkg_add" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin" |