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

Cross Compile Success!



Yes!

I got a cross-compile tool chain and a working gnumach and hurd from it. I was even able to install over the running hurd using an NFS mount from the Hurd to my compilation machine. That will make updates fairly easy.

These instructions were pretty much dead on, though I did them on Linux rather than FreeBSD. If we want to update the Crosscompile-HOWTO, then these instructions are an ideal candidate. That will bring it out of the "out of date" status. Thanks Farid!

	http://lists.debian.org/debian-hurd-0012/msg00062.html

I used:

	binutils-2.11.90.0.5
	gcc-2.95.4 (gcc-20010408)
	glibc-2.2.2
	mig (CVS)
	gnumach (CVS)
	hurd (CVS)

A couple of things I noticed were that I had to play with the ordering of the "finish building cross gcc" and "finish build of cross-glibc" steps since gcc needed a

	./i586-pc-gnu/include/bits/stdio_lim.h

file, and that seemed to come from glibc during the "finish glibc" step. Additionally, I had to apply the patches attached to the end of this email to get it all to compile correctly. I found then around the web in various places.

Lastly, I wrapped up Farid's instructions into a bunch of different scripts and setup a framework that will allow me to quickly update any of the sources and rebuild things. I will improve it steadily. If anyone is interested, I can share it with them.

My next project is to tackle X on Hurd. Any pointers? Has anyone tried 4.0.3 yet, or is 4.0.1 still the most recent success?

-- Ian

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan                    ian@ianduggan.net
                              http://www.ianduggan.net




Index: libc/malloc/mtrace.c
===================================================================
RCS file: /cvs/libc/malloc/mtrace.c,v
retrieving revision 1.25
diff -u -r1.25 mtrace.c
--- libc/malloc/mtrace.c        2001/02/13 22:06:16     1.25
+++ libc/malloc/mtrace.c        2001/02/17 23:03:36
@@ -268,7 +268,7 @@
 #endif
   if (mallfile != NULL || mallwatch != NULL)
     {
-      mallstream = fopen64 (mallfile != NULL ? mallfile : "/dev/null", "w");
+      mallstream = fopen (mallfile != NULL ? mallfile : "/dev/null", "w");
       if (mallstream != NULL)
        {
          /* Make sure we close the file descriptor on exec.  */




Index: libc/sysdeps/mach/getsysstats.c
===================================================================
RCS file: /cvs/libc/sysdeps/mach/getsysstats.c,v
retrieving revision 1.5
diff -u -r1.5 getsysstats.c
--- libc/sysdeps/mach/getsysstats.c     1999/02/27 20:00:41     1.5
+++ libc/sysdeps/mach/getsysstats.c     2001/02/17 23:03:36
@@ -60,7 +60,7 @@
 }
 
 /* Return the number of physical pages on the system. */
-int
+long int
 __get_phys_pages ()
 {
   struct host_basic_info hbi;
@@ -78,7 +78,7 @@
 }
 
 /* Return the number of available physical pages */
-int
+long int
 __get_avphys_pages ()
 {
   vm_statistics_data_t vs;




Index: gcc-2.95.2/libchill/basicio.c
===================================================================
gcc-2.95.2/libchill/basicio.c does not reliably set PATH_MAX

*** basicio.c.orig      Sun Dec  5 23:12:32 1999
--- basicio.c   Sun Dec  5 23:16:08 1999
***************
*** 39,51 ****
  #include "fileio.h"

  #ifndef PATH_MAX
! #ifdef _POSIX_PATH_MAX
! #define PATH_MAX _POSIX_PATH_MAX
! #else
! #ifdef MAXPATHLEN
! #define PATH_MAX MAXPATHLEN
! #endif
! #endif
  #endif

  static
--- 39,53 ----
  #include "fileio.h"

  #ifndef PATH_MAX
! #   ifdef _POSIX_PATH_MAX
! #       define PATH_MAX _POSIX_PATH_MAX
! #   else
! #       ifdef MAXPATHLEN
! #           define PATH_MAX MAXPATHLEN
! #       else
! #           define PATH_MAX 1024
! #       endif
! #   endif
  #endif

  static



Reply to: