22766104 GCC 5.3 std:to_string still broken
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Thu, 18 Feb 2016 23:14:56 -0800
changeset 5478 2b166911e3bb
parent 5477 5eabbdf042bc
child 5479 7146b76b602e
22766104 GCC 5.3 std:to_string still broken
components/gcc53/developer-gcc-gcc-common-53.p5m
components/gcc53/patches/005-const-correct.patch
components/gcc53/patches/006-fixincludes.patch
components/gcc53/patches/007-std-macros.patch
--- a/components/gcc53/developer-gcc-gcc-common-53.p5m	Tue Feb 16 14:56:03 2016 -0800
+++ b/components/gcc53/developer-gcc-gcc-common-53.p5m	Thu Feb 18 23:14:56 2016 -0800
@@ -114,6 +114,7 @@
     variant.arch=i386
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/gmon.o
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/include-fixed/limits.h
+file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/include-fixed/sys/feature_tests.h
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/include-fixed/syslimits.h
 file \
     path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/include/adxintrin.h \
--- a/components/gcc53/patches/005-const-correct.patch	Tue Feb 16 14:56:03 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-# Stefan Teleman <[email protected]>
-# C++ wants const-correctness. NULL isn't const-correct.
---- gcc-5.3.0/libgcc/gthr-posix.h	2015-01-05 04:33:28.000000000 -0800
-+++ gcc-5.3.0/libgcc/gthr-posix.h	2015-08-04 09:00:39.627285519 -0700
[email protected]@ -659,7 +659,8 @@
- __gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
- 		  void *__args)
- {
--  return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
-+  const pthread_attr_t *__pta = 0;
-+  return __gthrw_(pthread_create) (__threadid, __pta, __func, __args);
- }
- 
- static inline int
[email protected]@ -729,7 +730,10 @@
- __gthread_mutex_init_function (__gthread_mutex_t *__mutex)
- {
-   if (__gthread_active_p ())
--    __gthrw_(pthread_mutex_init) (__mutex, NULL);
-+  {
-+    const pthread_mutexattr_t *__pma = 0;
-+    __gthrw_(pthread_mutex_init) (__mutex, __pma);
-+  }
- }
- 
- static inline int
[email protected]@ -842,7 +846,10 @@
- __gthread_cond_init_function (__gthread_cond_t *__cond)
- {
-   if (__gthread_active_p ())
--    __gthrw_(pthread_cond_init) (__cond, NULL);
-+  {
-+    const pthread_condattr_t *__pca = 0;
-+    __gthrw_(pthread_cond_init) (__cond, __pca);
-+  }
- }
- #endif
- 
--- a/components/gcc53/patches/006-fixincludes.patch	Tue Feb 16 14:56:03 2016 -0800
+++ b/components/gcc53/patches/006-fixincludes.patch	Thu Feb 18 23:14:56 2016 -0800
@@ -12,9 +12,9 @@
  # DOS/Windows filesystems.
  find . -name '[Dd][Oo][Nn][Ee]' -exec rm -f '{}' ';'
  
-+# We only want limits.h and syslimits.h fixed on Solaris
++# We only want limits.h, syslimits.h, and feature_tests.h fixed on Solaris
 +for file in `find . -type f | \
-+             egrep -v './(limits.h|syslimits.h)'` ; do
++             egrep -v './(limits.h|syslimits.h|sys/feature_tests.h)'` ; do
 +  echo Removing $file
 +  rm -f $file
 +done
--- a/components/gcc53/patches/007-std-macros.patch	Tue Feb 16 14:56:03 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-#  Based on GCC 4.9 patches, set corresponding standards based
-#  feature macros.  This may need to be revisited and coordinated
-#  with additional header changes.  This is not being submitted
-#  upstream until we have a clear path forward.
-#
---- gcc-5.3.0/gcc/config/sol2.h.orig	Sat Jan 16 22:00:10 2016
-+++ gcc-5.3.0/gcc/config/sol2.h	Sat Jan 16 22:02:58 2016
[email protected]@ -94,12 +94,23 @@
- 	   library.  */					\
- 	if (c_dialect_cxx ())				\
- 	  {						\
--	    builtin_define ("__STDC_VERSION__=199901L");\
--	    builtin_define ("_XOPEN_SOURCE=600");	\
--	    builtin_define ("_LARGEFILE_SOURCE=1");	\
--	    builtin_define ("_LARGEFILE64_SOURCE=1");	\
--	    builtin_define ("__EXTENSIONS__");		\
--	  }						\
-+            switch (cxx_dialect)			\
-+              {			\
-+              case cxx03: /* same as cxx98 */		\
-+                builtin_define ("__STDC_VERSION__=199409L");\
-+                builtin_define ("_XOPEN_SOURCE=500");	\
-+                break;					\
-+              case cxx11:				\
-+              case cxx14:				\
-+              default:					\
-+	        builtin_define ("__STDC_VERSION__=199901L");\
-+                builtin_define ("_XOPEN_SOURCE=600");	\
-+                break;					\
-+              }						\
-+            builtin_define ("_LARGEFILE_SOURCE=1");	\
-+            builtin_define ("_LARGEFILE64_SOURCE=1");	\
-+            builtin_define ("__EXTENSIONS__=1");	\
-+          }					        \
- 	TARGET_SUB_OS_CPP_BUILTINS();			\
-     } while (0)
- 
-