Compare commits

...
Sign in to create a new pull request.

12 commits

Author SHA1 Message Date
Jan Staněk
b6723f836f
add rpmlint config to filter expected errors
[skip changelog]
2026-08-19 13:10:40 +02:00
Jan Staněk
bd5d0c0246
Update to version 33 (rhbz#2513553) 2026-08-19 12:26:42 +02:00
Fedora Release Engineering
6cd7f100ab Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:41:32 +00:00
Josh Stone
a5fed47713 Update to version 32 (rhbz#2439212) 2026-04-16 18:30:51 -07:00
Paul Murphy
0e92b6afd0 Update to version 29 (rhbz#2415063)
The makefile now aggressively tries to link compiler-rt libraries which
are neither built nor provided via fedora's llvm.

This seems to be a requirement for PIC variants which fedora does not
appear to provide. This probably indicates there are portions of the
library which are not usable due to the lack of compiler-rt. If there
are such users, they should (and likely should have) receive a linker
error.
2026-01-21 21:32:48 +00:00
Fedora Release Engineering
844381a0cf Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 20:07:20 +00:00
Jan Staněk
b43d471b62
Update to version 27 (rhbz#2383871) 2025-07-28 13:51:18 +02:00
Fedora Release Engineering
5dcb09ac12 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 20:17:36 +00:00
Jan Staněk
c2b2d65c5f
Fix build with LLVM/Clang 20
Closes: #7
2025-06-27 13:51:01 +02:00
Jan Staněk
155e969f52
gating: remove rpmdeplint case from branched Fedoras
According to matrix discussion in #fedora-ci:fedoraproject.org,
rpmdeplint is run only on rawhide builds.
2025-01-31 16:51:10 +01:00
Josh Stone
59a52ed391 Update to version 25 (rhbz#2331913) 2025-01-30 17:49:27 -08:00
Fedora Release Engineering
1a3b0cf8de Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 14:45:49 +00:00
6 changed files with 46 additions and 107 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/wasi-libc-wasi-sdk-*.tar.gz
/wasi-libc-*-build/

View file

@ -1,88 +0,0 @@
From bf718b4d75a3a22c9e0b9426c0502fe066bd56b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= <jstanek@redhat.com>
Date: Mon, 29 Aug 2022 15:07:34 +0200
Subject: [PATCH] make: don't rebuild files on `make install`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The original Makefile does not allow for clean separation of build and
install steps, and re-compiles the library on `make install`.
Using [empty target files][], the re-compilation is skipped on install.
Adapted from [Debian patch][].
[empty target files]: https://www.gnu.org/software/make/manual/make.html#Empty-Targets
[Debian patch]: https://salsa.debian.org/rust-team/wasi-libc/-/blob/master/debian/patches/dont-rebuild-install.patch
Signed-off-by: Jan Staněk <jstanek@redhat.com>
Signed-off-by: rpm-build <rpm-build>
---
Makefile | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 542b43e..7b70477 100644
--- a/Makefile
+++ b/Makefile
@@ -771,6 +771,9 @@ ifeq ($(WASI_SNAPSHOT), p2)
> "$(SYSROOT_INC)/__wasi_snapshot.h"
endif
+ # Mark this rule as done
+ touch $@
+
startup_files: include_dirs $(LIBC_BOTTOM_HALF_CRT_OBJS)
#
# Install the startup files (crt1.o etc).
@@ -778,6 +781,9 @@ startup_files: include_dirs $(LIBC_BOTTOM_HALF_CRT_OBJS)
mkdir -p "$(SYSROOT_LIB)" && \
cp $(LIBC_BOTTOM_HALF_CRT_OBJS) "$(SYSROOT_LIB)"
+ # Mark this rule finished
+ touch $@
+
# TODO: As of this writing, wasi_thread_start.s uses non-position-independent
# code, and I'm not sure how to make it position-independent. Once we've done
# that, we can enable libc.so for the wasi-threads build.
@@ -796,6 +802,7 @@ endif
endif
libc_so: include_dirs $(LIBC_SO)
+ touch $@
STATIC_LIBS = \
$(SYSROOT_LIB)/libc.a \
@@ -812,6 +819,7 @@ STATIC_LIBS += \
endif
libc: include_dirs $(STATIC_LIBS)
+ touch $@
dummy_libs:
#
@@ -821,11 +829,13 @@ dummy_libs:
for name in m rt pthread crypt util xnet resolv; do \
$(AR) crs "$(SYSROOT_LIB)/lib$${name}.a"; \
done
+ touch $@
finish: startup_files libc dummy_libs
#
# The build succeeded! The generated sysroot is in $(SYSROOT).
#
+ touch $@
ifeq ($(LTO),no)
# The check for defined and undefined symbols expects there to be a heap
@@ -1024,5 +1034,6 @@ clean:
$(RM) -r "$(BINDING_WORK_DIR)"
$(RM) -r "$(OBJDIR)"
$(RM) -r "$(SYSROOT)"
+ $(RM) include_dirs startup_files dummy_libs libc_so libc finish
-.PHONY: default startup_files libc libc_so dummy_libs finish install include_dirs clean check-symbols bindings
+.PHONY: default install clean check-symbols bindings
--
2.47.0

View file

@ -1,6 +1,6 @@
--- !Policy # testing repository
product_versions:
- fedora-*
- fedora-rawhide
decision_contexts: [bodhi_update_push_testing]
subject_type: koji_build
rules:
@ -10,7 +10,7 @@ rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
--- !Policy # stable repository
product_versions:
- fedora-*
- fedora-rawhide
decision_contexts: [bodhi_update_push_stable]
subject_type: koji_build
rules:
@ -19,3 +19,22 @@ rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
...
--- !Policy # testing repository
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_testing]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
--- !Policy # stable repository
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_stable]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
...

View file

@ -1 +1 @@
SHA512 (wasi-libc-wasi-sdk-24.tar.gz) = ab9322dbcd0bb151ba3f5a8b722e04d39ea5d7632d0322257c3b67e4193d0de1b0820dd4db84923e7967f24189d02dd242693ea95ad184a309eec4d27df8ba21
SHA512 (wasi-libc-wasi-sdk-33.tar.gz) = 7b07509db0ce6817a9616988b8b4ea9c7a87a2318e68ed350a2d0a8f7e839bb97e1cb766a568b008654149835b430a5a090f767ed9db0ca30503c4efe864a49c

4
wasi-libc.rpmlintrc Normal file
View file

@ -0,0 +1,4 @@
# cross-compilation files are expected
addFilter(r"\barch-independent-package-contains-binary-or-object /usr/wasm32-wasi/.*")
# some header files are empty, and that's expected
addFilter(r"\bzero-length /usr/wasm32-wasi/include/wasm32-wasi/bits/.*\.h")

View file

@ -1,6 +1,6 @@
Name: wasi-libc
Summary: C library implementation for WebAssembly System Interface
Version: 24
Version: 33
Release: %autorelease
License: Apache-2.0 WITH LLVM-exception AND Apache-2.0 AND MIT AND BSD-2-Clause
@ -8,11 +8,10 @@ URL: https://github.com/WebAssembly/wasi-libc/
Source: %{url}/archive/refs/tags/wasi-sdk-%{version}.tar.gz#/%{name}-wasi-sdk-%{version}.tar.gz
Source1: smoke-test.c
# Allow using artifacts from %%build in %%install instead of recompiling
Patch: 0001-make-don-t-rebuild-files-on-make-install.patch
# Compatibility patches from upstream main
# This contains parts of the musl C library; specify as bundled so we get notified about potential vulnerabilities
%global musl_version 1.2.3
%global musl_version 1.2.5
# Although these packages provide binary files, they are not targeted
# for the build platform, but for wasm32-wasi.
@ -22,9 +21,9 @@ Patch: 0001-make-don-t-rebuild-files-on-make-install.patch
BuildArch: noarch
BuildRequires: clang >= 10
BuildRequires: cmake >= 3.26
BuildRequires: git-core
BuildRequires: llvm >= 10
BuildRequires: make
%global toolchain clang
# Re-packaging the static library tends to overwrite files
@ -32,14 +31,17 @@ BuildRequires: make
# See rhbz#2228297 for details.
%global __brp_llvm_compile_lto_elf %{nil}
# brp-strip-static-archive breaks the archive index for wasm
%global __brp_strip_static_archive %{nil}
%global __brp_strip_lto %{nil}
# WASI is a specific architecture; host (build machine) arch flags should not apply by default
%global build_cflags --target=wasm32-wasi -fstack-protector
%global build_cflags -O2 --target=wasm32-wasi -fstack-protector
# Define cross-compiling prefix
%global wasi_prefix %{_prefix}/wasm32-wasi
%global wasi_datadir %{wasi_prefix}/share
%global wasi_includedir %{wasi_prefix}/include
%global wasi_libdir %{wasi_prefix}/lib
%global wasi_make_flags MALLOC_IMPL=emmalloc INSTALL_DIR='%{buildroot}%{wasi_prefix}' SYSROOT='%{_builddir}/sysroot'
%global _description %{expand:
WASI Libc is a libc for WebAssembly programs built on top of WASI system calls.
@ -69,17 +71,18 @@ Summary: C library for WASI - headers and development files
cp -p libc-bottom-half/cloudlibc/LICENSE LICENSE-cloudlibc
%build
%make_build %{wasi_make_flags}
make %{?_smp_mflags} %{wasi_make_flags} check-symbols
%cmake \
-DCMAKE_INSTALL_PREFIX='%{wasi_prefix}' \
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \
-DBUILD_SHARED=OFF \
-DCHECK_SYMBOLS=ON \
-DMALLOC=emmalloc \
-DTARGET_TRIPLE=wasm32-wasi
%cmake_build
%install
%make_install %{wasi_make_flags}
# brp-strip-static-archive breaks the archive index for wasm
%global __os_install_post %{expand:
%__os_install_post
find %{buildroot}%{wasi_libdir} -type f -regex '.*\\.\\(a\\|rlib\\)' -print -exec llvm-ranlib '{}' ';'
}
%cmake_install
cp -av -t '%{buildroot}%{wasi_prefix}' '%{__cmake_builddir}/sysroot/share'
%check
# Bundled version checks