This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libstdc++ os_defines now required for DragonFly


On 06/07/15 15:57 +0200, John Marino wrote:
On the development branch of DragonFly BSD, it was discovered that
__LONG_LONG_SUPPORTED was accidently unconditionally defined.  This had
a positive side effect of allowing GCC conftests to pass for C99 support
via wchar.h.  When the bug was fixed, the wchar C99 conftest now fails,
resulting in a c++ regression where software that previously compiled
now fail due to unknown functions such as wcstoll (since C99 supported
changed from "true" to "false")

FreeBSD behaves the exactly same way, and this OS dealt with it with
system-specific defines.
The DragonFly regression is fixed by copying the relevant defines from
the FreeBSD config. (see attached patch).

This patch should be applied to trunk and also backported to GCC-5 branch.

OK, I'll commit it thanks. I think we will be able to undo at least
part of the change on trunk soon-ish, as we're going to improve all
the _GLIBCXX_USE_C99 macros so that they are smarter and work better.


Index: libstdc++-v3/config/os/bsd/dragonfly/os_defines.h
===================================================================
--- libstdc++-v3/config/os/bsd/dragonfly/os_defines.h	(revision 225453)
+++ libstdc++-v3/config/os/bsd/dragonfly/os_defines.h	(working copy)
@@ -29,4 +29,9 @@
// System-specific #define, typedefs, corrections, etc, go here.  This
// file will come before all others.

+#define _GLIBCXX_USE_C99_CHECK 1
+#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
+#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
+#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)
+
#endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]