summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2020-09-06 09:40:41 (GMT)
committerChris Packham <judge.packham@gmail.com>2020-09-06 09:40:41 (GMT)
commitfb08fb616ff3736fff3d6d3c30f58f9e671bd452 (patch)
tree0f74ec2fe2cd93d3a4d4190144033124aec7f5c2 /packages
parentaa07ac0e01d62d2018d33b7269dbce9dbc4400b8 (diff)
parentc15de32ec64e398a97430a244e7510ccf8600116 (diff)
Merge branch 'picolibc' of git://github.com/keith-packard/crosstool-ng into keith-packard-picolibc
Diffstat (limited to 'packages')
-rw-r--r--packages/picolibc/1.4.6/0000-libc-Create-a-macro-for-errno-so-that-GCC-tsystem.h-.patch33
-rw-r--r--packages/picolibc/1.4.6/chksum4
-rw-r--r--packages/picolibc/1.4.6/version.desc0
-rw-r--r--packages/picolibc/package.desc7
4 files changed, 44 insertions, 0 deletions
diff --git a/packages/picolibc/1.4.6/0000-libc-Create-a-macro-for-errno-so-that-GCC-tsystem.h-.patch b/packages/picolibc/1.4.6/0000-libc-Create-a-macro-for-errno-so-that-GCC-tsystem.h-.patch
new file mode 100644
index 0000000..da26864
--- /dev/null
+++ b/packages/picolibc/1.4.6/0000-libc-Create-a-macro-for-errno-so-that-GCC-tsystem.h-.patch
@@ -0,0 +1,33 @@
+From 1ce74e28ba8d6f91aca5830bfbc15897b68fcfac Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Sun, 16 Aug 2020 12:44:31 -0700
+Subject: [PATCH] libc: Create a macro for 'errno' so that GCC tsystem.h works
+
+GCC's tsystem.h adds a declaration for errno if it isn't a CPP symbol,
+which it isn't in picolibc as it's just a regular global (thread
+local) variable. Create a function macro with no arguments so that
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+---
+ newlib/libc/include/sys/errno.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/newlib/libc/include/sys/errno.h b/newlib/libc/include/sys/errno.h
+index 0da73f44e..64f179bc0 100644
+--- a/newlib/libc/include/sys/errno.h
++++ b/newlib/libc/include/sys/errno.h
+@@ -59,6 +59,11 @@ extern NEWLIB_THREAD_LOCAL_ERRNO int errno;
+
+ #define __errno_r(ptr) (errno)
+ #define __errno() (&errno)
++/*
++ * This lets applications check for #ifdef errno without requiring
++ * that errno be a parameter-less macro
++ */
++#define errno() (errno)
+
+ #define EPERM 1 /* Not owner */
+ #define ENOENT 2 /* No such file or directory */
+--
+2.28.0
+
diff --git a/packages/picolibc/1.4.6/chksum b/packages/picolibc/1.4.6/chksum
new file mode 100644
index 0000000..6b673b7
--- /dev/null
+++ b/packages/picolibc/1.4.6/chksum
@@ -0,0 +1,4 @@
+md5 1.4.6.tar.gz 9f5cff6d36b278d02e05f4c717855f8c
+sha1 1.4.6.tar.gz de2579dab6cf488b476195edcaaa2b3829d3183f
+sha256 1.4.6.tar.gz 00764d0c0a2e8685fd9c91685ee8c404ef935975eaa07a55b15243558d390a00
+sha512 1.4.6.tar.gz 9a46f63f74292affcce5548968528c98b1614a49fd801a8192c4a276b727ca4355d3d3643daeb1c82a15c8eef703e2983110d95f49111e9f108d1f1760647172
diff --git a/packages/picolibc/1.4.6/version.desc b/packages/picolibc/1.4.6/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/picolibc/1.4.6/version.desc
diff --git a/packages/picolibc/package.desc b/packages/picolibc/package.desc
new file mode 100644
index 0000000..0415e75
--- /dev/null
+++ b/packages/picolibc/package.desc
@@ -0,0 +1,7 @@
+origin='keithp.com'
+repository='git https://github.com/keith-packard/picolibc.git'
+milestones='1.4.6'
+archive_filename='@{version}'
+relevantpattern='*.*|.*. *.*|.'
+archive_formats='.tar.gz'
+mirrors='https://github.com/keith-packard/picolibc/archive'