On Tue, 9 Jul 2002, Harold L Hunt wrote:

> A new cross compilation system was implemented for XFree86 in May of 2002.
> This new system is described here:
>
> http://www.xfree86.org/~keithp/xconf2001/cc-imake.pdf

According to that document, I modified the imakemdep.h file.
make World CROSSCOMPILEDIR="/usr/i686-pc-cygwin32/bin" compiled without
any errors (because of some Imakefile patches for rman).
The patch for imake is attached

Comments:
the CROSS_UTS_RELEASE is static because of I found no version string from
cygwin. Such a string might be added to the cygwin headers or might be
constructed from other version information in cygwin/version.h

glibc_major and glibc_minor was not set, but always referenced in imake.
But the imake code seems still to make some assumptions base on the host
operating system.

I did not include other patches to Imakefiles since they substitute
ProgramTarget(rman) by HostProgramTarget(rman). This is needed for
running full make World, but does not compile rman.exe for cygwin.

In host.def the macros CCmd, AsCmd are not preceeded by i686-pc-cygwin32-
anymore but only the sort names (gcc, as ...).

bye
    ago
-- 
 [EMAIL PROTECTED]
 http://www.gotti.org           ICQ: 126018723
Index: config/cf/cross.rules
===================================================================
RCS file: /cvs/xc/config/cf/cross.rules,v
retrieving revision 1.7
diff -U3 -r1.7 cross.rules
--- config/cf/cross.rules       2002/04/04 14:05:33     1.7
+++ config/cf/cross.rules       2002/07/11 15:23:46
@@ -4,7 +4,7 @@
 #define HostCcCmd cc
 #endif
 
-#define HostLinkRule(target, flags, src, libs)  HostCcCmd -I$(BUILDINCDIR) -o target 
src libs
+#define HostLinkRule(target, flags, src, libs)  HostCcCmd -I$(BUILDINCDIR) -o target 
+src libs flags
 
 /* ComplexHostProgramTarget - Compile a program such that we can run
  * it on this host, i.e., don't use the default cross compiler.
Index: config/cf/cygwin.rules
===================================================================
RCS file: /cvs/xc/config/cf/cygwin.rules,v
retrieving revision 3.19
diff -U3 -r3.19 cygwin.rules
--- config/cf/cygwin.rules      2002/04/15 09:22:33     3.19
+++ config/cf/cygwin.rules      2002/07/11 15:23:46
@@ -315,9 +315,8 @@
          $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9) $(OBJS10)                 @@\
   SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) \                        @@\
          $(SRCS6) $(SRCS7) $(SRCS8) $(SRCS9) $(SRCS10)                 @@\
-  PROGS_EXE = $(foreach prog,$(PROGRAMS),ProgramTargetName($(prog)))   @@\
                                                                        @@\
-AllTarget($(PROGS_EXE))                                                        @@\
+AllTarget($(PROGRAMS))                                                 @@\
                                                                        @@\
 ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib)      @@\
                                                                        @@\
@@ -325,7 +324,7 @@
 LintTarget()                                                           @@\
                                                                        @@\
 clean::                                                                        @@\
-       RemoveFiles($(PROGS_EXE))
+       RemoveFiles($(PROGRAMS))
 
 
 /*
Index: config/imake/imakemdep.h
===================================================================
RCS file: /cvs/xc/config/imake/imakemdep.h,v
retrieving revision 3.59
diff -U3 -r3.59 imakemdep.h
--- config/imake/imakemdep.h    2002/05/31 16:31:20     3.59
+++ config/imake/imakemdep.h    2002/07/11 15:23:50
@@ -769,6 +769,16 @@
 #   include <linux/version.h>
 #   define CROSS_UTS_RELEASE UTS_RELEASE
 # endif
+# elif defined(__CYGWIN__)
+#  define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+#  define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+#  define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
+#  define DEFAULT_OS_NAME      "srm %[^\n]"
+#  if defined(__CYGWIN__) && defined  (CROSSCOMPILE_CPP)
+#   define CROSS_UTS_SYSNAME "Cygwin"
+#   include <cygwin/version.h>
+#   define CROSS_UTS_RELEASE "1.3.9"
+#  endif
 # elif defined(__GNU__)
 #  define DEFAULT_OS_MAJOR_REV "r %[0-9]"
 #  define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
@@ -1353,6 +1363,9 @@
 #    include <features.h>
 int glibc_major = __GLIBC__ + 4;
 int glibc_minor = __GLIBC_MINOR__;
+#   else
+int glibc_major = 0;
+int glibc_minor = -1;
 #   endif
 #  endif /* !CROSSCOMPILE || CROSSCOMPILE_CPP */
 
Index: lib/GL/mesa/src/X86/Imakefile
===================================================================
RCS file: /cvs/xc/lib/GL/mesa/src/X86/Imakefile,v
retrieving revision 1.22
diff -U3 -r1.22 Imakefile
--- lib/GL/mesa/src/X86/Imakefile       2002/03/01 21:21:48     1.22
+++ lib/GL/mesa/src/X86/Imakefile       2002/07/11 15:24:06
@@ -85,11 +85,11 @@
 MATYPES = ./gen_matypes
 
 matypes.h: gen_matypes.c
-       RemoveFiles($@ ProgramTargetName(gen_matypes))
-       -HostLinkRule(ProgramTargetName(gen_matypes),$(CFLAGS) 
$(LOCAL_LDFLAGS),gen_matypes.c,$(LDLIBS))
+       RemoveFiles($@ HostProgramTargetName(gen_matypes))
+       -HostLinkRule(HostProgramTargetName(gen_matypes),$(CFLAGS) 
+$(LOCAL_LDFLAGS),gen_matypes.c,$(LDLIBS))
        RunProgram(MATYPES,> matypes_h)
        $(MV) matypes_h $@
-       RemoveFiles(ProgramTargetName(gen_matypes))
+       RemoveFiles(HostProgramTargetName(gen_matypes))
 
 includes:: matypes.h
 

Reply via email to