• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch
Gustavo ZacariasGustavo Zacarias committed 2fed00ea1ea27 Jun 2015
Raw file
Source viewDiff to previous
 
1
Allow C99-depending features of libstdc++ with uClibc
2
​
3
The libstdc++ code is fairly restrictive on how it checks for C99
4
compatibility: it requires *complete* C99 support to enable certain
5
features. For example, uClibc provides a good number of C99 features,
6
but not C99 complex number support. For this reason, libstdc++
7
completely disables many the standard C++ methods that can in fact
8
work because uClibc provides the necessary functions.
9
​
10
This patch is similar and highly inspired from
11
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
12
a way that doesn't involve changing the configure.ac script, as
13
autoreconfiguring gcc is complicated. It simply relies on the fact
14
that uClibc defines the __UCLIBC__ definition.
15
​
16
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
17
[Gustavo: update for 4.9.3]
18
​
19
diff -Nura gcc-4.9.3.orig/libstdc++-v3/config/locale/generic/c_locale.h gcc-4.9.3/libstdc++-v3/config/locale/generic/c_locale.h
20
--- gcc-4.9.3.orig/libstdc++-v3/config/locale/generic/c_locale.h    2014-01-02 19:30:10.000000000 -0300
21
+++ gcc-4.9.3/libstdc++-v3/config/locale/generic/c_locale.h 2015-06-27 06:46:04.420022179 -0300
22
@@ -70,7 +70,7 @@
23
     __builtin_va_list __args;
24
     __builtin_va_start(__args, __fmt);
25
 
26
-#ifdef _GLIBCXX_USE_C99
27
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
28
     const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
29
 #else
30
     const int __ret = __builtin_vsprintf(__out, __fmt, __args);
31
diff -Nura gcc-4.9.3.orig/libstdc++-v3/config/locale/gnu/c_locale.h gcc-4.9.3/libstdc++-v3/config/locale/gnu/c_locale.h
32
--- gcc-4.9.3.orig/libstdc++-v3/config/locale/gnu/c_locale.h    2014-01-02 19:30:10.000000000 -0300
33
+++ gcc-4.9.3/libstdc++-v3/config/locale/gnu/c_locale.h 2015-06-27 06:46:04.465023743 -0300
34
@@ -88,7 +88,7 @@
35
     __builtin_va_list __args;
36
     __builtin_va_start(__args, __fmt);
37
 
38
-#ifdef _GLIBCXX_USE_C99
39
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
40
     const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
41
 #else
42
     const int __ret = __builtin_vsprintf(__out, __fmt, __args);
43
diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/basic_string.h gcc-4.9.3/libstdc++-v3/include/bits/basic_string.h
44
--- gcc-4.9.3.orig/libstdc++-v3/include/bits/basic_string.h 2015-05-28 13:27:46.000000000 -0300
45
+++ gcc-4.9.3/libstdc++-v3/include/bits/basic_string.h  2015-06-27 06:49:04.741284648 -0300
46
@@ -2844,7 +2844,7 @@
47
 _GLIBCXX_END_NAMESPACE_VERSION
48
 } // namespace
49
 
50
-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
51
+#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))
52
 
53
 #include <ext/string_conversions.h>
54
 
55
diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc gcc-4.9.3/libstdc++-v3/include/bits/locale_facets_nonio.tcc
56
--- gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc    2014-01-02 19:30:10.000000000 -0300
57
+++ gcc-4.9.3/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2015-06-27 06:46:04.466023777 -0300
58
@@ -572,7 +572,7 @@
59
     {
60
       const locale __loc = __io.getloc();
61
       const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
62
-#ifdef _GLIBCXX_USE_C99
63
+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.