From patchwork Tue Sep 4 06:36:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [SH] Define NO_IMPLICIT_EXTERN_C for newlib targets Date: Mon, 03 Sep 2012 20:36:07 -0000 From: Christian Bruel X-Patchwork-Id: 181498 Message-Id: <5045A157.9060808@st.com> To: "gcc-patches@gcc.gnu.org" Cc: Kaz Kojima newlib uses extern "C" wrappers in its headers, so GCC can be told it is C++ compatible. this patch fixes : FAIL: g++.dg/lookup/builtin5.C -std=c++11 scan-assembler _ZSt5atanhd t Tested om the 4.7 and 4.8 branches, OK for both ? nb: newlib can be added to the list of runtimes that need it (see http://gcc.gnu.org/ml/gcc-patches/2012-06/msg01164.html), in case this macro is removed in the future. Thanks Christian 2012-09-04 Christian Bruel * config/sh/newlib.h (NO_IMPLICIT_EXTERN_C): Define. Index: config/sh/newlib.h =================================================================== --- config/sh/newlib.h (revision 190714) +++ config/sh/newlib.h (working copy) @@ -23,3 +23,7 @@ #undef LIB_SPEC #define LIB_SPEC "-lc -lgloss" + +#undef NO_IMPLICIT_EXTERN_C +#define NO_IMPLICIT_EXTERN_C 1 +