[PATCH 0/13] Add musl support to GCC
2015-05-08 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/glibc-stdint.h (OPTION_MUSL): Define. (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): Change the definition based on OPTION_MUSL for 64 bit targets. * config/linux.h (OPTION_MUSL): Redefine. * config/alpha/linux.h (OPTION_MUSL): Redefine. * config/rs6000/linux.h (OPTION_MUSL): Redefine. * config/rs6000/linux64.h (OPTION_MUSL): Redefine. From-SVN: r222905
This commit is contained in:
parent
755658a56b
commit
07ad804bfd
|
@ -1,3 +1,13 @@
|
|||
2015-05-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* config/glibc-stdint.h (OPTION_MUSL): Define.
|
||||
(INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE):
|
||||
Change the definition based on OPTION_MUSL for 64 bit targets.
|
||||
* config/linux.h (OPTION_MUSL): Redefine.
|
||||
* config/alpha/linux.h (OPTION_MUSL): Redefine.
|
||||
* config/rs6000/linux.h (OPTION_MUSL): Redefine.
|
||||
* config/rs6000/linux64.h (OPTION_MUSL): Redefine.
|
||||
|
||||
2015-05-08 Gregor Richards <gregor.richards@uwaterloo.ca>
|
||||
Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
|
|
|
@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. If not see
|
|||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
|
|
|
@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Exception along with this program;
|
|||
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Systems using musl libc should use this header and make sure
|
||||
OPTION_MUSL is defined correctly before using the TYPE macros. */
|
||||
#ifndef OPTION_MUSL
|
||||
#define OPTION_MUSL 0
|
||||
#endif
|
||||
|
||||
#define SIG_ATOMIC_TYPE "int"
|
||||
|
||||
#define INT8_TYPE "signed char"
|
||||
|
@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||
#define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
|
||||
|
||||
#define INT_FAST8_TYPE "signed char"
|
||||
#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
|
||||
#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
|
||||
#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
|
||||
#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
|
||||
#define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
|
||||
#define UINT_FAST8_TYPE "unsigned char"
|
||||
#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
|
||||
#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
|
||||
#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
|
||||
#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
|
||||
#define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
|
||||
|
||||
#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
|
||||
|
|
|
@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -30,10 +30,14 @@
|
|||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
|
|
|
@ -299,10 +299,14 @@ extern int dot_symbols;
|
|||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
|
|
Loading…
Reference in New Issue