Subject: wrappers break darwin
To: None <tech-pkg@netbsd.org>
From: Dan Winship <danw@NetBSD.org>
List: tech-pkg
Date: 09/21/2004 19:50:32
--Apple-Mail-3--608168296
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

(Yeah, yeah, I know. I kept meaning to test the wrapper framework, but 
I was busy and didn't get around to it :-)

The wrapper framework makes it impossible to build anything on Darwin, 
because the gcc wrapper ends up being overwritten by the cpp wrapper 
(because ${CPP} is "gcc -E") or something, and gcc turns into an 
infinite loop. The attached patch can be used as a workaround until 
it's fixed. (Or maybe it's even the right fix?)

-- Dan


--Apple-Mail-3--608168296
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	x-unix-mode=0644;
	name="wrap.diff.txt"
Content-Disposition: attachment;
	filename=wrap.diff.txt

Index: bsd.wrapper.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/bsd.wrapper.mk,v
retrieving revision 1.1
diff -u -r1.1 bsd.wrapper.mk
--- bsd.wrapper.mk	21 Sep 2004 15:01:41 -0000	1.1
+++ bsd.wrapper.mk	21 Sep 2004 23:45:27 -0000
@@ -132,7 +132,9 @@
 #
 _WRAPPEES+=	AS
 _WRAPPEES+=	CC
+.if ${CPP:N-*} != ${CC}
 _WRAPPEES+=	CPP
+.endif
 _WRAPPEES+=	CXX
 _WRAPPEES+=	FC
 .if defined(USE_X11)

--Apple-Mail-3--608168296--