aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-10-04 20:50:19 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-10-04 20:50:19 +0000
commiteaeea2a90d6585a02f2b45f9c1c073203db14f33 (patch)
tree59879c4acba395eb40781f9ffcd307b1fd655e3e
parent68f834a8b29212d2302b5274162abec6893559fc (diff)
downloadports-eaeea2a90d6585a02f2b45f9c1c073203db14f33.tar.gz
ports-eaeea2a90d6585a02f2b45f9c1c073203db14f33.zip
MFH: r551458
devel/arm-none-eabi-newlib: unbreak after include-fixed removal We're now operating on more standards-compliant headers. Defining __LONG_LONG_SUPPORTED is a little hacky, but some backflips are needed to assume a C99 build. For now, just make it work so that we can get the definition from sys/limits.h as needed. Approved by: ports-secteam (implicit, build fix)
Notes
Notes: svn path=/branches/2020Q4/; revision=551459
-rw-r--r--devel/arm-none-eabi-newlib/Makefile2
-rw-r--r--devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoll__r.c28
-rw-r--r--devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoull__r.c30
-rw-r--r--devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoll__r.c28
-rw-r--r--devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoull__r.c10
5 files changed, 96 insertions, 2 deletions
diff --git a/devel/arm-none-eabi-newlib/Makefile b/devel/arm-none-eabi-newlib/Makefile
index e0583f7f70a4..96507f4e7d7b 100644
--- a/devel/arm-none-eabi-newlib/Makefile
+++ b/devel/arm-none-eabi-newlib/Makefile
@@ -11,8 +11,6 @@ PKGNAMEPREFIX= ${NEWLIB_TARGET}-
MAINTAINER= kevans@FreeBSD.org
COMMENT= Newlib distribution for ${NEWLIB_TARGET} targets
-BROKEN= arm-none-eabi-ar: ../stdlib/lib.a: No such file or directory
-
BUILD_DEPENDS+= ${NEWLIB_TARGET}-ar:devel/binutils@${NEWLIB_TARGET:C/-/_/g} \
${NEWLIB_TARGET}-as:devel/binutils@${NEWLIB_TARGET:C/-/_/g} \
${NEWLIB_TARGET}-ld:devel/binutils@${NEWLIB_TARGET:C/-/_/g} \
diff --git a/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoll__r.c b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoll__r.c
new file mode 100644
index 000000000000..780c834401dc
--- /dev/null
+++ b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoll__r.c
@@ -0,0 +1,28 @@
+--- newlib/libc/stdlib/strtoll_r.c.orig 2020-10-04 20:42:31 UTC
++++ newlib/libc/stdlib/strtoll_r.c
+@@ -42,6 +42,7 @@
+ #ifdef __GNUC__
+
+ #define _GNU_SOURCE
++#define __LONG_LONG_SUPPORTED
+ #include <_ansi.h>
+ #include <limits.h>
+ #include <ctype.h>
+@@ -107,7 +108,7 @@ _DEFUN (_strtoll_r, (rptr, nptr, endptr, base),
+ * Set any if any `digits' consumed; make it negative to indicate
+ * overflow.
+ */
+- cutoff = neg ? -(unsigned long long)LONG_LONG_MIN : LONG_LONG_MAX;
++ cutoff = neg ? -(unsigned long long)LLONG_MIN : LLONG_MAX;
+ cutlim = cutoff % (unsigned long long)base;
+ cutoff /= (unsigned long long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+@@ -128,7 +129,7 @@ _DEFUN (_strtoll_r, (rptr, nptr, endptr, base),
+ }
+ }
+ if (any < 0) {
+- acc = neg ? LONG_LONG_MIN : LONG_LONG_MAX;
++ acc = neg ? LLONG_MIN : LLONG_MAX;
+ rptr->_errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
diff --git a/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoull__r.c b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoull__r.c
new file mode 100644
index 000000000000..45aa1804056a
--- /dev/null
+++ b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_strtoull__r.c
@@ -0,0 +1,30 @@
+--- newlib/libc/stdlib/strtoull_r.c.orig 2020-10-04 20:42:46 UTC
++++ newlib/libc/stdlib/strtoull_r.c
+@@ -43,6 +43,7 @@
+ #ifdef __GNUC__
+
+ #define _GNU_SOURCE
++#define __LONG_LONG_SUPPORTED
+ #include <_ansi.h>
+ #include <limits.h>
+ #include <ctype.h>
+@@ -88,8 +89,8 @@ _DEFUN (_strtoull_r, (rptr, nptr, endptr, base),
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+- cutoff = (unsigned long long)ULONG_LONG_MAX / (unsigned long long)base;
+- cutlim = (unsigned long long)ULONG_LONG_MAX % (unsigned long long)base;
++ cutoff = (unsigned long long)ULLONG_MAX / (unsigned long long)base;
++ cutlim = (unsigned long long)ULLONG_MAX % (unsigned long long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+ if (isdigit(c))
+ c -= '0';
+@@ -108,7 +109,7 @@ _DEFUN (_strtoull_r, (rptr, nptr, endptr, base),
+ }
+ }
+ if (any < 0) {
+- acc = ULONG_LONG_MAX;
++ acc = ULLONG_MAX;
+ rptr->_errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
diff --git a/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoll__r.c b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoll__r.c
new file mode 100644
index 000000000000..b8ea6d0b5d7e
--- /dev/null
+++ b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoll__r.c
@@ -0,0 +1,28 @@
+--- newlib/libc/stdlib/wcstoll_r.c.orig 2020-10-04 20:42:35 UTC
++++ newlib/libc/stdlib/wcstoll_r.c
+@@ -42,6 +42,7 @@
+ #ifdef __GNUC__
+
+ #define _GNU_SOURCE
++#define __LONG_LONG_SUPPORTED
+ #include <_ansi.h>
+ #include <limits.h>
+ #include <wctype.h>
+@@ -107,7 +108,7 @@ _DEFUN (_wcstoll_r, (rptr, nptr, endptr, base),
+ * Set any if any `digits' consumed; make it negative to indicate
+ * overflow.
+ */
+- cutoff = neg ? -(unsigned long long)LONG_LONG_MIN : LONG_LONG_MAX;
++ cutoff = neg ? -(unsigned long long)LLONG_MIN : LLONG_MAX;
+ cutlim = cutoff % (unsigned long long)base;
+ cutoff /= (unsigned long long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+@@ -128,7 +129,7 @@ _DEFUN (_wcstoll_r, (rptr, nptr, endptr, base),
+ }
+ }
+ if (any < 0) {
+- acc = neg ? LONG_LONG_MIN : LONG_LONG_MAX;
++ acc = neg ? LLONG_MIN : LLONG_MAX;
+ rptr->_errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
diff --git a/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoull__r.c b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoull__r.c
new file mode 100644
index 000000000000..37ebe2d93a2b
--- /dev/null
+++ b/devel/arm-none-eabi-newlib/files/patch-newlib_libc_stdlib_wcstoull__r.c
@@ -0,0 +1,10 @@
+--- newlib/libc/stdlib/wcstoull_r.c.orig 2020-10-04 20:42:50 UTC
++++ newlib/libc/stdlib/wcstoull_r.c
+@@ -43,6 +43,7 @@
+ #ifdef __GNUC__
+
+ #define _GNU_SOURCE
++#define __LONG_LONG_SUPPORTED
+ #include <_ansi.h>
+ #include <limits.h>
+ #include <wchar.h>