diff --git a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild index 5f5306f78aee9..9d1eef42481ba 100644 --- a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild +++ b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild @@ -246,6 +246,11 @@ src_configure() { [[ ${CTARGET} == powerpc64-* || ${CTARGET} == x86_64-* ]] && \ export CC="${CC:-$(tc-getCC)} -m64" + # Clang on OSX defaults to c99 mode, while GCC defaults to gnu89 + # (C90 + extensions). This makes Clang barf on GCC's sources, so + # work around that. Bugs #491098, #574736 + export CC="${CC:-$(tc-getCC)} -std=gnu89" + mkdir -p "${WORKDIR}"/build cd "${WORKDIR}"/build einfo "Configuring GCC with: ${myconf//--/\n\t--}"