diff mbox series

[3/3] picolibc: Update 1.8.6 -> 1.8.11

Message ID 20260311141329.306642-1-alhe@linux.microsoft.com
State Under Review
Headers show
Series [1/3] libgloss: package riscv header files correctly | expand

Commit Message

Alejandro Hernandez Samaniego March 11, 2026, 2:13 p.m. UTC
Rebased:
- avoid_polluting_cross_directories.patch

Licensing files COPYING.NEWLIB and COPYING.GPL2 were removed upstream,
checksum for COPYING needs update since files included may change with
every release.

Tested to work on qemuarm,aarch64,riscv32 and riscv64 variants
https://dev.azure.com/ahcbb6/baremetal-qemu/_build/results?buildId=21709&view=results

Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
---
 meta/recipes-core/picolibc/picolibc.inc       |  8 ++--
 .../avoid_polluting_cross_directories.patch   | 43 +++++++++++++------
 2 files changed, 34 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/picolibc/picolibc.inc b/meta/recipes-core/picolibc/picolibc.inc
index 68c32894a7..ffbc90b660 100644
--- a/meta/recipes-core/picolibc/picolibc.inc
+++ b/meta/recipes-core/picolibc/picolibc.inc
@@ -7,14 +7,12 @@  SECTION = "libs"
 # are GPLv2 and GeneratePicolibcCrossFile.sh is AGPL3 but not part of the artifacts.
 LICENSE = "BSD-2-Clause & BSD-3-Clause"
 LIC_FILES_CHKSUM = " \
-		file://COPYING.GPL2;md5=59530bdf33659b29e73d4adb9f9f6552 \
-		file://COPYING.NEWLIB;md5=08ae03456feb75b81cfdb359e0f1ef85 \
-		file://COPYING.picolibc;md5=e50fa9458a40929689861ed472d46bc7 \
+		file://COPYING.picolibc;md5=e44132dded508048efb22b15ccd40d7d \
 		"
 
-BASEVER = "1.8.6"
+BASEVER = "1.8.11"
 PV = "${BASEVER}+git"
 SRC_URI = "git://github.com/picolibc/picolibc.git;protocol=https;branch=main"
-SRCREV = "764ef4e401a8f4c6a86ab723533841f072885a5b"
+SRCREV = "f7edb0869e64b9d687f46961adeef7154921fe92"
 
 B = "${WORKDIR}/build"
diff --git a/meta/recipes-core/picolibc/picolibc/avoid_polluting_cross_directories.patch b/meta/recipes-core/picolibc/picolibc/avoid_polluting_cross_directories.patch
index da6460c95c..54f17a1b62 100644
--- a/meta/recipes-core/picolibc/picolibc/avoid_polluting_cross_directories.patch
+++ b/meta/recipes-core/picolibc/picolibc/avoid_polluting_cross_directories.patch
@@ -1,3 +1,8 @@ 
+From dda13d0d8d2de700e29582120f8202920c5cf35e Mon Sep 17 00:00:00 2001
+From: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
+Date: Tue, 18 Jun 2024 12:12:26 -0600
+Subject: [PATCH] tclibc-picolibc: Adds a new TCLIBC variant to build with
+
 Upstream-Status: Pending
 
 Picolibc uses its own specs file: picolibc.specs to facilitate compilation, this
@@ -21,14 +26,16 @@  then the paths used by the compiler will be relative to the path passed by the
 --sysroot= cmdline argument, setting back the behavior that we intended in the
 first place.
 
-
 Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
+---
+ meson.build | 31 +++++++++++++++++++++++++------
+ 1 file changed, 25 insertions(+), 6 deletions(-)
 
-Index: git/meson.build
-===================================================================
---- git.orig/meson.build
-+++ git/meson.build
-@@ -622,12 +622,13 @@ else
+diff --git a/meson.build b/meson.build
+index 3323741c2..0df0768df 100644
+--- a/meson.build
++++ b/meson.build
+@@ -622,12 +622,13 @@ crt0_expr = '%{-crt0=*:crt0-%*%O; :crt0%O}'
  #
  picolibc_prefix_format = '-picolibc-prefix=*:@0@'
  picolibc_buildtype_format = '-picolibc-buildtype=*:@0@'
@@ -43,7 +50,7 @@  Index: git/meson.build
  
  #
  # Build the -isystem value
