[openwrt/openwrt] libunwind: fix complie for PPC32

LEDE Commits lede-commits at lists.infradead.org
Fri Dec 5 16:49:23 PST 2025


blocktrron pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00c8b5c612d07e36ede1e9ebe2b44ba88fa90000

commit 00c8b5c612d07e36ede1e9ebe2b44ba88fa90000
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Fri Dec 5 19:50:22 2025 +0100

    libunwind: fix complie for PPC32
    
    libunwind fails to compile because the include for the WORDSIZE
    definition was missing when compiling with musl libc.
    
    This lead to unw_word_t being defined as 64 bit long instead
    of the correct 32 bit.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 package/libs/libunwind/Makefile                   |  2 +-
 package/libs/libunwind/patches/004-ppc-musl.patch | 26 +++++++++++++++++++++--
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile
index f2363116fc..2ed8988acd 100644
--- a/package/libs/libunwind/Makefile
+++ b/package/libs/libunwind/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libunwind
 PKG_VERSION:=1.8.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/libunwind/libunwind/releases/download/v$(PKG_VERSION)/
diff --git a/package/libs/libunwind/patches/004-ppc-musl.patch b/package/libs/libunwind/patches/004-ppc-musl.patch
index 5ea79e1462..22b803b785 100644
--- a/package/libs/libunwind/patches/004-ppc-musl.patch
+++ b/package/libs/libunwind/patches/004-ppc-musl.patch
@@ -1,6 +1,17 @@
 --- a/include/libunwind-ppc32.h
 +++ b/include/libunwind-ppc32.h
-@@ -81,6 +81,88 @@ typedef int64_t unw_sword_t;
+@@ -40,6 +40,10 @@ extern "C" {
+ #include <stdint.h>
+ #include <ucontext.h>
+ 
++#ifndef __GLIBC__
++#include <bits/reg.h>
++#endif
++
+ #ifndef UNW_EMPTY_STRUCT
+ #  define UNW_EMPTY_STRUCT uint8_t unused;
+ #endif
+@@ -81,6 +85,88 @@ typedef int64_t unw_sword_t;
  
  typedef long double unw_tdep_fpreg_t;
  
@@ -91,7 +102,18 @@
      UNW_PPC32_R0,
 --- a/include/libunwind-ppc64.h
 +++ b/include/libunwind-ppc64.h
-@@ -88,6 +88,88 @@ typedef struct {
+@@ -40,6 +40,10 @@ extern "C" {
+ #include <stdint.h>
+ #include <ucontext.h>
+ 
++#ifndef __GLIBC__
++#include <bits/reg.h>
++#endif
++
+ #ifndef UNW_EMPTY_STRUCT
+ #  define UNW_EMPTY_STRUCT uint8_t unused;
+ #endif
+@@ -88,6 +92,88 @@ typedef struct {
      uint64_t halves[2];
  } unw_tdep_vreg_t;
  




More information about the lede-commits mailing list