On Sep 7, 2007, at 1:49 AM, Adriaan van Os wrote:
Gale Paeper wrote:
On Sep 7, 2007, at 12:06 AM, Adriaan van Os wrote:
Gale Paeper wrote:
In looking over all the compile commands output, it doesn't look like the "CC=/Developer/Pascal/gpc412d1/bin/gcc" parameter ends up forcing that gcc to be used for all the compiling in building xgcc and xgpc. For the boatload of compile commands, there doesn't seem to be any rhyme or reason as to which C compiler is used. Sometimes, it is: gcc -c ... other times, it is: /Developer/Pascal/gpc412d1/bin/gcc -c ...
What if you do something like this
sudo mv /usr/bin/gcc /usr/bin/gcc-apple sudo ln -sf /Developer/Pascal/gpc412d1/bin/gcc /usr/bin/gcc
.. cross-compile build ..
sudo rm /usr/bin/gcc sudo mv /usr/bin/gcc-apple /usr/bin/gcc
That did it, Adriaan. Doesn't seem quite right though to have to hack the system compiler to get the desired build compiler used.
Maybe putting CC= ... in front of 'configure' does the job also.
Since your Mac OS X build-on script command files are set up to run in a tcsh shell, you need to use the command form of:
setenv CC /Developer/Pascal/gpc412d1/bin/gcc
With that command just before the cross compiler configure command, the /Developer/Pascal/gpc412d1/bin/gcc compiler is always used in building the cross compiler and the build succeeds without error.
I'm not familiar with how a tcsh shell handles environment variables set in a shell command file so I'm not sure how benign that command actually is in a global, system wide context. As far as I can tell, the effect of setting of CC seems to go away when the tcsh shell process executing the shell command file terminates.
I note the gcc configuration documentation, <http://gcc.gnu.org/ install/configure.html>, states "setting cc in your environment" is one way to specify the c compiler to be used for compiling so it is probably the way to go to workaround the present PowerPC hosted cross compiler build error problem.
Gale Paeper gpaeper@empirenet.com