NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/44046 (Parallel MKDEBUG builds randomly fail installing libraries)



On Mon, Nov 08, 2010 at 04:54:27PM +0200, Andreas Gustafsson wrote:
  | lukem%NetBSD.org@localhost wrote:
  | > Does bsd.lib.mk 1.309 (and bsd.prog.mk 1.251) resolve the situation?
  | 
  | Apparently not - I just got another build failure with -current source
  | date 2010.11.08.13.05.49 which includes those changes.  Last 1000
  | lines of the build log are at:
  | 
  |   http://www.gson.org/netbsd/bugs/lib-install/build2.log

Hi Andreas,

Please try the attached patch.  I'm trying an idea from a recent
discussion on tech-toolchain (about a different bsd.lib.mk issue).

thanks,
Luke.


Index: bsd.lib.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.lib.mk,v
retrieving revision 1.314
diff -p -p -u -r1.314 bsd.lib.mk
--- bsd.lib.mk  11 Apr 2011 23:03:38 -0000      1.314
+++ bsd.lib.mk  16 Jun 2011 12:21:33 -0000
@@ -431,9 +431,8 @@ _LIBS+=${SOLIB}
 SOBJS+=${OBJS:.o=.pico}
 .endif
 .if defined(SHLIB_FULLVERSION)
-_LIB.so:=lib${LIB}.so.${SHLIB_FULLVERSION}
 .if ${MKDEBUG} != "no"
-_LIB.debug:=${_LIB.so}.debug
+_LIB.debug:=lib${LIB}.so.${SHLIB_FULLVERSION}.debug
 .endif
 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif
@@ -566,17 +565,20 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOL
 .endif
        ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
        mv -f lib${LIB}.so.tmp lib${LIB}.so
+.if defined(_LIB.debug)
+       ${OBJCOPY} --only-keep-debug ${.TARGET} ${_LIB.debug}
+       ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
+               --add-gnu-debuglink=${_LIB.debug} ${.TARGET}
+.endif
 .if ${MKSTRIPIDENT} != "no"
        ${OBJCOPY} -R .ident ${.TARGET}
 .endif
+       touch ${.TARGET} ${_LIB.debug}
 
 .if defined(_LIB.debug)
-${_LIB.debug}: ${_LIB.so}
+${_LIB.debug}: lib${LIB}.so.${SHLIB_FULLVERSION}
        ${_MKTARGET_CREATE}
-       (  ${OBJCOPY} --only-keep-debug ${_LIB.so} ${_LIB.debug} \
-       && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
-               --add-gnu-debuglink=${_LIB.debug} ${_LIB.so} \
-       ) || (rm -f ${_LIB.debug}; false)
+       [ -f ${.TARGET} ] || rm lib${LIB}.so.${SHLIB_FULLVERSION}
 .endif
 
 .if !empty(LOBJS)                                                      # {

Attachment: pgps49x8fb9XA.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index