Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm following the tutorial in the wiki on creating a cross compiler for developing my toy OS in my native OS; 10.7 Lion. At the first compiler time binutils attempts to install until I receive this error:
creating libtool
loading cache ../config.cache
checking whether to enable maintainer-specific portions of Makefiles... no
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking for executable suffix... (cached) .dSYM
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 -W -Wall ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Configure in /usr/src/build-binutils/bfd failed, exiting.
I have followed the instructions up until this point. No idea how to tend to this. Help appreciated,
Which version of GCC do you have installed on your mac ?
Look in config.log to get more details of your error.
BTW, I've not been able to build a cross-compiler on Lion with the latest Xcode installed. I got error like this https://trac.macports.org/ticket/29104.
If a trainstation is where trains stop, what is a workstation ?
NICHOLAS-PACHULSKIs-MacBook-Pro:nick nmpach$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
But, the version that I was planning on using for my cross compiler is 4.2.0 (which is not installed yet). The cross compiler tutorial in the wiki says to redo the gcc installation after doing a binutils install (which I obviously haven't done yet). Thanks for the reply. Future assistance greatly appreciated; want to do this on my mac!
hi "brodeur235"
i have found a tutorial step by step how to make cross platform compiler
i have tried that tutorial my self and it works for me me pretty well
check my topic in the forum http://forum.osdev.org/viewtopic.php?f=1&t=24019
this video will teach you how to do it in Windows Platform
I appreciate the help, but I need a cross compiler for mac; not windows. Just from skimming that video I can see that it uses tools that are .exe(s) which can't help me.
Any additional input is greatly appreciated. Still in need of help,
GCC 4.2.1 is perfectly fine; and there is no newer GCC version for mac (From Apple, that is; and if you use a non-Apple GCC, you're in for a world of hurt)
As I said, you cannot build a cross-compiler out-of-the-box on Lion because the new version of Xcode will not support it. I really wanted to get going again so rather than investigating the problem I just reverted to the old Xcode version from Snow Leopard. That worked.
As Brynet-Inc said, take care that you are using the latest Binutils. Note that 2.21 is NEWER than 2.9
Brodeur, attach your config.log.
[Edit] Actually, to be more specific, the cros-compiler tool-chain does build on Lion. But It segfaults in the compiler when used.
If a trainstation is where trains stop, what is a workstation ?