swarm-support
[Top][All Lists]
Advanced

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

Re: Linux to MacOSX port effort.


From: Jacobo Myerston
Subject: Re: Linux to MacOSX port effort.
Date: Sat, 27 Apr 2002 14:20:27 -0400


On Friday, April 26, 2002, at 08:50 PM, address@hidden wrote:

Just a mention that gcc3-1102 won't compile.  I suspect it needs the new
April developer tools, which have not reached Australia yet.
I think that is why they bumped the version from 1042 to 1102.

Bill Northcott


Yes, you are right. gcc 1102 doesn't compile. I have to order the new April DT.




Jacobo Myerston <address@hidden>
26/04/02 11:39 PM


        To:     address@hidden
        cc:
        Subject:        Re: Linux to MacOSX port effort.


thanks,

I´m compiling now the source.


On Thursday, April 25, 2002, at 11:15 PM, address@hidden wrote:

Hi Jacobo

A few weeks back I wrote this:
All I do is change three lines in the GNUmakefile.  It might work for
you.

*******************************
diff -u -d -b -w -r1.24 GNUmakefile
--- GNUmakefile 6 Mar 2002 18:30:04 -0000       1.24
+++ GNUmakefile 4 Apr 2002 00:19:52 -0000
@@ -89,8 +89,8 @@
 # Enable Apple extensions to (gnu)make.
 USE_APPLE_PB_SUPPORT = all

-HOSTS = ppc i386 # `arch`
-targets = echo $${TARGETS:-'ppc i386'}
+HOSTS = ppc # `arch`
+targets = echo $${TARGETS:-'ppc'}
 TARGETS := $(shell $(targets))

 RC_ARCHS = $(HOSTS)
@@ -98,7 +98,7 @@
 SRCROOT = .

 SRC = `cd $(SRCROOT) && pwd | sed s,/private,,`
-OBJROOT = $(SRC)/obj
+OBJROOT = /tmp/obj
 SYMROOT = $(OBJROOT)/../sym
 DSTROOT = $(OBJROOT)/../dst
***************************
The crucial change seems to be the OBJROOT line, but the other two
stop a
lot of time wasting with i386 stuff which often does not build.

Then try:
cd yoursourcedirectory/gcc3
unlimit stack
make install

If you are using the 3.1 compiler as your cc then the last line needs to
be
make CC='cc -no-cpp-precomp' install

This should run and leave a working compiler in /tmp/dst/usr/bin
/tmp/dst/usr/lib etc.

!!Be aware that what follows might trash your working compiler.!!

 You will need to be root or use sudo for almost all of the following.
Copy the contents of /tmp/dst/usr/bin to /usr/bin.
Copy the 3.1 directories under /tmp/dst/usr/include /tmp/dst/usr/lib
/tmp/dst/usr/libexec to the corresponding directories in /usr.
Then cd to /usr/lib/gcc/darwin/3.1 and type
ranlib -s lib*
If you forget this the linker will grok.

At this point, you should have a working compiler with the main entry as
/usr/bin/gcc3.   Try
rehash
gcc3 -v

Finally you need the gcc_select script which you can get from the
opensource cvs at Apple with the module name gcc_select.

Do NOT do 'make install' in the gcc_select directory - it will trash
your
compiler.  I know from bitter experience.
Instead copy the gcc_select script to /usr/sbin.

Test it with
rehash
gcc_select -n 3

It should list what it would do and end with something like 'Your
default
compiler would now be gcc3'.
If that went well do
gcc_select 3

It should tell you that gcc3 is now the default compiler.

In order to use it use must use -no-cpp-precomp, because the the
cpp-precomp app is not updated!
In Project Builder you can do this by adding a build setting
CC = cc -no-cpp-precomp
In other build methods you might need a CFLAG -no-cpp-precomp

To return to the old compiler just type
gcc_select 2

Enjoy
Bill Northcott

I am sure somebody will correct me if there are problems with this
approach or typos.

You might also need the 3crtl.o file or you may have trouble with c++.

I have little script in the girectory above gcc3 which goes like this.
#!bin/sh
unlimit stack
rm -rf /tmp/dst
rm -rf /tmp/sym
rm -rf /tmp/obj
cd gcc3
make CC='cc -no-cpp-precomp' install

Hope this helps
Bill




Jacobo Myerston <address@hidden>
26/04/02 07:10 AM


        To:     address@hidden
        cc:
        Subject:        Re: Linux to MacOSX port effort.



Hi Bill,

could you tell me how do you compile gcc in the Apple Way. I having
troubles with that.








                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]