source:
clfs-embedded/patches/gcc-4.7.3-musl-1.patch@
151f7c4
Last change on this file since 151f7c4 was c01e552, checked in by , 11 years ago | |
---|---|
|
|
File size: 26.0 KB |
-
libstdc++-v3/configure.host
Submitted By: Andrew Bradford <andrew@bradfordembedded.com> Date: 2013-10-14 Initial Package Version: 4.7.3 Origin: Gregor Richards' musl-cross Upstream Status: None Description: Patches to gcc to build for musl-libc. # HG changeset patch # Parent f50bb54f331f73405131a30b4f353cfda1c70304 Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one. diff -r f50bb54f331f libstdc++-v3/configure.host
a b 264 264 os_include_dir="os/bsd/freebsd" 265 265 ;; 266 266 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) 267 # check for musl by target 268 case "${host_os}" in 269 *-musl*) 270 os_include_dir="os/generic" 271 ;; 272 *) 273 267 274 if [ "$uclibc" = "yes" ]; then 268 275 os_include_dir="os/uclibc" 269 276 elif [ "$bionic" = "yes" ]; then … … 272 279 os_include_dir="os/gnu-linux" 273 280 fi 274 281 ;; 282 283 esac 284 ;; 275 285 hpux*) 276 286 os_include_dir="os/hpux" 277 287 ;; -
gcc/config.gcc
# HG changeset patch # Parent 8cd76d5f6674f04c31523971d1dfc81c91388c38 Adding -mmusl as a musl libc specifier, and the necessary hacks for it to know how to find musl's dynamic linker. diff -r 8cd76d5f6674 gcc/config.gcc
a b 522 522 esac 523 523 524 524 # Common C libraries. 525 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 "525 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" 526 526 527 527 # Common parts for widely ported systems. 528 528 case ${target} in … … 625 625 *-*-*uclibc*) 626 626 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" 627 627 ;; 628 *-*-*musl*) 629 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" 630 ;; 628 631 *) 629 632 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" 630 633 ;; -
gcc/config/linux.h
diff -r 8cd76d5f6674 gcc/config/linux.h
a b 33 33 #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) 34 34 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) 35 35 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) 36 #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) 36 37 #else 37 38 #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) 38 39 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) 39 40 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) 41 #define OPTION_MUSL (linux_libc == LIBC_MUSL) 40 42 #endif 41 43 42 44 #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ … … 54 56 uClibc or Bionic is the default C library and whether 55 57 -muclibc or -mglibc or -mbionic has been passed to change the default. */ 56 58 57 #define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, L D1, LD2, LD3) \58 "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";: " LD1 "}}"59 #define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ 60 "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" 59 61 60 62 #if DEFAULT_LIBC == LIBC_GLIBC 61 #define CHOOSE_DYNAMIC_LINKER(G, U, B ) \62 CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)63 #define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ 64 CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) 63 65 #elif DEFAULT_LIBC == LIBC_UCLIBC 64 #define CHOOSE_DYNAMIC_LINKER(G, U, B ) \65 CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)66 #define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ 67 CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) 66 68 #elif DEFAULT_LIBC == LIBC_BIONIC 67 #define CHOOSE_DYNAMIC_LINKER(G, U, B) \ 68 CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) 69 #define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ 70 CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) 71 #elif DEFAULT_LIBC == LIBC_MUSL 72 #define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ 73 CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) 69 74 #else 70 75 #error "Unsupported DEFAULT_LIBC" 71 76 #endif /* DEFAULT_LIBC */ … … 85 90 86 91 #define GNU_USER_DYNAMIC_LINKER \ 87 92 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ 88 BIONIC_DYNAMIC_LINKER )93 BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) 89 94 #define GNU_USER_DYNAMIC_LINKER32 \ 90 95 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ 91 BIONIC_DYNAMIC_LINKER32 )96 BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) 92 97 #define GNU_USER_DYNAMIC_LINKER64 \ 93 98 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ 94 BIONIC_DYNAMIC_LINKER64 )99 BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) 95 100 #define GNU_USER_DYNAMIC_LINKERX32 \ 96 101 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ 97 BIONIC_DYNAMIC_LINKERX32 )102 BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) 98 103 99 104 /* Determine whether the entire c99 runtime 100 105 is present in the runtime library. */ 101 106 #undef TARGET_C99_FUNCTIONS 102 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC )107 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL) 103 108 104 109 /* Whether we have sincos that follows the GNU extension. */ 105 110 #undef TARGET_HAS_SINCOS … … 108 113 /* Whether we have Bionic libc runtime */ 109 114 #undef TARGET_HAS_BIONIC 110 115 #define TARGET_HAS_BIONIC (OPTION_BIONIC) 116 117 /* musl avoids problematic includes by rearranging the include directories. 118 * Unfortunately, this is mostly duplicated from cppdefault.c */ 119 #if DEFAULT_LIBC == LIBC_MUSL 120 #define INCLUDE_DEFAULTS_MUSL_GPP \ 121 { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ 122 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ 123 { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ 124 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ 125 { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ 126 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, 127 128 #ifdef LOCAL_INCLUDE_DIR 129 #define INCLUDE_DEFAULTS_MUSL_LOCAL \ 130 { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ 131 { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, 132 #else 133 #define INCLUDE_DEFAULTS_MUSL_LOCAL 134 #endif 135 136 #ifdef PREFIX_INCLUDE_DIR 137 #define INCLUDE_DEFAULTS_MUSL_PREFIX \ 138 { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, 139 #else 140 #define INCLUDE_DEFAULTS_MUSL_PREFIX 141 #endif 142 143 #ifdef CROSS_INCLUDE_DIR 144 #define INCLUDE_DEFAULTS_MUSL_CROSS \ 145 { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, 146 #else 147 #define INCLUDE_DEFAULTS_MUSL_CROSS 148 #endif 149 150 #ifdef TOOL_INCLUDE_DIR 151 #define INCLUDE_DEFAULTS_MUSL_TOOL \ 152 { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, 153 #else 154 #define INCLUDE_DEFAULTS_MUSL_TOOL 155 #endif 156 157 #ifdef NATIVE_SYSTEM_HEADER_DIR 158 #define INCLUDE_DEFAULTS_MUSL_NATIVE \ 159 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ 160 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, 161 #else 162 #define INCLUDE_DEFAULTS_MUSL_NATIVE 163 #endif 164 165 #if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) 166 # undef INCLUDE_DEFAULTS_MUSL_LOCAL 167 # define INCLUDE_DEFAULTS_MUSL_LOCAL 168 # undef INCLUDE_DEFAULTS_MUSL_NATIVE 169 # define INCLUDE_DEFAULTS_MUSL_NATIVE 170 #else 171 # undef INCLUDE_DEFAULTS_MUSL_CROSS 172 # define INCLUDE_DEFAULTS_MUSL_CROSS 173 #endif 174 175 #undef INCLUDE_DEFAULTS 176 #define INCLUDE_DEFAULTS \ 177 { \ 178 INCLUDE_DEFAULTS_MUSL_GPP \ 179 INCLUDE_DEFAULTS_MUSL_PREFIX \ 180 INCLUDE_DEFAULTS_MUSL_CROSS \ 181 INCLUDE_DEFAULTS_MUSL_TOOL \ 182 INCLUDE_DEFAULTS_MUSL_NATIVE \ 183 { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ 184 { 0, 0, 0, 0, 0, 0 } \ 185 } 186 #endif -
gcc/config/linux.opt
diff -r 8cd76d5f6674 gcc/config/linux.opt
a b 30 30 muclibc 31 31 Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) 32 32 Use uClibc C library 33 34 mmusl 35 Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) 36 Use musl C library -
gcc/ginclude/stddef.h
diff -r 8cd76d5f6674 gcc/ginclude/stddef.h
a b 184 184 #ifndef _GCC_SIZE_T 185 185 #ifndef _SIZET_ 186 186 #ifndef __size_t 187 #ifndef __DEFINED_size_t /* musl */ 187 188 #define __size_t__ /* BeOS */ 188 189 #define __SIZE_T__ /* Cray Unicos/Mk */ 189 190 #define _SIZE_T … … 200 201 #define ___int_size_t_h 201 202 #define _GCC_SIZE_T 202 203 #define _SIZET_ 204 #define __DEFINED_size_t /* musl */ 203 205 #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ 204 206 || defined(__FreeBSD_kernel__) 205 207 /* __size_t is a typedef on FreeBSD 5, must not trash it. */ … … 215 217 typedef long ssize_t; 216 218 #endif /* __BEOS__ */ 217 219 #endif /* !(defined (__GNUG__) && defined (size_t)) */ 220 #endif /* __DEFINED_size_t */ 218 221 #endif /* __size_t */ 219 222 #endif /* _SIZET_ */ 220 223 #endif /* _GCC_SIZE_T */ -
libgomp/config/posix/time.c
# HG changeset patch # Parent 2b94537ce2496c88e7e797c617e5b95e8d7e4785 A fix for libgomp to correctly request a POSIX version for time support. diff -r 2b94537ce249 libgomp/config/posix/time.c
a b 28 28 The following implementation uses the most simple POSIX routines. 29 29 If present, POSIX 4 clocks should be used instead. */ 30 30 31 #define _POSIX_C_SOURCE 199309L /* for clocks */ 32 31 33 #include "libgomp.h" 32 34 #include <unistd.h> 33 35 #if TIME_WITH_SYS_TIME -
libgcc/unwind-dw2-fde-dip.c
diff -r 2ebb44d1e6f1 libgcc/unwind-dw2-fde-dip.c
a b 47 47 #include "unwind-compat.h" 48 48 #include "gthr.h" 49 49 50 #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ 51 && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ 52 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) 50 #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) 53 51 # define USE_PT_GNU_EH_FRAME 54 #endif 55 56 #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ 57 && defined(__FreeBSD__) && __FreeBSD__ >= 7 58 # define ElfW __ElfN 59 # define USE_PT_GNU_EH_FRAME 60 #endif 61 62 #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ 63 && defined(__OpenBSD__) 64 # define ElfW(type) Elf_##type 65 # define USE_PT_GNU_EH_FRAME 66 #endif 67 68 #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ 69 && defined(TARGET_DL_ITERATE_PHDR) \ 70 && defined(__sun__) && defined(__svr4__) 71 # define USE_PT_GNU_EH_FRAME 52 # ifdef __OpenBSD__ 53 # define ElfW(type) Elf_##typ 54 # elif defined(__FreeBSD__) && __FreeBSD__ >= 7 55 # define ElfW __ElfN 56 # endif 72 57 #endif 73 58 74 59 #if defined(USE_PT_GNU_EH_FRAME) -
gcc/configure
diff -r 75d9c38318a7 gcc/configure
a b 26736 26736 else 26737 26737 gcc_cv_libc_provides_ssp=no 26738 26738 case "$target" in 26739 *-*-musl*) 26740 # All versions of musl provide stack protector 26741 gcc_cv_libc_provides_ssp=yes;; 26739 26742 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) 26740 26743 # glibc 2.4 and later provides __stack_chk_fail and 26741 26744 # either __stack_chk_guard, or TLS access to stack guard canary. … … 26769 26772 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now 26770 26773 # simply assert that glibc does provide this, which is true for all 26771 26774 # realistically usable GNU/Hurd configurations. 26775 # All supported versions of musl provide it as well 26772 26776 gcc_cv_libc_provides_ssp=yes;; 26773 26777 *-*-darwin* | *-*-freebsd*) 26774 26778 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" … … 26851 26855 gcc_cv_target_dl_iterate_phdr=no 26852 26856 fi 26853 26857 ;; 26858 *-linux-musl*) 26859 gcc_cv_target_dl_iterate_phdr=yes 26860 ;; 26854 26861 esac 26855 26862 26856 26863 if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -
gcc/configure.ac
diff -r 75d9c38318a7 gcc/configure.ac
a b 4719 4719 gcc_cv_libc_provides_ssp, 4720 4720 [gcc_cv_libc_provides_ssp=no 4721 4721 case "$target" in 4722 *-*-musl*) 4723 # All versions of musl provide stack protector 4724 gcc_cv_libc_provides_ssp=yes;; 4722 4725 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) 4723 4726 [# glibc 2.4 and later provides __stack_chk_fail and 4724 4727 # either __stack_chk_guard, or TLS access to stack guard canary. … … 4752 4755 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now 4753 4756 # simply assert that glibc does provide this, which is true for all 4754 4757 # realistically usable GNU/Hurd configurations. 4758 # All supported versions of musl provide it as well 4755 4759 gcc_cv_libc_provides_ssp=yes;; 4756 4760 *-*-darwin* | *-*-freebsd*) 4757 4761 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], … … 4817 4821 gcc_cv_target_dl_iterate_phdr=no 4818 4822 fi 4819 4823 ;; 4824 *-linux-musl*) 4825 gcc_cv_target_dl_iterate_phdr=yes 4826 ;; 4820 4827 esac 4821 4828 GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) 4822 4829 if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -
fixincludes/mkfixinc.sh
# HG changeset patch # Parent 94e435662aff38e86c9ca0dff4bbf451e0190b34 Get rid of ever-broken fixincludes on musl. diff -r 94e435662aff -r e27957848dc8 fixincludes/mkfixinc.sh
a b 19 19 powerpc-*-eabi* | \ 20 20 powerpc-*-rtems* | \ 21 21 powerpcle-*-eabisim* | \ 22 powerpcle-*-eabi* ) 22 powerpcle-*-eabi* | \ 23 *-musl* ) 23 24 # IF there is no include fixing, 24 25 # THEN create a no-op fixer and exit 25 26 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} -
config.sub
# HG changeset patch # Parent 65cd23493c45f2a531ca15ffea563d6110143cdd New config.sub for GCC versions too early for the update. diff -r 65cd23493c45 -r 355cec477536 config.sub
a b 4 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 5 5 # 2011 Free Software Foundation, Inc. 6 6 7 timestamp='2011- 10-29'7 timestamp='2011-03-23' 8 8 9 9 # This file is (in principle) common to ALL GNU software. 10 10 # The presence of a machine in this file suggests that SOME GNU software … … 125 125 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 126 126 case $maybe_os in 127 127 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 128 linux-musl* | \ 128 129 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 129 130 knetbsd*-gnu* | netbsd*-gnu* | \ 130 131 kopensolaris*-gnu* | \ … … 251 252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 252 253 | am33_2.0 \ 253 254 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 254 | be32 | be64 \255 255 | bfin \ 256 256 | c4x | clipper \ 257 257 | d10v | d30v | dlx | dsp16xx \ 258 | epiphany \259 258 | fido | fr30 | frv \ 260 259 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 261 | hexagon \262 260 | i370 | i860 | i960 | ia64 \ 263 261 | ip2k | iq2000 \ 264 | le32 | le64 \265 262 | lm32 \ 266 263 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 267 264 | maxq | mb | microblaze | mcore | mep | metag \ … … 295 292 | pdp10 | pdp11 | pj | pjl \ 296 293 | powerpc | powerpc64 | powerpc64le | powerpcle \ 297 294 | pyramid \ 298 | r l78 | rx \295 | rx \ 299 296 | score \ 300 297 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 301 298 | sh64 | sh64le \ … … 304 301 | spu \ 305 302 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 306 303 | ubicom32 \ 307 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3\304 | v850 | v850e \ 308 305 | we32k \ 309 306 | x86 | xc16x | xstormy16 | xtensa \ 310 307 | z8k | z80) … … 361 358 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 362 359 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 363 360 | avr-* | avr32-* \ 364 | be32-* | be64-* \365 361 | bfin-* | bs2000-* \ 366 362 | c[123]* | c30-* | [cjt]90-* | c4x-* \ 367 363 | clipper-* | craynv-* | cydra-* \ … … 370 366 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 371 367 | h8300-* | h8500-* \ 372 368 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 373 | hexagon-* \374 369 | i*86-* | i860-* | i960-* | ia64-* \ 375 370 | ip2k-* | iq2000-* \ 376 | le32-* | le64-* \377 371 | lm32-* \ 378 372 | m32c-* | m32r-* | m32rle-* \ 379 373 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ … … 407 401 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 408 402 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 409 403 | pyramid-* \ 410 | r l78-* | romp-* | rs6000-* | rx-* \404 | romp-* | rs6000-* | rx-* \ 411 405 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 412 406 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 413 407 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ … … 415 409 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 416 410 | tahoe-* \ 417 411 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 418 | tile *-* \412 | tile-* | tilegx-* \ 419 413 | tron-* \ 420 414 | ubicom32-* \ 421 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 422 | vax-* \ 415 | v850-* | v850e-* | vax-* \ 423 416 | we32k-* \ 424 417 | x86-* | x86_64-* | xc16x-* | xps100-* \ 425 418 | xstormy16-* | xtensa*-* \ … … 820 813 basic_machine=i370-ibm 821 814 os=-mvs 822 815 ;; 823 nacl)824 basic_machine=le32-unknown825 os=-nacl826 ;;827 816 ncr3000) 828 817 basic_machine=i486-ncr 829 818 os=-sysv4 … … 1132 1121 basic_machine=t90-cray 1133 1122 os=-unicos 1134 1123 ;; 1124 # This must be matched before tile*. 1125 tilegx*) 1126 basic_machine=tilegx-unknown 1127 os=-linux-gnu 1128 ;; 1135 1129 tile*) 1136 basic_machine= $basic_machine-unknown1130 basic_machine=tile-unknown 1137 1131 os=-linux-gnu 1138 1132 ;; 1139 1133 tx39) … … 1346 1340 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1347 1341 | -mingw32* | -linux-gnu* | -linux-android* \ 1348 1342 | -linux-newlib* | -linux-uclibc* \ 1343 | -linux-musl* \ 1349 1344 | -uxpv* | -beos* | -mpeix* | -udk* \ 1350 1345 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1351 1346 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -
gcc/config/i386/linux.h
# HG changeset patch # Parent 3ea10cd626cb7abdfd56d3fe8d2c9ed58a82797b Support for i386-linux-musl and x86_64-linux-musl. diff -r 3ea10cd626cb gcc/config/i386/linux.h
a b 21 21 22 22 #define GNU_USER_LINK_EMULATION "elf_i386" 23 23 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" 24 #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" -
gcc/config/i386/linux64.h
diff -r 3ea10cd626cb gcc/config/i386/linux64.h
a b 30 30 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" 31 31 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" 32 32 #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" 33 34 #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" 35 #define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" 36 #define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" -
libitm/config/linux/x86/tls.h
diff -r 3ea10cd626cb libitm/config/linux/x86/tls.h
a b 25 25 #ifndef LIBITM_X86_TLS_H 26 26 #define LIBITM_X86_TLS_H 1 27 27 28 #if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) 28 #if defined(__GLIBC_PREREQ) 29 #if __GLIBC_PREREQ(2, 10) 29 30 /* Use slots in the TCB head rather than __thread lookups. 30 31 GLIBC has reserved words 10 through 13 for TM. */ 31 32 #define HAVE_ARCH_GTM_THREAD 1 32 33 #define HAVE_ARCH_GTM_THREAD_DISP 1 33 34 #endif 35 #endif 34 36 35 37 #include "config/generic/tls.h" 36 38 37 #if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) 39 #if defined(__GLIBC_PREREQ) 40 #if __GLIBC_PREREQ(2, 10) 38 41 namespace GTM HIDDEN { 39 42 40 43 #ifdef __x86_64__ … … 101 104 102 105 } // namespace GTM 103 106 #endif /* >= GLIBC 2.10 */ 107 #endif 104 108 105 109 #endif // LIBITM_X86_TLS_H -
gcc/config/arm/linux-eabi.h
Support for arm-linux-musl. diff -r 8801a3f6d050 gcc/config/arm/linux-eabi.h
a b 64 64 #undef GLIBC_DYNAMIC_LINKER 65 65 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" 66 66 67 /* For ARM musl currently supports four dynamic linkers: 68 - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI 69 - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI 70 - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB 71 - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB 72 musl does not support the legacy OABI mode. 73 All the dynamic linkers live in /lib. 74 We default to soft-float, EL. */ 75 #undef MUSL_DYNAMIC_LINKER 76 #if TARGET_BIG_ENDIAN_DEFAULT 77 #define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" 78 #else 79 #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" 80 #endif 81 #define MUSL_DYNAMIC_LINKER \ 82 "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" 83 67 84 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to 68 85 use the GNU/Linux version, not the generic BPABI version. */ 69 86 #undef LINK_SPEC -
libitm/config/arm/hwcap.cc
diff -r 8801a3f6d050 libitm/config/arm/hwcap.cc
a b 40 40 41 41 #ifdef __linux__ 42 42 #include <unistd.h> 43 #ifdef __GLIBC__ 43 44 #include <sys/fcntl.h> 45 #else 46 #include <fcntl.h> 47 #endif 44 48 #include <elf.h> 45 49 46 50 static void __attribute__((constructor)) -
gcc/config/mips/linux.h
# HG changeset patch # Parent 4618ad6f036f1e944a5262ae5875dcdf62c41f8b Support for mips-linux-musl. diff -r 4618ad6f036f gcc/config/mips/linux.h
a b 18 18 <http://www.gnu.org/licenses/>. */ 19 19 20 20 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" 21 22 #if TARGET_ENDIAN_DEFAULT == 0 /* LE */ 23 #define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" 24 #else 25 #define MUSL_DYNAMIC_LINKER_E "%{EL:el}" 26 #endif 27 #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1" -
gcc/config.gcc
# HG changeset patch # Parent 2ffe76b215fdb082cbbc262536077627757fa9bf Support for powerpc-linux-musl. diff -r 2ffe76b215fd gcc/config.gcc
a b 2112 2112 powerpc*-*-linux*paired*) 2113 2113 tm_file="${tm_file} rs6000/750cl.h" ;; 2114 2114 esac 2115 case ${target} in 2116 *-linux*-musl*) 2117 enable_secureplt=yes ;; 2118 esac 2115 2119 if test x${enable_secureplt} = xyes; then 2116 2120 tm_file="rs6000/secureplt.h ${tm_file}" 2117 2121 fi -
gcc/config/rs6000/linux64.h
diff -r 2ffe76b215fd gcc/config/rs6000/linux64.h
a b 364 364 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" 365 365 #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" 366 366 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" 367 #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" 368 #define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" 367 369 #if DEFAULT_LIBC == LIBC_UCLIBC 368 #define CHOOSE_DYNAMIC_LINKER(G, U ) "%{mglibc:" G ";:" U "}"370 #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" 369 371 #elif DEFAULT_LIBC == LIBC_GLIBC 370 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" 372 #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" 373 #elif DEFAULT_LIBC == LIBC_MUSL 374 #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" 371 375 #else 372 376 #error "Unsupported DEFAULT_LIBC" 373 377 #endif 374 378 #define GNU_USER_DYNAMIC_LINKER32 \ 375 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32 )379 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) 376 380 #define GNU_USER_DYNAMIC_LINKER64 \ 377 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64 )381 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) 378 382 379 383 380 384 #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ -
gcc/config/rs6000/secureplt.h
diff -r 2ffe76b215fd gcc/config/rs6000/secureplt.h
a b 18 18 <http://www.gnu.org/licenses/>. */ 19 19 20 20 #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" 21 #define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" -
gcc/config/rs6000/sysv4.h
diff -r 2ffe76b215fd gcc/config/rs6000/sysv4.h
a b 551 551 #ifndef CC1_SECURE_PLT_DEFAULT_SPEC 552 552 #define CC1_SECURE_PLT_DEFAULT_SPEC "" 553 553 #endif 554 #ifndef LINK_SECURE_PLT_DEFAULT_SPEC 555 #define LINK_SECURE_PLT_DEFAULT_SPEC "" 556 #endif 554 557 555 558 /* Pass -G xxx to the compiler and set correct endian mode. */ 556 559 #define CC1_SPEC "%{G*} %(cc1_cpu) \ … … 611 614 %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \ 612 615 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ 613 616 %{mcall-i960-old: --oformat elf32-powerpcle} \ 614 }}}}" 617 }}}} \ 618 %{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" 615 619 616 620 /* Any specific OS flags. */ 617 621 #define LINK_OS_SPEC "\ … … 789 793 790 794 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" 791 795 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" 796 #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" 792 797 #if DEFAULT_LIBC == LIBC_UCLIBC 793 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" 798 #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" 799 #elif DEFAULT_LIBC == LIBC_MUSL 800 #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" 794 801 #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC 795 #define CHOOSE_DYNAMIC_LINKER(G, U ) "%{muclibc:" U ";:" G "}"802 #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" 796 803 #else 797 804 #error "Unsupported DEFAULT_LIBC" 798 805 #endif 799 806 #define GNU_USER_DYNAMIC_LINKER \ 800 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER )807 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) 801 808 802 809 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ 803 810 %{rdynamic:-export-dynamic} \ … … 923 930 { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ 924 931 { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \ 925 932 { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ 933 { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ 926 934 { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ 927 935 { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ 928 936 { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
Note:
See TracBrowser
for help on using the repository browser.