• 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/5.2.0/905-add-musl-support-to-gcc.patch
Gustavo ZacariasGustavo Zacarias committed c51697185fd17 Jul 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
2
Date: Fri, 8 May 2015 08:30:40 +0000 (+0000)
3
Subject: [PATCH 0/13] Add musl support to GCC
4
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e
5
​
6
[PATCH 0/13] Add musl support to GCC
7
​
8
2015-05-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
9
​
10
    * config/glibc-stdint.h (OPTION_MUSL): Define.
11
    (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE):
12
    Change the definition based on OPTION_MUSL for 64 bit targets.
13
    * config/linux.h (OPTION_MUSL): Redefine.
14
    * config/alpha/linux.h (OPTION_MUSL): Redefine.
15
    * config/rs6000/linux.h (OPTION_MUSL): Redefine.
16
    * config/rs6000/linux64.h (OPTION_MUSL): Redefine.
17
​
18
​
19
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4
20
---
21
​
22
Index: b/gcc/config/alpha/linux.h
23
===================================================================
24
--- a/gcc/config/alpha/linux.h
25
+++ b/gcc/config/alpha/linux.h
26
@@ -61,10 +61,14 @@
27
 #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
28
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
29
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
30
+#undef OPTION_MUSL
31
+#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
32
 #else
33
 #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
34
 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
35
 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
36
+#undef OPTION_MUSL
37
+#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
38
 #endif
39
 
40
 /* Determine what functions are present at the runtime;
41
Index: b/gcc/config/glibc-stdint.h
42
===================================================================
43
--- a/gcc/config/glibc-stdint.h
44
+++ b/gcc/config/glibc-stdint.h
45
@@ -22,6 +22,12 @@
46
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
47
 <http://www.gnu.org/licenses/>.  */
48
 
49
+/* Systems using musl libc should use this header and make sure
50
+   OPTION_MUSL is defined correctly before using the TYPE macros. */
51
+#ifndef OPTION_MUSL
52
+#define OPTION_MUSL 0
53
+#endif
54
+
55
 #define SIG_ATOMIC_TYPE "int"
56
 
57
 #define INT8_TYPE "signed char"
58
@@ -43,12 +49,12 @@
59
 #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
60
 
61
 #define INT_FAST8_TYPE "signed char"
62
-#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
63
-#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
64
+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
65
+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
66
 #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
67
 #define UINT_FAST8_TYPE "unsigned char"
68
-#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
69
-#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
70
+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
71
+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
72
 #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
73
 
74
 #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
75
Index: b/gcc/config/linux.h
76
===================================================================
77
--- a/gcc/config/linux.h
78
+++ b/gcc/config/linux.h
79
@@ -32,11 +32,13 @@
80
 #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
81
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
82
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
83
+#undef OPTION_MUSL
84
 #define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
85
 #else
86
 #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
87
 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
88
 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
89
+#undef OPTION_MUSL
90
 #define OPTION_MUSL   (linux_libc == LIBC_MUSL)
91
 #endif
92
 
  • 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.