diff options
author | Keith Packard <keithp@keithp.com> | 2020-08-16 12:37:45 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2020-09-01 09:42:53 -0700 |
commit | c15de32ec64e398a97430a244e7510ccf8600116 (patch) | |
tree | 97cc9dcc8c49cd896244604e03b5614831fc0351 /packages/picolibc | |
parent | 4e5bc43627582b11f11ebc1cedcfd1016f39c60e (diff) | |
download | crosstool-ng-c15de32ec64e398a97430a244e7510ccf8600116.tar.gz crosstool-ng-c15de32ec64e398a97430a244e7510ccf8600116.tar.bz2 crosstool-ng-c15de32ec64e398a97430a244e7510ccf8600116.zip |
Add picolibc support [v2]
This adds support for using picolibc instead of newlib on embedded
systems.
Signed-off-by: Keith Packard <keithp@keithp.com>
v2:
Add check for meson and ninja
Sync option default values with current picolibc defaults
Remove xtensa sys header file install as those aren't in picolibc
Diffstat (limited to 'packages/picolibc')
-rw-r--r-- | packages/picolibc/1.4.6/0000-libc-Create-a-macro-for-errno-so-that-GCC-tsystem.h-.patch | 33 | ||||
-rw-r--r-- | packages/picolibc/1.4.6/chksum | 4 | ||||
-rw-r--r-- | packages/picolibc/1.4.6/version.desc | 0 | ||||
-rw-r--r-- | packages/picolibc/package.desc | 7 |
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 00000000..da268640 --- /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 00000000..6b673b74 --- /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 00000000..e69de29b --- /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 00000000..0415e75b --- /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' |