From 901722d34b4eff6867a0c82ff375d7a27dce6a2b Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Fri, 30 Aug 2024 10:18:01 +1200 Subject: 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 --- ...refix_format-to-point-to-root-toolchain-s.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 packages/picolibc/1.8.6/0000-fix-specs_prefix_format-to-point-to-root-toolchain-s.patch (limited to 'packages/picolibc/1.8.6/0000-fix-specs_prefix_format-to-point-to-root-toolchain-s.patch') diff --git a/packages/picolibc/1.8.6/0000-fix-specs_prefix_format-to-point-to-root-toolchain-s.patch b/packages/picolibc/1.8.6/0000-fix-specs_prefix_format-to-point-to-root-toolchain-s.patch new file mode 100644 index 00000000..8a408e1b --- /dev/null +++ b/packages/picolibc/1.8.6/0000-fix-specs_prefix_format-to-point-to-root-toolchain-s.patch @@ -0,0 +1,60 @@ +From cf914a3a79578bc97d80c3d3a0090b2fab0eb834 Mon Sep 17 00:00:00 2001 +From: Alexey Lapshin +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=(' + prefix + ')') + endif ++ specs_prefix_format = specs_prefix_format_default + endif + else + specs_prefix_format = prefix + '/@0@' -- cgit v1.2.3