Current-Users archive

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

cross building with HOST_CXX set



For various complicated reasons, I'm attempting to cross-build
netbsd-current on a solaris10 machine.  I've gotten this to work
most the time (subject to temporary breakages in the current
tree).

Anyhow, my most recent attempts have been using a compiler
wrapper that is set to alway generate 64bit binaries on my
sparc.  So I set the following before building:
        HOST_CC=gcc64
        HOST_CXX=g++64

Things chug along for a while, and then groff fails to link when
the tools are being built, because it isn't getting made with
HOST_CXX. Rather it gets made with the normal 'g++' in my path, which
generates 32bit sparc objects.  So the link fails because part
of the objects are built as 64bit, and part are built as 32bit.

The following patch resolves the problem.  It would be cool if
someone could commit this.

Thanks.

-Kurt

lidl@rox-414: cvs diff -u tools/groff/Makefile
Index: tools/groff/Makefile
===================================================================
RCS file: /cvsroot/src/tools/groff/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- tools/groff/Makefile        6 Feb 2006 23:48:35 -0000       1.28
+++ tools/groff/Makefile        19 Mar 2008 05:15:23 -0000
@@ -6,7 +6,7 @@
 MAKE_ARGS=     bindir=${TOOLDIR}/lib/groff MAKEINFO=${TOOL_MAKEINFO:Q} \
                INSTALL_INFO=${TOOL_INSTALL_INFO:Q}
 # we don't need any of the X applications
-CONFIGURE_ARGS+=       --without-x
+CONFIGURE_ARGS+=       --without-x CXX=${HOST_CXX:Q}

 TMACDIR=       ${TOOLDIR}/share/groff/tmac
 SITETMACDIR=   ${TOOLDIR}/share/groff/site-tmac



Home | Main Index | Thread Index | Old Index