Description: Use wasm32-wasip1 as the compiler target triple
 Clang >= 19 deprecates the old wasm32-wasi target spelling and turns the
 deprecation warning into an error when -Werror is enabled, which breaks the
 build with clang 22 (FTBFS). Use the canonical wasip1 spelling for the
 compiler --target while keeping TARGET_TRIPLE (wasm32-wasi) for all output
 paths and installed file names, so the installed sysroot layout is unchanged.
Author: openKylin Developers <packaging@lists.openkylin.top>
Forwarded: not-needed
Last-Update: 2026-09-14

---
--- wasix-libc-2025.12.24.1+ds.orig/Makefile
+++ wasix-libc-2025.12.24.1+ds/Makefile
@@ -44,6 +44,11 @@ BULK_MEMORY_THRESHOLD ?= 32
 #TARGET_ARCH = wasm32
 TARGET_TRIPLE = $(TARGET_ARCH)-wasi
 MULTIARCH_TRIPLE = $(TARGET_ARCH)-wasi
+# Clang >= 19 deprecates the old wasm32-wasi target spelling and turns the
+# deprecation warning into an error when -Werror is enabled (FTBFS with
+# clang 22). Use the canonical wasip1 spelling for the compiler target while
+# keeping TARGET_TRIPLE (wasm32-wasi) for all paths and installed file names.
+TARGET_CC_TRIPLE = $(TARGET_ARCH)-wasip1
 
 # These variables describe the locations of various files and directories in
 # the source tree.
@@ -376,8 +381,8 @@ LIBC_TOP_HALF_ALL_SOURCES = \
 # Add any extra flags
 CFLAGS = $(EXTRA_CFLAGS)
 # Set the target.
-CFLAGS += --target=$(TARGET_TRIPLE)
-ASMFLAGS += --target=$(TARGET_TRIPLE)
+CFLAGS += --target=$(TARGET_CC_TRIPLE)
+ASMFLAGS += --target=$(TARGET_CC_TRIPLE)
 # WebAssembly floating-point match doesn't trap.
 # TODO: Add -fno-signaling-nans when the compiler supports it.
 CFLAGS += -fno-trapping-math
