Can't build RTEMS-4.10 toolchain on OS X Lion
Ralf Corsepius
ralf.corsepius at rtems.org
Thu Aug 25 12:27:20 UTC 2011
On 08/25/2011 01:46 PM, Yann Sionneau wrote:
> On 08/25/2011 01:33 PM, Ralf Corsepius wrote:
>> On 08/24/2011 06:00 PM, Ralf Corsepius wrote:
>>> On 08/24/2011 05:16 PM, Eric Norum wrote:
>>>> I'm also having troubles building the tool chain for RTEMS-4.10.
>>
>>> Please check the contents of this file (Likely
>>> /usr/local/rtems/BuildTools/build/m68k-rtems4.10/libgcc/config.log)
>>
>> Eric sent me his config.log on PM.
>>
>> It shows his build is dying because the freshly built cross-compiler
>> ICEs:
>>
>> ...
>> configure:2611: /usr/local/rtems/BuildTools/build/./gcc/xgcc
>> -B/usr/local/rtems/BuildTools/build/./gcc/ -nostdinc
>> -B/usr/local/rtems/BuildTools/build/m68k-rtems4.10/newlib/ -isystem
>> /usr/local/rtems/BuildTools/build/m68k-rtems4.10/newlib/targ-include
>> -isystem /usr/local/rtems/BuildTools/gcc-4.4.5/newlib/libc/include
>> -B/usr/local/rtems/rtems-4.10/m68k-rtems4.10/bin/
>> -B/usr/local/rtems/rtems-4.10/m68k-rtems4.10/lib/ -isystem
>> /usr/local/rtems/rtems-4.10/m68k-rtems4.10/include -isystem
>> /usr/local/rtems/rtems-4.10/m68k-rtems4.10/sys-include -c -g -O2
>> conftest.c>&5
>> conftest.c:16: internal compiler error: in execute_ipa_pass_list, at
>> passes.c:1342
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See<http://gcc.gnu.org/bugs.html> for instructions.
>> configure:2614: $? = 1
>> configure: failed program was:
>> | /* confdefs.h. */
>> |
>> | #define PACKAGE_NAME "GNU C Runtime Library"
>> | #define PACKAGE_TARNAME "libgcc"
>> | #define PACKAGE_VERSION "1.0"
>> | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
>> | #define PACKAGE_BUGREPORT ""
>> | /* end confdefs.h. */
>> |
>> | int
>> | main ()
>> | {
>> |
>> | ;
>> | return 0;
>> | }
>> configure:2627: error: in
>> `/usr/local/rtems/BuildTools/build/m68k-rtems4.10/libgcc':
>> configure:2630: error: cannot compute suffix of object files: cannot
>> compile
>> ...
>>
>> Close to impossible for me to guess on the cause.
>>
>> Any other MacOS users out there?
>>
>> Do the rtems-4.10 toolchains build for other targets?
>
> rtems-4.11 toolchain (lm32 one) builds fine for me under Mac OS X 10.6
> (Snow leopard)
>
> I wrote a Portfile for MacPorts to ease installation of lm32-rtems
> toolchain :
>
> http://trac.macports.org/ticket/30767
> http://trac.macports.org/ticket/30766
>
> It works for me (and enables me to generate a .dmg installation file in
> one command)
>
> The only problem I had with gcc 4.5.2 is that -arch= was passed to Apple
> gcc during compilation of libgcc
OK, this would be a bug in GCC. The libgcc which is being built during
our builts is a target-library (m68k-rtems4.10, rps. lm32-rtems4.11),
not a build-host (OS X) library.
> which is not supported and it made the
> compilation fail at the exact same point in the logs posted in the
> original e-mail from Eric Norum.
Hmm, ... Eric?
> This issue (-arch) is fixed by the following files in the gcc Portfile :
>
> # the generated compiler doesn't accept -arch
> if {[info exists build_arch]&& ${os.platform} == "darwin"} {
> configure.cc_archflags
> configure.cxx_archflags
> configure.objc_archflags
> configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
> }
>
> I thought it was the same issue, it seems it is not.
Has this bug been fixed in FSF gcc? gcc-4.4 and gcc-4.5 are still
actively maintained on their corresponding development branches, i.e. it
would be nice to see this fixed upstream GCC.
Eric also reported on PM that m68k-rtems-4.11-gcc (gcc-4.6.1) would
build flawlessly for him.
> If I can do something or test something that can help, tell me :)
It would be helpful to hear if m68k-rtems4.10-gcc (gcc-4.4.6) builds on
other OS X versions - If yes, this would indicate a bug in Apple's
Lion's gcc, if no, this would indicate a bug in FSF's GCC.
Ralf
More information about the users
mailing list