XFree Cross compile

Alexander Gottwald Alexander.Gottwald@informatik.tu-chemnitz.de
Fri Jul 27 06:56:00 GMT 2001


Hi,

I just tried crosscompiling the latest CVS with gcc 3.0 and found some
points in the config files which might be errors: (diffs are appended
at the end of this mail)

all HostLinkXXX rules use by default cc as host compiler 
Fix: replaced all calls to cc with HostCcCmd, which is already defined in 
in cygwin.rules and defaults to "cc". [1]

libGLU does not link
Fix: link with -lstdc++. The place where I put the reference to the library
seems not to be the best. [2]

More may follow, I just gone through libs, programs will be next

bye ago


diffs:
[1]

Index: cross.rules
===================================================================
RCS file: /cvs/xc/config/cf/cross.rules,v
retrieving revision 1.3
diff -U3 -r1.3 cross.rules
--- cross.rules	2001/06/25 08:12:30	1.3
+++ cross.rules	2001/07/27 06:19:01
@@ -1,13 +1,16 @@
 XCOMM $XFree86: xc/config/cf/cross.rules,v 1.3 2001/06/25 08:12:30 alanh Exp $
+#ifndef HostCcCmd
+#define HostCcCmd cc
+#endif
 
-#define HostLinkRule(target, flags, src, libs)  cc -I$(BUILDINCDIR) -o target src
+#define HostLinkRule(target, flags, src, libs)  HostCcCmd -I$(BUILDINCDIR) -o target src
 
 /* ComplexHostProgramTarget - Compile a program such that we can run
  * it on this host, i.e., don't use the default cross compiler.
  */
 #ifndef ComplexHostProgramTarget
 #define	ComplexHostProgramTarget(program)				@@\
-              CC=cc							@@\
+              CC=HostCcCmd							@@\
     STD_INCLUDES=							@@\
           CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)		@@\
 EXTRA_LOAD_FLAGS=							@@\
@@ -31,7 +34,7 @@
 #define SimpleHostProgramTarget(program)				@@\
            SRCS = program.c						@@\
 									@@\
-              CC=cc							@@\
+              CC=HostCcCmd					@@\
     STD_INCLUDES=							@@\
           CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)		@@\
 EXTRA_LOAD_FLAGS=							@@\

[2]

Index: cygwin.tmpl
===================================================================
RCS file: /cvs/xc/config/cf/cygwin.tmpl,v
retrieving revision 3.6
diff -U3 -r3.6 cygwin.tmpl
--- cygwin.tmpl	2001/06/25 08:12:30	3.6
+++ cygwin.tmpl	2001/07/27 06:29:07
@@ -17,7 +17,7 @@
 #define SharedXpReqs $(LDPRELIB) $(XAUTHLIB) $(EXTENSIONLIB) $(XLIBONLY)
 #define SharedXvReqs $(LDPRELIB) $(XLIB)
 #define SharedGLReqs	$(LDPRELIB) $(XLIB)
-#define SharedGLUReqs	$(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedGLUReqs	$(LDPRELIB) $(XLIB) $(GLXLIB) -lstdc++
 XCOMM #define SharedXfontReqs $(LDPRELIB) $(XLIB)
 #define SharedXxf86vmReqs $(LDPRELIB) $(XLIB) 
 #define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)


-- 
Alexander.Gottwald@s1999.tu-chemnitz.de
http://www.gotti.org
phone: +49 3725 3498080     mobile: +49 172 7854017



More information about the Cygwin-xfree mailing list