On Dec 27, 2013, at 9:10 AM, Jeremy Olexa wrote:

> Hello,
> 
> I'm seeking assistance in debugging the stage3 bootstrapping issue on OSX 
> 10.9(.1). gcc-apple fails to build. This is my first OSX experience, so I'm 
> somewhat lost on the standard procedures. I'll post the logs for review. 
> http://dev.gentoo.org/~darkside/tmp/logs/
Starting with Xcode 5, Apple no longer distributes GCC (LLVM backend or 
otherwise). Instead, both gcc and llvm-gcc are symlinks to clang.

What's this got to do with building Apple GCC? Well, Clang defaults to C99 mode 
(actually GNU-extended C99) when compiling C, but that version of GCC was 
written in the GNU-extended C89 dialect (-std=gnu89). So, when you try to build 
GCC, you get these errors:

/Users/jolexa/gentoo/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.c:564:1:
 error: 
      redefinition of a 'extern inline' function 'floor_log2' is not supported
      in C99 mode
floor_log2 (unsigned HOST_WIDE_INT x)
^
/Users/jolexa/gentoo/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.h:174:1:
 note: 
      previous definition is here
floor_log2 (unsigned HOST_WIDE_INT x)
^
/Users/jolexa/gentoo/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.c:599:1:
 error: 
      redefinition of a 'extern inline' function 'exact_log2' is not supported
      in C99 mode
exact_log2 (unsigned HOST_WIDE_INT x)
^
/Users/jolexa/gentoo/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.h:180:1:
 note: 
      previous definition is here
exact_log2 (unsigned HOST_WIDE_INT x)
^
HTH.

Chip

> 
> Thanks all,
> Jeremy

Reply via email to