Current-Users archive

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

Re: crossbuild of -current amd64 from Darwin9.3 failed



On Sat, Jun 28, 2008 at 11:54:48PM +1000, Simon Burge wrote:
> Quentin Garnier wrote:
> 
> > I've tracked this down to libiberty, which the tools version of
> > mdsetimage is linked with.  It includes a GNU implementation of getopt,
> > and apparently the linker on Mac OS X get confused using optind and
> > optarg from one implementation and getopt from the other (the other
> > implementation being the libc).  Of course that leads to interesting
> > results.
> 
> I mentioned this in
> 
>   http://mail-index.netbsd.org/tech-toolchain/2008/02/04/msg000025.html
> 
> and again in
> 
>   http://mail-index.netbsd.org/tech-toolchain/2008/06/09/msg000220.html
> 
> (and followups) but never found a proper fix for this.  I just remove
> the "-v" from the mdsetimage call on my MacOS box.

The attached patch does that for me on Leper 10.5.4 - it's a bit gross,
though.

Regards,
Al
Index: Makefile.mdset
===================================================================
RCS file: /cvsroot/src/distrib/common/Makefile.mdset,v
retrieving revision 1.32
diff -u -r1.32 Makefile.mdset
--- Makefile.mdset      23 Jun 2008 02:09:29 -0000      1.32
+++ Makefile.mdset      19 Jul 2008 23:19:06 -0000
@@ -124,12 +124,19 @@
 ${_I}=
 .endif
 
+OPSYS!= uname -s
+.if ${OPSYS} == "Darwin"
+MDSETIMAGEFLAGS=
+.else
+MDSETIMAGEFLAGS=-v
+.endif
+
 ${_KERNEL.${_K}.${_F}}: .NOTMAIN ${_KERNNAME.${_K}.${_F}} ${_I}
        ${_MKTARGET_CREATE} "(from: ${.ALLSRC})"
        @rm -f ${.TARGET} ${.TARGET}.tmp ${.TARGET}.symbols.gz
        @cp ${_KERNNAME.${_K}.${_F}} ${.TARGET}.tmp
 .if !defined(MDSET_NOIMAGE.${_FILENAME})
-       ${TOOL_MDSETIMAGE} -v ${.TARGET}.tmp ${_I}
+       ${TOOL_MDSETIMAGE} ${MDSETIMAGEFLAGS} ${.TARGET}.tmp ${_I}
 .endif
 .if !defined(MDSET_NOSYMBOLS.${_FILENAME}) && !defined(MDSET_NOSYMBOLS)
        ${NM} ${.TARGET}.tmp | gzip -9 > ${.TARGET}.symbols.gz


Home | Main Index | Thread Index | Old Index