picolibc: Update to 1.8.6

Update to the latest version and bring in an upstream patch for
generating portable .specs files.

Fixes: #2171
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
Chris Packham 2024-08-30 10:18:01 +12:00
parent 8105791c34
commit 901722d34b
4 changed files with 64 additions and 4 deletions

View File

@ -1,4 +0,0 @@
md5 picolibc-1.8.3.tar.xz ea01ad58ed898560bc3576049a7b1ed6
sha1 picolibc-1.8.3.tar.xz 1c29c2963e9ebf0d6c98d22e65898057121a8b4f
sha256 picolibc-1.8.3.tar.xz dba349e1125395f566e0c0ddf621bda784687e269cf38f8ebc5527b964a7a16e
sha512 picolibc-1.8.3.tar.xz 21301b947cc2ec6fa5dd06646f3fdf899f070b5eb93a7fa9e81ff0de505536cb0d8f376b8f5335613f5a055be4db41f01ab752be66f857e786d268e64b9460d0

View File

@ -0,0 +1,60 @@
From cf914a3a79578bc97d80c3d3a0090b2fab0eb834 Mon Sep 17 00:00:00 2001
From: Alexey Lapshin <alexey.lapshin@espressif.com>
Date: Thu, 1 Aug 2024 17:00:55 +0700
Subject: [PATCH] fix specs_prefix_format to point to root toolchain's
directory
---
meson.build | 35 +++++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 8 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -500,20 +500,39 @@
endif
if sysroot_install
+ # Get 'sysroot' or 'GCC_EXEC_PREFIX' from GCC output
sysroot = run_command(cc.cmd_array() + ['-print-sysroot'], check : true).stdout().split('\n')[0]
if sysroot != ''
- specs_prefix_format = '%R/@0@'
+ specs_prefix_format_format = '%R/@0@'
+ specs_prefix_format_default = '%R/@0@'
else
- sysroot = cc_install_dir + '../../../..'
- specs_prefix_format = '%:getenv(GCC_EXEC_PREFIX ../../@0@)'
- endif
- if not get_option('sysroot-install-skip-checks')
- if sysroot == ''
+ if not get_option('sysroot-install-skip-checks')
error('sysroot install requested, but compiler has no sysroot')
endif
- if not fs.is_samepath(sysroot, prefix)
- error('sysroot install requires --prefix=' + sysroot)
+ sysroot = run_command(cc.cmd_array() + ['-print-search-dirs'], check : true).stdout().split('\n')[0].split(' ')[1]
+ specs_prefix_format_format = '%:getenv(GCC_EXEC_PREFIX @0@)'
+ specs_prefix_format_default = '%:getenv(GCC_EXEC_PREFIX ../../@0@)'
+ endif
+
+ # Try to calculate relative path from sysroot to prefix
+ specs_prefix_format = ''
+ if fs.exists(sysroot)
+ sysroot_to_prefix_correction = ''
+ foreach _ : sysroot.split('/')
+ if fs.is_samepath(sysroot + '/' + sysroot_to_prefix_correction, prefix)
+ specs_prefix_format = specs_prefix_format_format.format(sysroot_to_prefix_correction + '@0@')
+ break
+ endif
+ sysroot_to_prefix_correction += '../'
+ endforeach
+ endif
+
+ # Use default 'specs_prefix_format' if can not have relative sysroot path
+ if specs_prefix_format == ''
+ if not get_option('sysroot-install-skip-checks')
+ error('sysroot install requires sysroot(' + sysroot + ') to be a subdirectory of --prefix=<PATH>(' + prefix + ')')
endif
+ specs_prefix_format = specs_prefix_format_default
endif
else
specs_prefix_format = prefix + '/@0@'

4
packages/picolibc/1.8.6/chksum vendored Normal file
View File

@ -0,0 +1,4 @@
md5 picolibc-1.8.6.tar.xz c6972e4d6e6e7b1275ae8dc80eadb269
sha1 picolibc-1.8.6.tar.xz a8b1148c782dc931e8c2e41bfe8062192df3f5e9
sha256 picolibc-1.8.6.tar.xz 9549aac02bef6b2761af124392a7ffc6bbc8dfc8541b698ac032567b516c9b34
sha512 picolibc-1.8.6.tar.xz f7e03aed7f24fb7a52f1e44bc244abccb72159b01c591aa68c43499f320765a559e4cdfd996bec855447781d8db311bc34f111a4d233cfdaa783f8347bf03f09