Subject: toolchain/23936: regress/lib/libc/siginfo doesn't cleandir properly
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/30/2003 20:45:57
>Number:         23936
>Category:       toolchain
>Synopsis:       regress/lib/libc/siginfo doesn't cleandir properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 31 04:47:00 UTC 2003
>Originator:     David P. Reese Jr.
>Release:        NetBSD 1.6ZF
   David P. Reese, Jr.                                  daver at
System: NetBSD 1.6ZF NetBSD 1.6ZF (TOMBSTONE) #2: Sun Dec 14 21:29:33 PST 2003 i386
Architecture: i386
Machine: i386
The regress/lib/libc/siginfo won't be cleaned by the cleandir pass at the
beginning of a build unless the toolchain for the target has already been
built and the destination directory has been populated by the target's
include files.  If both targets have SA_SIGINFO, then stale regression
objects will be linked with the new target's ld.  Badness.
Build a distribution for one target.  Then build a distribution for a second
target making sure that the destination dir has not been populated with
inclues.  The most recent time that I caught this I was building a macppc
distribution after an i386 distribution.
The crux of the problem is that a cleandir tries to envoke the compiler to
decide if it should step into the siginfo regression directory.  A cleandir
should not depend on the existance of the compiler or the target's include

Index: regress/lib/libc/Makefile
RCS file: /cvsroot/src/regress/lib/libc/Makefile,v
retrieving revision 1.42
diff -u -u -r1.42 Makefile
--- regress/lib/libc/Makefile	2003/12/17 05:36:43	1.42
+++ regress/lib/libc/Makefile	2003/12/31 04:26:25
@@ -13,11 +13,11 @@
 SUBDIR+= ldexp
-.if !make(obj)
+.if !make(obj) && !make(cleandir)
 HAVE_SIGINFO != if (echo "\#include <signal.h>" && echo "SA_SIGINFO") | ${CC} -E -I${DESTDIR}/usr/include - | grep -sq 0x0040; then echo yes; else echo no; fi
-.if make(obj) || (${HAVE_SIGINFO} == "yes")
+.if make(obj) || make(cleandir) || (${HAVE_SIGINFO} == "yes")
 SUBDIR+= siginfo