Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Update bdwgc #45

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update bdwgc
  • Loading branch information
anuraaga committed Dec 12, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
amanharwara Aman Harwara
commit f46ae8bbd26da090cbd209ba2cb4a7a1e8694657
6 changes: 2 additions & 4 deletions buildtools/bdwgc/Dockerfile
Original file line number Diff line number Diff line change
@@ -5,15 +5,13 @@ FROM ghcr.io/webassembly/wasi-sdk:wasi-sdk-20

RUN apt-get -y update && apt-get -y install curl patch

RUN mkdir -p /bdwgc && curl -L https://github.com/ivmai/bdwgc/archive/1d9826992aa2a2783c9badbacddae70fdf7fffee.tar.gz | tar -xz --strip-components 1 -C /bdwgc
RUN mkdir -p /bdwgc && curl -L https://github.com/ivmai/bdwgc/archive/a753bcb459649d20331d9c9f1dba94588ef56829.tar.gz | tar -xz --strip-components 1 -C /bdwgc
WORKDIR /bdwgc
ADD bdwgc.patch bdwgc.patch
RUN patch -p1 < bdwgc.patch
RUN ./autogen.sh

# While signals aren't actually used the header file is included unconditionally. We can enable the header file
# without linking the actual signals library because the functions aren't called.
ENV CFLAGS -O3 -D_WASI_EMULATED_SIGNAL ${CFLAGS}
ENV CFLAGS -O3 ${CFLAGS}

# host is required by configure but not used so set it arbitrarily
RUN ./configure --disable-threads --disable-shared --disable-gcj-support --disable-java-finalization --disable-atomic-uncollectible --host=i686-pc-linux-gnu
13 changes: 0 additions & 13 deletions buildtools/bdwgc/bdwgc.patch
Original file line number Diff line number Diff line change
@@ -11,16 +11,3 @@ index 6970e6f2..a3af3824 100644
# if defined(GC_THREADS) && !defined(CPPCHECK)
# error No threads support yet
# endif
@@ -3008,10 +3010,10 @@ EXTERN_C_BEGIN

/* Whether GC_page_size is to be set to a value other than page size. */
#if defined(CYGWIN32) && (defined(MPROTECT_VDB) || defined(USE_MUNMAP)) \
- || (!defined(ANY_MSWIN) && !defined(USE_MMAP) \
+ || (!defined(ANY_MSWIN) && !defined(WASI) && !defined(USE_MMAP) \
&& (defined(GC_DISABLE_INCREMENTAL) || defined(DEFAULT_VDB)))
/* Cygwin: use the allocation granularity instead. */
- /* Other than Windows: use HBLKSIZE instead (unless mmap() is used). */
+ /* Other than Windows or WASI: use HBLKSIZE instead (unless mmap() is used). */
# define ALT_PAGESIZE_USED
# ifndef GC_NO_VALLOC
/* Nonetheless, we need the real page size is some extra functions. */
Binary file modified wasm/libgc.a
Binary file not shown.