Module Name: src Committed By: pooka Date: Tue Nov 23 18:30:27 UTC 2010
Modified Files: src: build.sh Log Message: ld wants to create a 0-byte file before it starts linking, with the default being ./a.out. If we run build.sh rumptest from a r/o fs, linking fails before it gets to the parts that interest us and the whole test silently fails. So: 1) use -o /tmp/rumptest.$$ (objdir might be better, but I couldn't determine with a high confidence how to obtain the definite one in build.sh) 2) catch "cannot open output file" error from ld To generate a diff of this commit: cvs rdiff -u -r1.240 -r1.241 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/build.sh diff -u src/build.sh:1.240 src/build.sh:1.241 --- src/build.sh:1.240 Tue Aug 24 20:52:31 2010 +++ src/build.sh Tue Nov 23 18:30:26 2010 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.240 2010/08/24 20:52:31 pgoyette Exp $ +# $NetBSD: build.sh,v 1.241 2010/11/23 18:30:26 pooka Exp $ # # Copyright (c) 2001-2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -1384,7 +1384,7 @@ eval cat <<EOF ${makewrapout} #! ${HOST_SH} # Set proper variables to allow easy "make" building of a NetBSD subtree. -# Generated from: \$NetBSD: build.sh,v 1.240 2010/08/24 20:52:31 pgoyette Exp $ +# Generated from: \$NetBSD: build.sh,v 1.241 2010/11/23 18:30:26 pooka Exp $ # with these arguments: ${_args} # @@ -1629,7 +1629,7 @@ for set in ${RUMP_LIBSETS} ; do IFS="${oIFS}" ${runcmd} ${tool_ld} -nostdlib -L${DESTDIR}/usr/lib \ - -static --whole-archive ${set} 2>&1 | \ + -static --whole-archive ${set} 2>&1 -o /tmp/rumptest.$$ | \ awk -v quirks="${md_quirks}" ' /undefined reference/ && !/more undefined references.*follow/{ @@ -1638,6 +1638,7 @@ fails[NR] = $0 } /cannot find -l/{fails[NR] = $0} + /cannot open output file/{fails[NR] = $0} END{ for (x in fails) print fails[x]