Compare commits

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

10 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
6 changed files with 42 additions and 84 deletions

1
.gitignore vendored
View file

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

View file

@ -1,71 +0,0 @@
From 74a068d26a61e744f607fbf6d8355f2b69e82e4e 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 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 00dd30812884..c340da4e0153 100644
--- a/Makefile
+++ b/Makefile
@@ -768,6 +768,7 @@ endif
endif
libc_so: $(INCLUDE_DIRS) $(LIBC_SO)
+ touch $@
STATIC_LIBS = \
$(SYSROOT_LIB)/libc.a \
@@ -788,6 +789,7 @@ STATIC_LIBS += \
endif
libc: $(INCLUDE_DIRS) $(STATIC_LIBS)
+ touch $@
DUMMY := m rt pthread crypt util xnet resolv
DUMMY_LIBS := $(patsubst %,$(SYSROOT_LIB)/lib%.a,$(DUMMY))
@@ -804,6 +806,7 @@ 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
@@ -946,6 +949,8 @@ check-symbols: $(STARTUP_FILES) libc
# This ignores whitespace because on Windows the output has CRLF line endings.
diff -wur "$(EXPECTED_TARGET_DIR)" "$(SYSROOT_SHARE)"
+ touch $@
+
##### BINDINGS #################################################################
# The `bindings` target retrieves the necessary WIT files for the wasi-cli world
@@ -1021,5 +1026,6 @@ clean:
$(RM) -r "$(BINDING_WORK_DIR)"
$(RM) -r "$(OBJDIR)"
$(RM) -r "$(SYSROOT)"
+ $(RM) check-symbols libc_so libc finish
-.PHONY: default libc libc_so finish install clean check-symbols bindings
+.PHONY: default install clean bindings
--
2.48.1

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-25.tar.gz) = 580716fbc152be19e2e9724f3483a0a580a168be0cd6d105d37b0ebd0d11bd36d7d9db63984eb2cc7b3aaff2fc9446d9558d1469b538a79b7de465a1113560ea
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: 25
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
@ -37,13 +36,12 @@ BuildRequires: make
%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.
@ -73,11 +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}
%cmake_install
cp -av -t '%{buildroot}%{wasi_prefix}' '%{__cmake_builddir}/sysroot/share'
%check
# Bundled version checks