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

Commit

Permalink
Update bdwgc (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Dec 12, 2023
1 parent 71b9837 commit 6cbbaea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
6 changes: 2 additions & 4 deletions buildtools/bdwgc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions buildtools/bdwgc/bdwgc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 6cbbaea

Please sign in to comment.