-@@ -639,10 +640,13 @@ isystem_prefix = picolibc_prefix_format.
+@@ -639,10 +640,13 @@ isystem_prefix = picolibc_prefix_format.format(prefix_include_dir)
  buildtype_include_dir = specs_prefix_format.format(get_option('includedir') / '%*')
  isystem_buildtype = picolibc_buildtype_format.format(buildtype_include_dir)
  
@@ -56,9 +63,21 @@  Index: git/meson.build
 -specs_isystem = '-isystem ' + specs_option_format.format(isystem_prefix, isystem_buildtype, isystem_gen)
 +specs_isystem = '-isystem ' + specs_option_format.format(isystem_prefix, isystem_buildtype, isystem_sysroot, isystem_gen)
  
+ gcc_dumpmachine = run_command(cc.cmd_array() + ['-dumpmachine'], check : true).stdout().split('\n')[0]
+ 
+@@ -651,7 +655,10 @@ cxxconfig_isystem_prefix = isystem_prefix / cxxconfig_path_postfix
+ cxxconfig_isystem_buildtype = isystem_buildtype / cxxconfig_path_postfix
+ cxxconfig_isystem_gen = isystem_gen / cxxconfig_path_postfix
+ 
+-specs_isystem = specs_isystem + ' -isystem ' + specs_option_format.format(cxxconfig_isystem_prefix, cxxconfig_isystem_buildtype, cxxconfig_isystem_gen)
++sysroot_cxx_dir = '%*'
++cxx_sysroot = sysroot_format.format(sysroot_cxx_dir)
++
++specs_isystem = specs_isystem + ' -isystem ' + specs_option_format.format(cxxconfig_isystem_prefix, cxxconfig_isystem_buildtype, cxx_sysroot, cxxconfig_isystem_gen)
+ 
  #
  # Build the non-multilib -L value
-@@ -654,10 +658,13 @@ lib_prefix = picolibc_prefix_format.form
+@@ -663,10 +670,13 @@ lib_prefix = picolibc_prefix_format.format(prefix_lib_dir)
  buildtype_lib_dir = specs_prefix_format.format(get_option('libdir') / '%*')
  lib_buildtype = picolibc_buildtype_format.format(buildtype_lib_dir)
  
@@ -73,7 +92,7 @@  Index: git/meson.build
  
  #
  # Build the non-multilib *startfile options
-@@ -669,6 +676,9 @@ crt0_prefix = picolibc_prefix_format.for
+@@ -678,6 +688,9 @@ crt0_prefix = picolibc_prefix_format.format(prefix_crt0_path)
  buildtype_crt0_path = specs_prefix_format.format(get_option('libdir') / '%*' / crt0_expr)
  crt0_buildtype = picolibc_buildtype_format.format(buildtype_crt0_path)
  
@@ -83,7 +102,7 @@  Index: git/meson.build
  gen_crt0_path = specs_prefix_format.format(get_option('libdir') / crt0_expr)
  crt0_gen = gen_format.format(gen_crt0_path)
  
-@@ -686,10 +696,13 @@ if enable_multilib
+@@ -695,10 +708,13 @@ if enable_multilib
    buildtype_multilib_dir = specs_prefix_format.format(get_option('libdir') / '%*/%M')
    multilib_buildtype = picolibc_buildtype_format.format(buildtype_multilib_dir)
  
@@ -98,7 +117,7 @@  Index: git/meson.build
  
    #
    # Prepend the multilib -L option to the non-multilib option
-@@ -705,6 +718,9 @@ if enable_multilib
+@@ -714,6 +730,9 @@ if enable_multilib
    buildtype_multilib_crt0_path = specs_prefix_format.format(get_option('libdir') / '%*/%M' / crt0_expr)
    crt0_buildtype = picolibc_buildtype_format.format(buildtype_multilib_crt0_path)
  
@@ -108,7 +127,7 @@  Index: git/meson.build
    gen_multilib_crt0_path = specs_prefix_format.format(get_option('libdir') / '%M' / crt0_expr)
    crt0_gen = gen_format.format(gen_multilib_crt0_path)
  endif
-@@ -714,7 +730,7 @@ endif
+@@ -723,7 +742,7 @@ endif
  # above. As there's only one value, it's either the
  # multilib path or the non-multilib path
  #