ports/182657: [patch] lang/gcc48: expose c99 math in 'std' namespace
Simon
freebsd-standards at FreeBSD.org
Sat Oct 5 00:10:00 UTC 2013
>Number: 182657
>Category: ports
>Synopsis: [patch] lang/gcc48: expose c99 math in 'std' namespace
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 05 00:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Simon
>Release:
>Organization:
>Environment:
http://svnweb.freebsd.org/changeset/base/227472
http://svnweb.freebsd.org/changeset/base/255294
>Description:
Just like libc++ (on freebsd) define _DECLARE_C99_LDBL_MATH to make
C++11 math work.
http://forums.freebsd.org/showthread.php?t=42279
>How-To-Repeat:
>Fix:
--- c99math.diff begins here ---
diff --git libstdc++-v3/acinclude.m4 libstdc++-v3/acinclude.m4
index af0b23b..92f590c 100644
--- libstdc++-v3/acinclude.m4
+++ libstdc++-v3/acinclude.m4
@@ -1584,6 +1584,11 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
# Check for the existence of <math.h> functions.
AC_MSG_CHECKING([for ISO C99 support to TR1 in <math.h>])
+ case ${target_os} in
+ freebsd*)
+ AC_DEFINE(_DECLARE_C99_LDBL_MATH, 1,
+ [Define if C99 math implementation is incomplete.])
+ esac
AC_CACHE_VAL(glibcxx_cv_c99_math_tr1, [
AC_TRY_COMPILE([#include <math.h>],
[typedef double_t my_double_t;
diff --git libstdc++-v3/config.h.in libstdc++-v3/config.h.in
index 61ac3ab..6621fc2 100644
--- libstdc++-v3/config.h.in
+++ libstdc++-v3/config.h.in
@@ -713,6 +713,9 @@
/* Version number of package */
#undef VERSION
+/* Define if C99 math implementation is incomplete. */
+#undef _DECLARE_C99_LDBL_MATH
+
/* Define if the compiler supports C++11 atomics. */
#undef _GLIBCXX_ATOMIC_BUILTINS
diff --git libstdc++-v3/configure libstdc++-v3/configure
index 57452f7..7dff6ae 100755
--- libstdc++-v3/configure
+++ libstdc++-v3/configure
@@ -18925,6 +18925,12 @@ $as_echo "#define _GLIBCXX_USE_C99_STDINT_TR1 1" >>confdefs.h
# Check for the existence of <math.h> functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support to TR1 in <math.h>" >&5
$as_echo_n "checking for ISO C99 support to TR1 in <math.h>... " >&6; }
+ case ${target_os} in
+ freebsd*)
+
+$as_echo "#define _DECLARE_C99_LDBL_MATH 1" >>confdefs.h
+
+ esac
if test "${glibcxx_cv_c99_math_tr1+set}" = set; then :
$as_echo_n "(cached) " >&6
else
--- c99math.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list