Successful crosstool-0.38 Mac OS X to PPC GNU/Linux

Gwynne squasar@eternalviper.net
Sat Jan 14 04:12:00 GMT 2006


Hi, I'm new to crosstool, and I thought I'd post my solution for  
getting Mac OS X building a cross-compiler (gcc 3.4.4 + glibc 2.3.5)  
for my PPC Gentoo Linux install since no single solution I found on  
this mailing list or any web site had the complete solution for my  
issues.

1. Build and install GNU sed and GNU awk into /usr/local/bin or any  
location of your choice that isn't /usr/bin (don't overwrite the OS X  
versions since things in the OS depend on them having OS X semantics).

2. Replace patches/glibc-2.3.5/glibc-configure-apple-as.patch with  
the glibc-configure-apple-as-ld.patch at the bottom of this e-mail  
(it's after my signature).

3. Edit powerpc7450.dat (or create a new .dat) to use a TARGET of  
powerpc-unknown-linux-gnu, TARGET_CFLAGS of "-O2", and  
GCC_EXTRA_CONFIG of "--enable-altivec" if you want AltiVec.

4. Edit demo-ppc7450.sh or create a new .sh to use your .dat and  
GCC_LANGUAGES of "c,c++" (I didn't try to build fortran or objc since  
this was for distcc building and only C and C++ work with distcc).

5. Make sure the place where you installed GNU sed and gawk is in  
your PATH before /usr/bin, and run your .sh.

Thanks to everyone who does crosstool for finally giving me something  
that let me build for my Linux install!

-- Gwynne, daughter of the Code
"This whole world is an asylum for the incurable."

patches/glibc-2.3.5/glibc-configure-apple-as-ld.patch:
--- glibc-2.3.5/configure.old   2006-01-08 02:03:25.000000000 -0500
+++ glibc-2.3.5/configure       2006-01-08 02:04:54.000000000 -0500
@@ -3914,12 +3914,12 @@
    # Found it, now check the version.
    echo "$as_me:$LINENO: checking version of $AS" >&5
echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.*  
\([0-9]*\.[0-9.]*\).*$/\1/p'`
+  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU  
assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
    case $ac_prog_version in
-    '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+    '') ac_prog_version="v. ?.??, bad (ignored)"; ac_verc_fail=no;;
      2.1[3-9]*)
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
-    *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    *) ac_prog_version="$ac_prog_version, bad (ignored)";  
ac_verc_fail=no;;
    esac
    echo "$as_me:$LINENO: result: $ac_prog_version" >&5
@@ -3977,10 +3977,10 @@
echo $ECHO_N "checking version of $LD... $ECHO_C" >&6
    ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \ 
([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
    case $ac_prog_version in
-    '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+    '') ac_prog_version="v. ?.??, bad (ignored)"; ac_verc_fail=no;;
      2.1[3-9]*)
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
-    *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    *) ac_prog_version="$ac_prog_version, bad (ignored)";  
ac_verc_fail=no;;
    esac
    echo "$as_me:$LINENO: result: $ac_prog_version" >&5



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org



More information about the crossgcc mailing list