Add (quilt) patches for qnap entware-ng gcc 8.4.0 limits.h issues
This commit is contained in:
parent
3424b26807
commit
8dac9d12e7
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,6 +13,9 @@
|
||||
*.log
|
||||
logs/
|
||||
|
||||
# ignore quilt patch status directory
|
||||
.pc/
|
||||
|
||||
# CLion ignores
|
||||
/.idea/
|
||||
/.clion.source.upload.marker
|
||||
|
||||
@ -0,0 +1,152 @@
|
||||
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 3, or (at your option) any later
|
||||
version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
Under Section 7 of GPL version 3, you are granted additional
|
||||
permissions described in the GCC Runtime Library Exception, version
|
||||
3.1, as published by the Free Software Foundation.
|
||||
|
||||
You should have received a copy of the GNU General Public License and
|
||||
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/>. */
|
||||
|
||||
#ifndef _LIMITS_H___
|
||||
#define _LIMITS_H___
|
||||
|
||||
/* Number of bits in a `char'. */
|
||||
#undef CHAR_BIT
|
||||
#define CHAR_BIT __CHAR_BIT__
|
||||
|
||||
/* Maximum length of a multibyte character. */
|
||||
#ifndef MB_LEN_MAX
|
||||
#define MB_LEN_MAX 1
|
||||
#endif
|
||||
|
||||
/* Minimum and maximum values a `signed char' can hold. */
|
||||
#undef SCHAR_MIN
|
||||
#define SCHAR_MIN (-SCHAR_MAX - 1)
|
||||
#undef SCHAR_MAX
|
||||
#define SCHAR_MAX __SCHAR_MAX__
|
||||
|
||||
/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
|
||||
#undef UCHAR_MAX
|
||||
#if __SCHAR_MAX__ == __INT_MAX__
|
||||
# define UCHAR_MAX (SCHAR_MAX * 2U + 1U)
|
||||
#else
|
||||
# define UCHAR_MAX (SCHAR_MAX * 2 + 1)
|
||||
#endif
|
||||
|
||||
/* Minimum and maximum values a `char' can hold. */
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
# undef CHAR_MIN
|
||||
# if __SCHAR_MAX__ == __INT_MAX__
|
||||
# define CHAR_MIN 0U
|
||||
# else
|
||||
# define CHAR_MIN 0
|
||||
# endif
|
||||
# undef CHAR_MAX
|
||||
# define CHAR_MAX UCHAR_MAX
|
||||
#else
|
||||
# undef CHAR_MIN
|
||||
# define CHAR_MIN SCHAR_MIN
|
||||
# undef CHAR_MAX
|
||||
# define CHAR_MAX SCHAR_MAX
|
||||
#endif
|
||||
|
||||
/* Minimum and maximum values a `signed short int' can hold. */
|
||||
#undef SHRT_MIN
|
||||
#define SHRT_MIN (-SHRT_MAX - 1)
|
||||
#undef SHRT_MAX
|
||||
#define SHRT_MAX __SHRT_MAX__
|
||||
|
||||
/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
|
||||
#undef USHRT_MAX
|
||||
#if __SHRT_MAX__ == __INT_MAX__
|
||||
# define USHRT_MAX (SHRT_MAX * 2U + 1U)
|
||||
#else
|
||||
# define USHRT_MAX (SHRT_MAX * 2 + 1)
|
||||
#endif
|
||||
|
||||
/* Minimum and maximum values a `signed int' can hold. */
|
||||
#undef INT_MIN
|
||||
#define INT_MIN (-INT_MAX - 1)
|
||||
#undef INT_MAX
|
||||
#define INT_MAX __INT_MAX__
|
||||
|
||||
/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
|
||||
#undef UINT_MAX
|
||||
#define UINT_MAX (INT_MAX * 2U + 1U)
|
||||
|
||||
/* Minimum and maximum values a `signed long int' can hold.
|
||||
(Same as `int'). */
|
||||
#undef LONG_MIN
|
||||
#define LONG_MIN (-LONG_MAX - 1L)
|
||||
#undef LONG_MAX
|
||||
#define LONG_MAX __LONG_MAX__
|
||||
|
||||
/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
|
||||
#undef ULONG_MAX
|
||||
#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* Minimum and maximum values a `signed long long int' can hold. */
|
||||
# undef LLONG_MIN
|
||||
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
||||
# undef LLONG_MAX
|
||||
# define LLONG_MAX __LONG_LONG_MAX__
|
||||
|
||||
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
|
||||
# undef ULLONG_MAX
|
||||
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
||||
#endif
|
||||
|
||||
#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
|
||||
/* Minimum and maximum values a `signed long long int' can hold. */
|
||||
# undef LONG_LONG_MIN
|
||||
# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
|
||||
# undef LONG_LONG_MAX
|
||||
# define LONG_LONG_MAX __LONG_LONG_MAX__
|
||||
|
||||
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
|
||||
# undef ULONG_LONG_MAX
|
||||
# define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
/* TS 18661-1 widths of integer types. */
|
||||
# undef CHAR_WIDTH
|
||||
# define CHAR_WIDTH __SCHAR_WIDTH__
|
||||
# undef SCHAR_WIDTH
|
||||
# define SCHAR_WIDTH __SCHAR_WIDTH__
|
||||
# undef UCHAR_WIDTH
|
||||
# define UCHAR_WIDTH __SCHAR_WIDTH__
|
||||
# undef SHRT_WIDTH
|
||||
# define SHRT_WIDTH __SHRT_WIDTH__
|
||||
# undef USHRT_WIDTH
|
||||
# define USHRT_WIDTH __SHRT_WIDTH__
|
||||
# undef INT_WIDTH
|
||||
# define INT_WIDTH __INT_WIDTH__
|
||||
# undef UINT_WIDTH
|
||||
# define UINT_WIDTH __INT_WIDTH__
|
||||
# undef LONG_WIDTH
|
||||
# define LONG_WIDTH __LONG_WIDTH__
|
||||
# undef ULONG_WIDTH
|
||||
# define ULONG_WIDTH __LONG_WIDTH__
|
||||
# undef LLONG_WIDTH
|
||||
# define LLONG_WIDTH __LONG_LONG_WIDTH__
|
||||
# undef ULLONG_WIDTH
|
||||
# define ULLONG_WIDTH __LONG_LONG_WIDTH__
|
||||
#endif
|
||||
|
||||
#endif /* _LIMITS_H___ */
|
||||
24
quilt/qnap/patches/qnap-entware-gcc-8.4.0-ssize_max.patch
Normal file
24
quilt/qnap/patches/qnap-entware-gcc-8.4.0-ssize_max.patch
Normal file
@ -0,0 +1,24 @@
|
||||
Entware GCC (8.4.0) installs a supposedly fixed ~limits.h~ (in
|
||||
~/opt/lib/gcc/x86_64-openwrt-linux-gnu/8.4.0/include-fixed/limits.h~, see
|
||||
https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html) which is the source of a
|
||||
number of issues due to missing macro definitions.
|
||||
|
||||
Observed issues:
|
||||
* cpython: missing definition of SSIZE_MAX
|
||||
* abseil-cpp: missing definition of SSIZE_MAX
|
||||
* llvm:
|
||||
|
||||
--- a/opt/lib/gcc/x86_64-openwrt-linux-gnu/8.4.0/include-fixed/limits.h
|
||||
+++ b/opt/lib/gcc/x86_64-openwrt-linux-gnu/8.4.0/include-fixed/limits.h
|
||||
@@ -149,4 +149,11 @@
|
||||
# define ULLONG_WIDTH __LONG_LONG_WIDTH__
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ KTKT: Include system/libc limits.h (define _GCC_LIMITS_H_ to avoid recursion
|
||||
+ in /opt/include/limits.h).
|
||||
+*/
|
||||
+#define _GCC_LIMITS_H_
|
||||
+#include_next <limits.h>
|
||||
+
|
||||
#endif /* _LIMITS_H___ */
|
||||
1
quilt/qnap/patches/series
Normal file
1
quilt/qnap/patches/series
Normal file
@ -0,0 +1 @@
|
||||
qnap-entware-gcc-8.4.0-ssize_max.patch
|
||||
Loading…
x
Reference in New Issue
Block a user