After updating the stdcxx module to the Dude r.3072 with explicit patches,
and fixing the ncurses c++ patch to use -lstdcxx4 instead of -lstdcxx, I
found that ncurses no longer builds.
I reported an error earlier with foss-flags.inc which has %{CPPFLAGS_} includes
%{_DEFINES_C} which has things like -xpg6, which tend to botch up C++
compiles when they include ${CPPFLAGS} in their CXXFLAGS.
This is the entry from foss-flags.inc for _DEFINES_C:
# These are defines for C compiles only
%define _DEFINES_C -D_XOPEN_SOURCE=600 -D_XPG6
-D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX -D_STRICT_STDC -D_STR
ICT_STDC__ -D_STDC_C99 -D_ISOC99_SOURCE
That's exactly what happened with the ncurses c++ module.
Applying this patch allows ncurses to build correctly on both
32-bit and 64-bit "intel/amd" systems.
I tried to work around the issue by removing the %_DEFINES_C flags
from %CPPFLAGS, which worked correctly in the configure section,
and duplicated it in the %build section, but it still failed to compile.
I would assume that impact to C++ modules is 0, since anything
that is already building is either not including CPPFLAGS or
has reset CPPFLAGS so that this wont' be an issue. The only thing
that may be a little suspect now is compiling test programs that
don't include CFLAGS.
Thoughts?
--- a/specs/include/foss-flags.inc Wed Dec 02 10:41:34 2009 -0500
+++ b/specs/include/foss-flags.inc Thu Dec 03 08:10:11 2009 -0500
@@ -46,7 +46,8 @@
# Collect all the common defines and includes into CPPFLAGS for each language
%define CPPFLAGS_CXX_ %{_DEFINES_COMMON} %{_DEFINES_CXX}
%{_DEFINES_ARCH} %{_INCLUDES_CXX} %{_INCLUDES_COMMON}
-%define CPPFLAGS_C_ %{_DEFINES_COMMON} %{_DEFINES_C}
%{_DEFINES_ARCH} %{_INCLUDES_COMMON}
+#%define CPPFLAGS_C_ %{_DEFINES_COMMON} %{_DEFINES_C}
%{_DEFINES_ARCH} %{_INCLUDES_COMMON}
+%define CPPFLAGS_C_ %{_DEFINES_COMMON} %{_DEFINES_ARCH}
%{_INCLUDES_COMMON}
# C language flags
%if %{?!_C_COMPAT:1}
@@ -57,7 +58,7 @@
%endif
%define _CCAS_COMMON %{_C_COMPAT} -errshort=full -errfmt=error
-errwarn=%none %{_C_DEBUG_OR_STRIP} -xcsi -xustr=ascii_utf16_ushort
-features=extinl -mt
-%define CFLAGS_ %{_C_COMMON} %{_OPTIM_COMMON} %{_OPTIM_ARCH}
%{_TARGET_ARCH}
+%define CFLAGS_ %{_C_COMMON} %{_DEFINES_C} %{_OPTIM_COMMON}
%{_OPTIM_ARCH} %{_TARGET_ARCH}
%define CCASFLAGS_ %{_CCAS_COMMON} %{_OPTIM_CCAS} %{_TARGET_ARCH}
# C++ language flags