diff options
author | jlam <jlam> | 2002-10-18 15:41:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-10-18 15:41:08 +0000 |
commit | 70592728e1736358c676f29828057f5fdb810f64 (patch) | |
tree | 4301567c88175c98c3e17a82a7619fd458213964 /mk | |
parent | 99ad2fc16151b9a584c24c888fbf6cd52cd06cab (diff) | |
download | pkgsrc-70592728e1736358c676f29828057f5fdb810f64.tar.gz |
Make fake-la work on a.out machines. Fix based on patch in pkg/18694
by itohy@netbsd.org.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 9 | ||||
-rw-r--r-- | mk/buildlink2/fake-la | 12 |
2 files changed, 18 insertions, 3 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index 8985039ea5c..fa33dce0f6d 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.41 2002/10/13 07:13:42 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.42 2002/10/18 15:41:08 jlam Exp $ # # An example package buildlink2.mk file: # @@ -933,6 +933,12 @@ ${_BLNK_LIBTOOL_FIX_LA}: ${.CURDIR}/../../mk/buildlink2/libtool-fix-la ${.ALLSRC} > ${.TARGET}.tmp ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} +.if ${OBJECT_FMT} == "a.out" +_RESET_LD_SO_CACHE?= ${LDCONFIG} +.else +_RESET_LD_SO_CACHE?= ${TRUE} +.endif + ${_BLNK_FAKE_LA}: ${.CURDIR}/../../mk/buildlink2/fake-la ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${SED} \ @@ -944,6 +950,7 @@ ${_BLNK_FAKE_LA}: ${.CURDIR}/../../mk/buildlink2/fake-la -e "s|@DIRNAME@|${DIRNAME:Q}|g" \ -e "s|@ECHO@|${ECHO:Q}|g" \ -e "s|@EGREP@|${EGREP:Q}|g" \ + -e "s|@RESET_LD_SO_CACHE@|${_RESET_LD_SO_CACHE:Q}|g" \ -e "s|@LIBTOOL@|${BUILDLINK_LIBTOOL:Q}|g" \ -e "s|@MKDIR@|${MKDIR:Q}|g" \ -e "s|@MV@|${MV:Q}|g" \ diff --git a/mk/buildlink2/fake-la b/mk/buildlink2/fake-la index da40f702f3b..84b2bb5d0e8 100644 --- a/mk/buildlink2/fake-la +++ b/mk/buildlink2/fake-la @@ -1,6 +1,6 @@ #!@BUILDLINK_SHELL@ # -# $NetBSD: fake-la,v 1.1 2002/09/18 00:46:59 jlam Exp $ +# $NetBSD: fake-la,v 1.2 2002/10/18 15:41:08 jlam Exp $ BASENAME="@BASENAME@" CC="@CC@" @@ -34,7 +34,15 @@ if [ ! -f $tmpdir/inst/$libbase.la ]; then esac ${MKDIR} $tmpdir/inst cd $tmpdir - ${LIBTOOL} ${CC} -o $libbase.la -rpath $tmpdir/inst -version-info $version + ${ECHO} "static int i;" > nonempty.c # create a nonempty input file + ${LIBTOOL} --mode=compile ${CC} -c nonempty.c + ${LIBTOOL} ${CC} -o $libbase.la nonempty.lo -rpath $tmpdir/inst -version-info $version ${LIBTOOL} --mode=install ${CP} $libbase.la $tmpdir/inst >/dev/null + + # Reset the ld.so cache as "libtool --mode=install" may have executed + # ldconfig to add "$tmpdir/inst" to the cache. + # + @RESET_LD_SO_CACHE@ >/dev/null 2>&1 + fi ${SED} -e "s,$tmpdir/inst,$realdir,g" $tmpdir/inst/$libbase.la |