• 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.5.0/904-musl-libc-config.patch
Romain NaourRomain Naour committed 1960ad837b115 Oct 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
2
Date: Fri, 8 May 2015 08:25:47 +0000 (+0000)
3
Subject: [PATCH 2/13] musl libc config
4
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb
5
​
6
[PATCH 2/13] musl libc config
7
​
8
2015-05-08  Gregor Richards  <gregor.richards@uwaterloo.ca>
9
        Szabolcs Nagy  <szabolcs.nagy@arm.com>
10
​
11
    * config.gcc (LIBC_MUSL): New tm_defines macro.
12
    * config/linux.h (OPTION_MUSL): Define.
13
    (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,)
14
    (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,)
15
    (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
16
    (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
17
    (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
18
    * config/linux.opt (mmusl): New option.
19
    * doc/invoke.texi (GNU/Linux Options): Document -mmusl.
20
    * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
21
    (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
22
    * configure: Regenerate.
23
​
24
​
25
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4
26
---
27
​
28
Index: b/gcc/config.gcc
29
===================================================================
30
--- a/gcc/config.gcc
31
+++ b/gcc/config.gcc
32
@@ -575,7 +575,7 @@
33
 esac
34
 
35
 # Common C libraries.
36
-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
37
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
38
 
39
 # 32-bit x86 processors supported by --with-arch=.  Each processor
40
 # MUST be separated by exactly one space.
41
@@ -720,6 +720,9 @@
42
     *-*-*uclibc*)
43
       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
44
       ;;
45
+    *-*-*musl*)
46
+      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
47
+      ;;
48
     *)
49
       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
50
       ;;
51
Index: b/gcc/config/linux.h
52
===================================================================
53
--- a/gcc/config/linux.h
54
+++ b/gcc/config/linux.h
55
@@ -32,10 +32,12 @@
56
 #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
57
 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
58
 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
59
+#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
60
 #else
61
 #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
62
 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
63
 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
64
+#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
65
 #endif
66
 
67
 #define GNU_USER_TARGET_OS_CPP_BUILTINS()          \
68
@@ -50,21 +52,25 @@
69
     } while (0)
70
 
71
 /* Determine which dynamic linker to use depending on whether GLIBC or
72
-   uClibc or Bionic is the default C library and whether
73
-   -muclibc or -mglibc or -mbionic has been passed to change the default.  */
74
+   uClibc or Bionic or musl is the default C library and whether
75
+   -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
76
+   the default.  */
77
 
78
-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
79
-  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
80
+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
81
+  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
82
 
83
 #if DEFAULT_LIBC == LIBC_GLIBC
84
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
85
-  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
86
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
87
+  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
88
 #elif DEFAULT_LIBC == LIBC_UCLIBC
89
-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
90
-  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
91
+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
92
+  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
  • 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.