Sync from SUSE:SLFO:Main wasi-libc revision 492158a2396743e21abb269a1423da64
This commit is contained in:
parent
75d4575ffb
commit
378bc4b366
@ -1,13 +0,0 @@
|
|||||||
Ignore __FPCLASS_* macros that are new with Clang 17.
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index f350ecb..981da98 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -702,6 +702,7 @@ check-symbols: startup_files libc
|
|
||||||
| sed -e 's/__GNUC_VA_LIST $$/__GNUC_VA_LIST 1/' \
|
|
||||||
| grep -v '^#define __\(BOOL\|INT_\(LEAST\|FAST\)\(8\|16\|32\|64\)\|INT\|LONG\|LLONG\|SHRT\)_WIDTH__' \
|
|
||||||
| grep -v '^#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_\(1\|2\|4\|8\)' \
|
|
||||||
+ | grep -v '^#define __FPCLASS_\(\(NEG\|POS\)\(INF\|NORMAL\|SUBNORMAL\|ZERO\)\|[QS]NAN\)' \
|
|
||||||
> "$(SYSROOT_SHARE)/predefined-macros.txt"
|
|
||||||
|
|
||||||
# Check that the computed metadata matches the expected metadata.
|
|
31
ignore-gcc-con-destructive-size-macros.patch
Normal file
31
ignore-gcc-con-destructive-size-macros.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 13ed98026d1e6f96fa4c0efce3ff849e3040fca3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Hommey <mh@glandium.org>
|
||||||
|
Date: Tue, 30 Apr 2024 06:46:03 +0900
|
||||||
|
Subject: [PATCH] Adjust Makefile for LLVM trunk (19) as of 2024-04-26 (#492)
|
||||||
|
|
||||||
|
https://github.com/llvm/llvm-project/commit/72c373bfdc9860b3d75e72c219b2c81c90bc4364
|
||||||
|
dded __GCC_(CON|DE)STRUCTIVE_SIZE macros.
|
||||||
|
---
|
||||||
|
Makefile | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 2f9e9fde..f9fd3030 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -873,6 +873,7 @@ check-symbols: startup_files libc
|
||||||
|
@# TODO: Filter out __FPCLASS_* that are new to clang 17.
|
||||||
|
@# TODO: Filter out __FLT128_* that are new to clang 18.
|
||||||
|
@# TODO: Filter out __MEMORY_SCOPE_* that are new to clang 18.
|
||||||
|
+ @# TODO: Filter out __GCC_(CON|DE)STRUCTIVE_SIZE that are new to clang 19.
|
||||||
|
@# TODO: clang defined __FLT_EVAL_METHOD__ until clang 15, so we force-undefine it
|
||||||
|
@# for older versions.
|
||||||
|
@# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to
|
||||||
|
@@ -907,6 +908,7 @@ check-symbols: startup_files libc
|
||||||
|
| grep -v '^#define __FPCLASS_' \
|
||||||
|
| grep -v '^#define __FLT128_' \
|
||||||
|
| grep -v '^#define __MEMORY_SCOPE_' \
|
||||||
|
+ | grep -v '^#define __GCC_\(CON\|DE\)STRUCTIVE_SIZE' \
|
||||||
|
| grep -v '^#define NDEBUG' \
|
||||||
|
| grep -v '^#define __OPTIMIZE__' \
|
||||||
|
| grep -v '^#define assert' \
|
30
ignore-norm-max-macros.patch
Normal file
30
ignore-norm-max-macros.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From d43dcc63d26013264bb58241e53bde9318349443 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Hommey <mh@glandium.org>
|
||||||
|
Date: Fri, 12 Jul 2024 08:11:35 +0900
|
||||||
|
Subject: [PATCH] Adjust Makefile for LLVM trunk (19) as of 2024-07-10 (#512)
|
||||||
|
|
||||||
|
https://github.com/llvm/llvm-project/commit/0e7590a25cd2e49c5849cc7d2facd5810f8900ce
|
||||||
|
---
|
||||||
|
Makefile | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 0d2a3144..5e6e7734 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -872,6 +872,7 @@ check-symbols: startup_files libc
|
||||||
|
@# TODO: Filter out __MEMORY_SCOPE_* that are new to clang 18.
|
||||||
|
@# TODO: Filter out __GCC_(CON|DE)STRUCTIVE_SIZE that are new to clang 19.
|
||||||
|
@# TODO: Filter out __STDC_EMBED_* that are new to clang 19.
|
||||||
|
+ @# TODO: Filter out __*_NORM_MAX__ that are new to clang 19.
|
||||||
|
@# TODO: clang defined __FLT_EVAL_METHOD__ until clang 15, so we force-undefine it
|
||||||
|
@# for older versions.
|
||||||
|
@# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to
|
||||||
|
@@ -912,6 +913,7 @@ check-symbols: startup_files libc
|
||||||
|
| grep -v '^#define __MEMORY_SCOPE_' \
|
||||||
|
| grep -v '^#define __GCC_\(CON\|DE\)STRUCTIVE_SIZE' \
|
||||||
|
| grep -v '^#define __STDC_EMBED_' \
|
||||||
|
+ | grep -v '^#define __\(DBL\|FLT\|LDBL\)_NORM_MAX__' \
|
||||||
|
| grep -v '^#define NDEBUG' \
|
||||||
|
| grep -v '^#define __OPTIMIZE__' \
|
||||||
|
| grep -v '^#define assert' \
|
30
ignore-stdc-embed-macros.patch
Normal file
30
ignore-stdc-embed-macros.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 320bbbcced68ce8e564b0dc4c8f80a5a5ad21a9c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Hommey <mh@glandium.org>
|
||||||
|
Date: Sat, 22 Jun 2024 01:49:33 +0900
|
||||||
|
Subject: [PATCH] Adjust Makefile for LLVM trunk (19) as of 2024-06-20 (#509)
|
||||||
|
|
||||||
|
https://github.com/llvm/llvm-project/commit/41c6e4379204ffc00948edd33d59ba5ebbceaba2
|
||||||
|
---
|
||||||
|
Makefile | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 4192ecbb..0d2a3144 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -871,6 +871,7 @@ check-symbols: startup_files libc
|
||||||
|
@# TODO: Filter out __FLT128_* that are new to clang 18.
|
||||||
|
@# TODO: Filter out __MEMORY_SCOPE_* that are new to clang 18.
|
||||||
|
@# TODO: Filter out __GCC_(CON|DE)STRUCTIVE_SIZE that are new to clang 19.
|
||||||
|
+ @# TODO: Filter out __STDC_EMBED_* that are new to clang 19.
|
||||||
|
@# TODO: clang defined __FLT_EVAL_METHOD__ until clang 15, so we force-undefine it
|
||||||
|
@# for older versions.
|
||||||
|
@# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to
|
||||||
|
@@ -910,6 +911,7 @@ check-symbols: startup_files libc
|
||||||
|
| grep -v '^#define __FLT128_' \
|
||||||
|
| grep -v '^#define __MEMORY_SCOPE_' \
|
||||||
|
| grep -v '^#define __GCC_\(CON\|DE\)STRUCTIVE_SIZE' \
|
||||||
|
+ | grep -v '^#define __STDC_EMBED_' \
|
||||||
|
| grep -v '^#define NDEBUG' \
|
||||||
|
| grep -v '^#define __OPTIMIZE__' \
|
||||||
|
| grep -v '^#define assert' \
|
44
ignore-wasm-macros-indirect-function-table.patch
Normal file
44
ignore-wasm-macros-indirect-function-table.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 129ee9b64be8724745c4ebd45c21dcdc5fd23e22 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Hommey <mh@glandium.org>
|
||||||
|
Date: Wed, 1 May 2024 23:30:33 +0900
|
||||||
|
Subject: [PATCH] Adjust Makefile for LLVM trunk (19) as of 2024-04-30 (#493)
|
||||||
|
|
||||||
|
https://github.com/llvm/llvm-project/commit/5bbf1ea8f18d1f99637b7b8bf6b985c186c808f6
|
||||||
|
added __wasm_multivalue__ and __wasm_reference_types__, and the latter
|
||||||
|
also makes libraries reference the undefined __indirect_function_table
|
||||||
|
symbol, which is provided by the linker.
|
||||||
|
---
|
||||||
|
Makefile | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index f9fd3030..b0407968 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -836,7 +836,7 @@ check-symbols: startup_files libc
|
||||||
|
for undef_sym in $$("$(NM)" --undefined-only "$(SYSROOT_LIB)"/libc.a "$(SYSROOT_LIB)"/libc-*.a "$(SYSROOT_LIB)"/*.o \
|
||||||
|
|grep ' U ' |sed 's/.* U //' |LC_ALL=C sort |uniq); do \
|
||||||
|
grep -q '\<'$$undef_sym'\>' "$(DEFINED_SYMBOLS)" || echo $$undef_sym; \
|
||||||
|
- done | grep -E -v "^__mul|__memory_base" > "$(UNDEFINED_SYMBOLS)"
|
||||||
|
+ done | grep -E -v "^__mul|__memory_base|__indirect_function_table" > "$(UNDEFINED_SYMBOLS)"
|
||||||
|
grep '^_*imported_wasi_' "$(UNDEFINED_SYMBOLS)" \
|
||||||
|
> "$(SYSROOT_LIB)/libc.imports"
|
||||||
|
|
||||||
|
@@ -878,6 +878,8 @@ check-symbols: startup_files libc
|
||||||
|
@# for older versions.
|
||||||
|
@# TODO: Undefine __wasm_mutable_globals__ and __wasm_sign_ext__, that are new to
|
||||||
|
@# clang 16 for -mcpu=generic.
|
||||||
|
+ @# TODO: Undefine __wasm_multivalue__ and __wasm_reference_types__, that are new to
|
||||||
|
+ @# clang 19 for -mcpu=generic.
|
||||||
|
@# TODO: As of clang 16, __GNUC_VA_LIST is #defined without a value.
|
||||||
|
$(CC) $(CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \
|
||||||
|
-isystem $(SYSROOT_INC) \
|
||||||
|
@@ -894,6 +896,8 @@ check-symbols: startup_files libc
|
||||||
|
-U__clang_wide_literal_encoding__ \
|
||||||
|
-U__wasm_mutable_globals__ \
|
||||||
|
-U__wasm_sign_ext__ \
|
||||||
|
+ -U__wasm_multivalue__ \
|
||||||
|
+ -U__wasm_reference_types__ \
|
||||||
|
-U__GNUC__ \
|
||||||
|
-U__GNUC_MINOR__ \
|
||||||
|
-U__GNUC_PATCHLEVEL__ \
|
BIN
wasi-libc-20.tar.gz
(Stored with Git LFS)
BIN
wasi-libc-20.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
wasi-libc-22.tar.gz
(Stored with Git LFS)
Normal file
BIN
wasi-libc-22.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 21 21:39:37 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Update to version (wasi-sdk-)22.
|
||||||
|
* Add support for some network APIs.
|
||||||
|
- Rebase workaround-broken-makefile.patch.
|
||||||
|
- Backport upstream patches to fix build with Clang 19:
|
||||||
|
* ignore-gcc-con-destructive-size-macros.patch
|
||||||
|
* ignore-norm-max-macros.patch
|
||||||
|
* ignore-stdc-embed-macros.patch
|
||||||
|
* ignore-wasm-macros-indirect-function-table.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 22 21:05:54 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Update to version (wasi-sdk-)21.
|
||||||
|
* Compatibility with Clang 18.
|
||||||
|
* Add shared library support.
|
||||||
|
- Drop obsolete ignore-fpclass-macros.patch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 20 15:16:08 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Use %autosetup macro. Allows to eliminate the usage of deprecated
|
||||||
|
%patchN
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 22 17:06:06 UTC 2023 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
Fri Sep 22 17:06:06 UTC 2023 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package wasi-libc
|
# spec file for package wasi-libc
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: wasi-libc
|
Name: wasi-libc
|
||||||
Version: 20
|
Version: 22
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: WASI libc implementation for WebAssembly
|
Summary: WASI libc implementation for WebAssembly
|
||||||
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
|
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
|
||||||
@ -26,7 +26,10 @@ URL: https://github.com/WebAssembly/wasi-libc
|
|||||||
Source: https://github.com/WebAssembly/wasi-libc/archive/refs/tags/wasi-sdk-%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/WebAssembly/wasi-libc/archive/refs/tags/wasi-sdk-%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Source1: wasi-libc-rpmlintrc
|
Source1: wasi-libc-rpmlintrc
|
||||||
Patch1: workaround-broken-makefile.patch
|
Patch1: workaround-broken-makefile.patch
|
||||||
Patch2: ignore-fpclass-macros.patch
|
Patch2: ignore-gcc-con-destructive-size-macros.patch
|
||||||
|
Patch3: ignore-wasm-macros-indirect-function-table.patch
|
||||||
|
Patch4: ignore-stdc-embed-macros.patch
|
||||||
|
Patch5: ignore-norm-max-macros.patch
|
||||||
BuildRequires: clang > 10
|
BuildRequires: clang > 10
|
||||||
BuildRequires: llvm > 10
|
BuildRequires: llvm > 10
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -35,9 +38,7 @@ BuildArch: noarch
|
|||||||
WASI libc allows cross platform binaries to be created and executed on a variety of platforms
|
WASI libc allows cross platform binaries to be created and executed on a variety of platforms
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n wasi-libc-wasi-sdk-%{version}
|
%autosetup -p1 -n wasi-libc-wasi-sdk-%{version}
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CC=clang
|
export CC=clang
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# Workaround as per https://github.com/WebAssembly/wasi-libc/issues/156
|
# Workaround as per https://github.com/WebAssembly/wasi-libc/issues/156
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index f350ecb..52d9ca6 100644
|
index 2f9e9fd..8318748 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -708,7 +708,7 @@ check-symbols: startup_files libc
|
@@ -917,7 +917,7 @@ check-symbols: startup_files libc
|
||||||
# This ignores whitespace because on Windows the output has CRLF line endings.
|
# This ignores whitespace because on Windows the output has CRLF line endings.
|
||||||
diff -wur "expected/$(TARGET_TRIPLE)" "$(SYSROOT_SHARE)"
|
diff -wur "$(EXPECTED_TARGET_DIR)" "$(SYSROOT_SHARE)"
|
||||||
|
|
||||||
-install: finish
|
-install: finish
|
||||||
+install:
|
+install:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user