public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Alejandro Hernandez Samaniego <aehs29@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
Subject: [PATCH 1/3] libgloss: package riscv header files correctly
Date: Wed, 11 Mar 2026 08:12:23 -0600	[thread overview]
Message-ID: <20260311141223.306264-1-alhe@linux.microsoft.com> (raw)

Signed-off-by: Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
---
 meta/recipes-core/newlib/libgloss_git.bb | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/newlib/libgloss_git.bb b/meta/recipes-core/newlib/libgloss_git.bb
index 92bb81050b..0739651eed 100644
--- a/meta/recipes-core/newlib/libgloss_git.bb
+++ b/meta/recipes-core/newlib/libgloss_git.bb
@@ -23,9 +23,18 @@ do_install:append() {
 
         # Remove original directory
         rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/lib
-        # Remove empty include dir
-        rmdir ${D}/${prefix}/${TARGET_SYS}/include
-        rmdir ${D}/${prefix}/${TARGET_SYS}/
+
+        # RiscV machines install header files into ${D}/${prefix}/${TARGET_SYS}/include/machine
+        # move their contents into ${includedir}
+        if [ "$(ls -A ${D}/${prefix}/${TARGET_SYS}/include/machine 2>/dev/null)" ]; then
+              mkdir ${D}/${includedir}
+              mv ${D}/${prefix}/${TARGET_SYS}/include/machine/* ${D}/${includedir}
+              rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/include/machine
+        fi
+        if [ -d "${D}/${prefix}/${TARGET_SYS}/include" ]; then
+            rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/include
+        fi
+
 
 }
 
-- 
2.53.0



             reply	other threads:[~2026-03-11 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 14:12 Alejandro Hernandez Samaniego [this message]
2026-03-11 14:30 ` Patchtest results for [PATCH 1/3] libgloss: package riscv header files correctly patchtest

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260311141223.306264-1-alhe@linux.microsoft.com \
    --to=aehs29@gmail.com \
    --cc=alhe@linux.microsoft.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox