RTEMS-4.10 toolchain on OS X

Eric Norum wenorum at lbl.gov
Thu Aug 25 17:25:30 UTC 2011


Just to wind this thread up, here's the status of RTEMS-4.10 toolchain on OS X.
The source files from http://www.rtems.com/ftp/pub/rtems/SOURCES/4.10/
GCC=4.4.6
BINUTILS=2.20.1
NEWLIB=1.18.0
GDB=7.2
BINUTILSDIFF=binutils-2.20.1-rtems4.10-20100826.diff
GCCDIFF=gcc-core-4.4.6-rtems4.10-20110420.diff
NEWLIBDIFF=newlib-1.18.0-rtems4.10-20110518.diff
GDBDIFF=gdb-7.2-rtems4.10-20100903.diff


1 -- OS X 10.6.8 (Snow Leopard) Host compiler -- i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
	* Toolchains for m68k, i386, powerpc all build fine



2 -- OS X 10.7.1 (Lion) Host compiler i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
	* The GMP and MPFR library tests lock up or seg-fault in various spots so I tried to continue by installing without running the tests.
	* Cross-compiler hits an abort().  Here's the salient output from m68k-rtems4.10/libgcc/config.log
configure:2393: /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.6/ne
wlib/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 -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2396: $? = 1
configure:2415: /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.6/ne
wlib/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 -o conftest -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:2418: $? = 1
configure:2590: checking for suffix of object files
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.6/ne
wlib/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




3 -- OS X 10.7.1 (Lion) Host compilerApple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn) Target: x86_64-apple-darwin11.1.0 Thread model: posix
	* This time the GMP and MPFR libraries build and test fine.
	* But the compile  fails:
../../gcc-4.4.6/gcc/toplev.c:536:1: error: redefinition of a 'extern inline' function 'floor_log2' is not supported in C99 mode
floor_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.4.6/gcc/toplev.h:190:1: note: previous definition is here
floor_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.4.6/gcc/toplev.c:571:1: error: redefinition of a 'extern inline' function 'exact_log2' is not supported in C99 mode
exact_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.4.6/gcc/toplev.h:196:1: note: previous definition is here
exact_log2 (unsigned HOST_WIDE_INT x)

	* Try commenting out the inline function source in gcc-4.4.6/gcc/toplev.h -- but things still won't build.  This time the problem is an undefined symbol:
clang  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -o cc1plus-dummy \
	
     cp/cp-lang.o stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o c-dump.o  c-pretty-print.o c-opts.o c-pch.o incpath.o c-ppoutput.o c-cppbuiltin.o prefix.o c-gimplify.o c-omp.o dummy-checksum.o main.o  libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a  -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -L/usr/local/rtems/rtems-4.10/lib -L/usr/local/rtems/rtems-4.10/lib -lmpfr -lgmp
Undefined symbols for architecture x86_64:
  "_libc_name_p", referenced from:
      _nothrow_libfn_p in except.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)




So the takeaway message is, "Don't use this version of OS X Lion if you want to use RTEMS-4.10".
-- 
Eric Norum
wenorum at lbl.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20110825/726e21ed/attachment-0001.html>


More information about the users mailing list