diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2015-05-08 08:30:40 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-05-08 08:30:40 +0000 |
commit | 07ad804bfdbe0fa3406c5f2ff51d7c4c29a783c8 (patch) | |
tree | 73c9528e184baf4728ee97183e4d15220368f796 /gcc/config/glibc-stdint.h | |
parent | 755658a56b57beca14b5fb70afdf1e588a058f7f (diff) | |
download | gcc-07ad804bfdbe0fa3406c5f2ff51d7c4c29a783c8.zip gcc-07ad804bfdbe0fa3406c5f2ff51d7c4c29a783c8.tar.gz gcc-07ad804bfdbe0fa3406c5f2ff51d7c4c29a783c8.tar.bz2 |
[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
Diffstat (limited to 'gcc/config/glibc-stdint.h')
-rw-r--r-- | gcc/config/glibc-stdint.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/config/glibc-stdint.h b/gcc/config/glibc-stdint.h index 3fc67dc..98f4f04 100644 --- a/gcc/config/glibc-stdint.h +++ b/gcc/config/glibc-stdint.h @@ -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") |