Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-04 Thread Kurt Miller
On Thu, 2021-02-04 at 15:25 +0100, Janne Johansson wrote:
> Den tors 4 feb. 2021 kl 14:47 skrev Janne Johansson :
> 
> > 
> > > 
> > > k...@intricatesoftware.com wrote:
> > > > 
> > > > Update to 8.0.4 with the following additional changes:
> > > > Additional testing on mips, powerpc, etc. would be appreciated.
> > Mips64:
> > 
> > make  check-TESTS
> > 
> > 
> > Testsuite summary for gc 8.0.4
> > 
> > 
> > # TOTAL: 17
> > # PASS:  17
> > 
> > 
> > w3m still building...
> > 
> w3m on wikipedia and other sites works fine too.
> 

Great. Thank you for testing it.

-Kurt



Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-04 Thread Janne Johansson
Den tors 4 feb. 2021 kl 14:47 skrev Janne Johansson :

> > k...@intricatesoftware.com wrote:
> > > Update to 8.0.4 with the following additional changes:
> > > Additional testing on mips, powerpc, etc. would be appreciated.
>
> Mips64:
>
> make  check-TESTS
>
> 
> Testsuite summary for gc 8.0.4
>
> 
> # TOTAL: 17
> # PASS:  17
>
> 
> w3m still building...
>

w3m on wikipedia and other sites works fine too.

-- 
May the most significant bit of your life be positive.


Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-04 Thread Kurt Miller
On Wed, 2021-02-03 at 22:42 +, Stuart Henderson wrote:
> On 2021/02/02 18:40, k...@intricatesoftware.com wrote:
> > 
> > Update to 8.0.4 with the following additional changes:
> > - Use mmap via the configure argument instead of hard-coding it.
> > - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
> >   code conventions.
> > - Remove unused ELF_CLASS define for OpenBSD.
> > - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> > - Don't use old GC_find_limit_openbsd() which is only needed for
> >   uthreads.
> > 
> > I've tested this on i386, amd64, sparc64 and aarch64 using the
> > port's regress tests and by using w3m. Note that on aarch64 the
> > current boehm-gc port isn't stable and w3m will crash it pretty
> > easily. This update has not fixed that (aarch64 is still unstable
> > but the regress tests pass).
> > 
> > Additional testing on mips, powerpc, etc. would be appreciated.
> I'm OK with this, it's a significant clean-up for what is one of the
> trickiest ports in the tree, but tests on other arches would be welcome.
> 
> Note to testers: building w3m against the new boehm-gc and browsing
> a selection of pages is good for testing; following a few links around
> wikipedia or something is often enough to pick up problems.
> 
> Kurt, I know it's just papering over the problem but what do you think
> about setting -O1 in the w3m port for aarch64 for now?
> 

Thanks. I'd like a bit more time to investigate w3m on aarch64, but if
I can't figure it out, sure we can set it to -O1 so it works.

-Kurt



Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-04 Thread Kurt Miller
On Wed, 2021-02-03 at 23:37 -0500, George Koehler wrote:
> On Tue, 2 Feb 2021 18:40:50 -0500 (EST)
> k...@intricatesoftware.com wrote:
> 
> > 
> > Update to 8.0.4 with the following additional changes:
> > - Use mmap via the configure argument instead of hard-coding it.
> > - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
> >   code conventions.
> > - Remove unused ELF_CLASS define for OpenBSD.
> > - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> > - Don't use old GC_find_limit_openbsd() which is only needed for
> >   uthreads.
> > 
> > I've tested this on i386, amd64, sparc64 and aarch64 using the
> > port's regress tests and by using w3m
> Your update to 8.0.4 passes the port's "make test" on powerpc and
> powerpc64.  It works with net/clic on powerpc64.  ok gkoehler@
> 
> This update fixes -fno-common
> 
> I like how you adjusted the patches, and you tested the port on
> multiple platforms.  I had added the mmap patch along with the
> powerpc64 support, but upstream has changed their mmap code, so you
> needed to adjust the patch.  Defining USE_MMAP_ANON for each arch
> is exactly what upstream does for systems like Mac (DARWIN).  Another
> way is at include/private/gcconfig.h.orig:2906, where upstream defines
> USE_MMAP_ANON for all arches of LINUX.--George

Thanks for the review and tests. Indeed I missed that part of
gcconfig.h, thanks for pointing it out. My intent was to have
the configure argument control the use of mmap, but I see that
I didn't get that quite right due to this part:

#if defined(USE_MMAP_ANON) && !defined(USE_MMAP)
#   define USE_MMAP 1
#elif defined(LINUX) && defined(USE_MMAP)
/* The kernel may do a somewhat better job merging mappings etc.*/
/* with anonymous mappings. */
#   define USE_MMAP_ANON
#endif

The way I have it now it always uses mmap, so I'd like to
revise that to remove the USE_MMAP_ANON per arch and adjust
this section above as follows to allow the configure argument
to control the use of mmap:

#if defined(USE_MMAP_ANON) && !defined(USE_MMAP)
#   define USE_MMAP 1
#elif defined(LINUX) && defined(USE_MMAP)
/* The kernel may do a somewhat better job merging mappings etc.*/
/* with anonymous mappings. */
#   define USE_MMAP_ANON
#elif defined(OPENBSD) && defined(USE_MMAP)
#   define USE_MMAP_ANON
#endif

I'm not sure if my MUA will mangle the in-line diff so I'll
attach it was well.

Index: Makefile
===
RCS file: /cvs/ports/devel/boehm-gc/Makefile,v
retrieving revision 1.75
diff -u -p -u -r1.75 Makefile
--- Makefile24 Aug 2020 21:31:13 -  1.75
+++ Makefile4 Feb 2021 14:13:31 -
@@ -3,8 +3,8 @@
 COMMENT-main=  garbage collection and memory leak detection for C and C++
 COMMENT-atomic=access to hardware provided atomic memory operations
 
-VERSION=   7.6.0
-LIBAO_VERSION= 7.6.6
+VERSION=   8.0.4
+LIBAO_VERSION= 7.6.10
 # has various machine-dependent parts; updates definitely need
 # tests on more than just amd64.
 
@@ -12,7 +12,6 @@ DISTNAME= gc-${VERSION}
 
 PKGNAME-atomic=libatomic_ops-${LIBAO_VERSION}
 PKGNAME-main=  boehm-gc-${VERSION}
-REVISION=  6
 
 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
    libatomic_ops-${LIBAO_VERSION}${EXTRACT_SUFX}
@@ -20,11 +19,11 @@ DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
 MULTI_PACKAGES=-main -atomic
 DEBUG_PACKAGES=${BUILD_PACKAGES}
 
-SHARED_LIBS += gc  4.0 # 1.3
-SHARED_LIBS += gccpp   0.0 # 1.3
-SHARED_LIBS += cord2.3 # 1.3
-SHARED_LIBS +=  atomic_ops 2.0 # 1.3
-SHARED_LIBS +=  atomic_ops_gpl 2.0 # 1.3
+SHARED_LIBS += gc  5.0 # 5.3
+SHARED_LIBS += gccpp   1.0 # 5.0
+SHARED_LIBS += cord3.0 # 5.0
+SHARED_LIBS +=  atomic_ops 3.0 # 2.1
+SHARED_LIBS +=  atomic_ops_gpl 3.0 # 2.2
 
 CATEGORIES=devel
 
@@ -49,7 +48,9 @@ CONFIGURE_STYLE= gnu
 
 CONFIGURE_ARGS= --with-libatomic-ops=no \
    --enable-cplusplus \
-   --enable-threads=pthreads
+   --enable-threads=pthreads \
+   --enable-mmap \
+   --enable-static=yes
 
 post-extract:
    @perl -pi -e "s,/usr/local,${PREFIX},g" ${WRKSRC}/doc/gc.man
Index: distinfo
===
RCS file: /cvs/ports/devel/boehm-gc/distinfo,v
retrieving revision 1.11
diff -u -p -u -r1.11 distinfo
--- distinfo30 Dec 2018 17:08:09 -  1.11
+++ distinfo4 Feb 2021 14:13:31 -
@@ -1,4 +1,4 @@
-SHA256 (gc-7.6.0.tar.gz) = oUoosRKb6Q5VzW9xEn/8VZThCR1dVBMVKMJM0MA7fZA=
-SHA256 (libatomic_ops-7.6.6.tar.gz) = 
mf6rxfVId/MU20+t6xCfCz4dGlSvtrSz37oecH444HQ=
-SIZE (gc-7.6.0.tar.gz) = 751
-SIZE (libatomic_ops-7.6.6.tar.gz) = 498187
+SHA256 (gc-8.0.4.tar.gz) = 

Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-04 Thread Kurt Miller
On Thu, 2021-02-04 at 02:06 +0100, Charlene Wendling wrote:
> On Tue, 2 Feb 2021 18:40:50 -0500 (EST)
> k...@intricatesoftware.com wrote:
> 
> > 
> > Update to 8.0.4 with the following additional changes:
> > - Use mmap via the configure argument instead of hard-coding it.
> > - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
> >   code conventions.
> > - Remove unused ELF_CLASS define for OpenBSD.
> > - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> > - Don't use old GC_find_limit_openbsd() which is only needed for
> >   uthreads.
> > 
> > I've tested this on i386, amd64, sparc64 and aarch64 using the
> > port's regress tests and by using w3m. Note that on aarch64 the
> > current boehm-gc port isn't stable and w3m will crash it pretty
> > easily. This update has not fixed that (aarch64 is still unstable
> > but the regress tests pass).
> > 
> > Additional testing on mips, powerpc, etc. would be appreciated.
> I tested on macppc:
> 
> - all 17 tests are passing
> - w3m's runtime is still fine

Thank you for the test report.

-Kurt



Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-04 Thread Janne Johansson
> k...@intricatesoftware.com wrote:
> > Update to 8.0.4 with the following additional changes:

> > Additional testing on mips, powerpc, etc. would be appreciated.
>
> I tested on macppc:
>
> - all 17 tests are passing
> - w3m's runtime is still fine
>
> Charlène.
>

Mips64:

make  check-TESTS
PASS: cordtest
PASS: gctest
PASS: leaktest
PASS: middletest
PASS: smashtest
PASS: hugetest
PASS: realloc_test
PASS: staticrootstest
PASS: test_atomic_ops
PASS: threadleaktest
PASS: threadkey_test
PASS: subthreadcreate_test
PASS: initsecondarythread_test
PASS: test_cpp
PASS: disclaim_test
PASS: disclaim_bench
PASS: disclaim_weakmap_test

Testsuite summary for gc 8.0.4

# TOTAL: 17
# PASS:  17
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0



w3m still building...

-- 
May the most significant bit of your life be positive.


Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-03 Thread George Koehler
On Tue, 2 Feb 2021 18:40:50 -0500 (EST)
k...@intricatesoftware.com wrote:

> Update to 8.0.4 with the following additional changes:
> - Use mmap via the configure argument instead of hard-coding it.
> - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
>   code conventions.
> - Remove unused ELF_CLASS define for OpenBSD.
> - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> - Don't use old GC_find_limit_openbsd() which is only needed for
>   uthreads.
> 
> I've tested this on i386, amd64, sparc64 and aarch64 using the
> port's regress tests and by using w3m

Your update to 8.0.4 passes the port's "make test" on powerpc and
powerpc64.  It works with net/clic on powerpc64.  ok gkoehler@

This update fixes -fno-common

I like how you adjusted the patches, and you tested the port on
multiple platforms.  I had added the mmap patch along with the
powerpc64 support, but upstream has changed their mmap code, so you
needed to adjust the patch.  Defining USE_MMAP_ANON for each arch
is exactly what upstream does for systems like Mac (DARWIN).  Another
way is at include/private/gcconfig.h.orig:2906, where upstream defines
USE_MMAP_ANON for all arches of LINUX.--George

> Index: Makefile
> ===
> RCS file: /cvs/ports/devel/boehm-gc/Makefile,v
> retrieving revision 1.75
> diff -u -p -u -r1.75 Makefile
> --- Makefile  24 Aug 2020 21:31:13 -  1.75
> +++ Makefile  2 Feb 2021 23:04:37 -
> @@ -3,8 +3,8 @@
>  COMMENT-main=garbage collection and memory leak detection for C and 
> C++
>  COMMENT-atomic=  access to hardware provided atomic memory operations
>  
> -VERSION= 7.6.0
> -LIBAO_VERSION=   7.6.6
> +VERSION= 8.0.4
> +LIBAO_VERSION=   7.6.10
>  # has various machine-dependent parts; updates definitely need
>  # tests on more than just amd64.
>  
> @@ -12,7 +12,6 @@ DISTNAME=   gc-${VERSION}
>  
>  PKGNAME-atomic=  libatomic_ops-${LIBAO_VERSION}
>  PKGNAME-main=boehm-gc-${VERSION}
> -REVISION=6
>  
>  DISTFILES=   ${DISTNAME}${EXTRACT_SUFX} \
>   libatomic_ops-${LIBAO_VERSION}${EXTRACT_SUFX}
> @@ -20,11 +19,11 @@ DISTFILES=${DISTNAME}${EXTRACT_SUFX} \
>  MULTI_PACKAGES=  -main -atomic
>  DEBUG_PACKAGES=  ${BUILD_PACKAGES}
>  
> -SHARED_LIBS +=   gc  4.0 # 1.3
> -SHARED_LIBS +=   gccpp   0.0 # 1.3
> -SHARED_LIBS +=   cord2.3 # 1.3
> -SHARED_LIBS +=  atomic_ops   2.0 # 1.3
> -SHARED_LIBS +=  atomic_ops_gpl   2.0 # 1.3
> +SHARED_LIBS +=   gc  5.0 # 5.3
> +SHARED_LIBS +=   gccpp   1.0 # 5.0
> +SHARED_LIBS +=   cord3.0 # 5.0
> +SHARED_LIBS +=  atomic_ops   3.0 # 2.1
> +SHARED_LIBS +=  atomic_ops_gpl   3.0 # 2.2
>  
>  CATEGORIES=  devel
>  
> @@ -49,7 +48,9 @@ CONFIGURE_STYLE= gnu
>  
>  CONFIGURE_ARGS= --with-libatomic-ops=no \
>   --enable-cplusplus \
> - --enable-threads=pthreads
> + --enable-threads=pthreads \
> + --enable-mmap \
> + --enable-static=yes
>  
>  post-extract:
>   @perl -pi -e "s,/usr/local,${PREFIX},g" ${WRKSRC}/doc/gc.man
> Index: distinfo
> ===
> RCS file: /cvs/ports/devel/boehm-gc/distinfo,v
> retrieving revision 1.11
> diff -u -p -u -r1.11 distinfo
> --- distinfo  30 Dec 2018 17:08:09 -  1.11
> +++ distinfo  2 Feb 2021 23:04:37 -
> @@ -1,4 +1,4 @@
> -SHA256 (gc-7.6.0.tar.gz) = oUoosRKb6Q5VzW9xEn/8VZThCR1dVBMVKMJM0MA7fZA=
> -SHA256 (libatomic_ops-7.6.6.tar.gz) = 
> mf6rxfVId/MU20+t6xCfCz4dGlSvtrSz37oecH444HQ=
> -SIZE (gc-7.6.0.tar.gz) = 751
> -SIZE (libatomic_ops-7.6.6.tar.gz) = 498187
> +SHA256 (gc-8.0.4.tar.gz) = Q2oN3GexrAsEBbYalnW8qeB1yBVvTevR0G86VsfNKJ0=
> +SHA256 (libatomic_ops-7.6.10.tar.gz) = 
> WH7fYIF/Vtrx4as4pLPHKbjoRv9ntPYqYVcYNwjwma8=
> +SIZE (gc-8.0.4.tar.gz) = 1160528
> +SIZE (libatomic_ops-7.6.10.tar.gz) = 503734
> Index: patches/patch-bdw-gc_pc_in
> ===
> RCS file: /cvs/ports/devel/boehm-gc/patches/patch-bdw-gc_pc_in,v
> retrieving revision 1.1
> diff -u -p -u -r1.1 patch-bdw-gc_pc_in
> --- patches/patch-bdw-gc_pc_in9 Dec 2009 20:36:49 -   1.1
> +++ patches/patch-bdw-gc_pc_in2 Feb 2021 23:04:37 -
> @@ -1,10 +1,11 @@
>  $OpenBSD: patch-bdw-gc_pc_in,v 1.1 2009/12/09 20:36:49 sthen Exp $
>  bdw-gc.pc.in.origMon Dec  7 10:57:34 2009
> -+++ bdw-gc.pc.in Mon Dec  7 10:57:46 2009
> +Index: bdw-gc.pc.in
> +--- bdw-gc.pc.in.orig
>  bdw-gc.pc.in
>  @@ -6,5 +6,5 @@ includedir=@includedir@
>   Name: Boehm-Demers-Weiser Conservative Garbage Collector
>   Description: A garbage collector for C and C++
>   Version: @PACKAGE_VERSION@
> --Libs: -L${libdir} -lgc
> -+Libs: -L${libdir} -lgc -pthread
> +-Libs: -L${libdir} @ATOMIC_OPS_LIBS@ -lgc
> ++Libs: 

Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-03 Thread Charlene Wendling
On Tue, 2 Feb 2021 18:40:50 -0500 (EST)
k...@intricatesoftware.com wrote:

> Update to 8.0.4 with the following additional changes:
> - Use mmap via the configure argument instead of hard-coding it.
> - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
>   code conventions.
> - Remove unused ELF_CLASS define for OpenBSD.
> - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> - Don't use old GC_find_limit_openbsd() which is only needed for
>   uthreads.
> 
> I've tested this on i386, amd64, sparc64 and aarch64 using the
> port's regress tests and by using w3m. Note that on aarch64 the
> current boehm-gc port isn't stable and w3m will crash it pretty
> easily. This update has not fixed that (aarch64 is still unstable
> but the regress tests pass).
> 
> Additional testing on mips, powerpc, etc. would be appreciated.

I tested on macppc:

- all 17 tests are passing
- w3m's runtime is still fine

Charlène.



Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-03 Thread Stuart Henderson
On 2021/02/02 18:40, k...@intricatesoftware.com wrote:
> Update to 8.0.4 with the following additional changes:
> - Use mmap via the configure argument instead of hard-coding it.
> - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
>   code conventions.
> - Remove unused ELF_CLASS define for OpenBSD.
> - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> - Don't use old GC_find_limit_openbsd() which is only needed for
>   uthreads.
> 
> I've tested this on i386, amd64, sparc64 and aarch64 using the
> port's regress tests and by using w3m. Note that on aarch64 the
> current boehm-gc port isn't stable and w3m will crash it pretty
> easily. This update has not fixed that (aarch64 is still unstable
> but the regress tests pass).
> 
> Additional testing on mips, powerpc, etc. would be appreciated.

I'm OK with this, it's a significant clean-up for what is one of the
trickiest ports in the tree, but tests on other arches would be welcome.

Note to testers: building w3m against the new boehm-gc and browsing
a selection of pages is good for testing; following a few links around
wikipedia or something is often enough to pick up problems.

Kurt, I know it's just papering over the problem but what do you think
about setting -O1 in the w3m port for aarch64 for now?



Re: UPDATE: devel/boehm-gc 8.0.4

2021-02-02 Thread Kurt Miller
On Tue, 2021-02-02 at 18:40 -0500, k...@intricatesoftware.com wrote:
> Update to 8.0.4 with the following additional changes:
> - Use mmap via the configure argument instead of hard-coding it.
> - Define USE_MMAP_ANON for all OpenBSD arch to match upstream
>   code conventions.
> - Remove unused ELF_CLASS define for OpenBSD.
> - Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
> - Don't use old GC_find_limit_openbsd() which is only needed for
>   uthreads.
> 
> I've tested this on i386, amd64, sparc64 and aarch64 using the
> port's regress tests and by using w3m. Note that on aarch64 the
> current boehm-gc port isn't stable and w3m will crash it pretty
> easily. This update has not fixed that (aarch64 is still unstable
> but the regress tests pass).
> 
> Additional testing on mips, powerpc, etc. would be appreciated.

Regarding the w3m crashes on aarch64, I've noticed that dropping
the optimization level from -O2 to -O1 for w3m stabilizes it for
me. However, I don't see the connection with how this interacts
with boehm-gc. It looks like clang -O2 adds -vectorize-loops and
-vectorize-slp which seem unrelated to things that would affect
boehm-gc.

-Kurt



UPDATE: devel/boehm-gc 8.0.4

2021-02-02 Thread kurt
Update to 8.0.4 with the following additional changes:
- Use mmap via the configure argument instead of hard-coding it.
- Define USE_MMAP_ANON for all OpenBSD arch to match upstream
  code conventions.
- Remove unused ELF_CLASS define for OpenBSD.
- Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD.
- Don't use old GC_find_limit_openbsd() which is only needed for
  uthreads.

I've tested this on i386, amd64, sparc64 and aarch64 using the
port's regress tests and by using w3m. Note that on aarch64 the
current boehm-gc port isn't stable and w3m will crash it pretty
easily. This update has not fixed that (aarch64 is still unstable
but the regress tests pass).

Additional testing on mips, powerpc, etc. would be appreciated.

Index: Makefile
===
RCS file: /cvs/ports/devel/boehm-gc/Makefile,v
retrieving revision 1.75
diff -u -p -u -r1.75 Makefile
--- Makefile24 Aug 2020 21:31:13 -  1.75
+++ Makefile2 Feb 2021 23:04:37 -
@@ -3,8 +3,8 @@
 COMMENT-main=  garbage collection and memory leak detection for C and C++
 COMMENT-atomic=access to hardware provided atomic memory operations
 
-VERSION=   7.6.0
-LIBAO_VERSION= 7.6.6
+VERSION=   8.0.4
+LIBAO_VERSION= 7.6.10
 # has various machine-dependent parts; updates definitely need
 # tests on more than just amd64.
 
@@ -12,7 +12,6 @@ DISTNAME= gc-${VERSION}
 
 PKGNAME-atomic=libatomic_ops-${LIBAO_VERSION}
 PKGNAME-main=  boehm-gc-${VERSION}
-REVISION=  6
 
 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
libatomic_ops-${LIBAO_VERSION}${EXTRACT_SUFX}
@@ -20,11 +19,11 @@ DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
 MULTI_PACKAGES=-main -atomic
 DEBUG_PACKAGES=${BUILD_PACKAGES}
 
-SHARED_LIBS += gc  4.0 # 1.3
-SHARED_LIBS += gccpp   0.0 # 1.3
-SHARED_LIBS += cord2.3 # 1.3
-SHARED_LIBS +=  atomic_ops 2.0 # 1.3
-SHARED_LIBS +=  atomic_ops_gpl 2.0 # 1.3
+SHARED_LIBS += gc  5.0 # 5.3
+SHARED_LIBS += gccpp   1.0 # 5.0
+SHARED_LIBS += cord3.0 # 5.0
+SHARED_LIBS +=  atomic_ops 3.0 # 2.1
+SHARED_LIBS +=  atomic_ops_gpl 3.0 # 2.2
 
 CATEGORIES=devel
 
@@ -49,7 +48,9 @@ CONFIGURE_STYLE= gnu
 
 CONFIGURE_ARGS= --with-libatomic-ops=no \
--enable-cplusplus \
-   --enable-threads=pthreads
+   --enable-threads=pthreads \
+   --enable-mmap \
+   --enable-static=yes
 
 post-extract:
@perl -pi -e "s,/usr/local,${PREFIX},g" ${WRKSRC}/doc/gc.man
Index: distinfo
===
RCS file: /cvs/ports/devel/boehm-gc/distinfo,v
retrieving revision 1.11
diff -u -p -u -r1.11 distinfo
--- distinfo30 Dec 2018 17:08:09 -  1.11
+++ distinfo2 Feb 2021 23:04:37 -
@@ -1,4 +1,4 @@
-SHA256 (gc-7.6.0.tar.gz) = oUoosRKb6Q5VzW9xEn/8VZThCR1dVBMVKMJM0MA7fZA=
-SHA256 (libatomic_ops-7.6.6.tar.gz) = 
mf6rxfVId/MU20+t6xCfCz4dGlSvtrSz37oecH444HQ=
-SIZE (gc-7.6.0.tar.gz) = 751
-SIZE (libatomic_ops-7.6.6.tar.gz) = 498187
+SHA256 (gc-8.0.4.tar.gz) = Q2oN3GexrAsEBbYalnW8qeB1yBVvTevR0G86VsfNKJ0=
+SHA256 (libatomic_ops-7.6.10.tar.gz) = 
WH7fYIF/Vtrx4as4pLPHKbjoRv9ntPYqYVcYNwjwma8=
+SIZE (gc-8.0.4.tar.gz) = 1160528
+SIZE (libatomic_ops-7.6.10.tar.gz) = 503734
Index: patches/patch-bdw-gc_pc_in
===
RCS file: /cvs/ports/devel/boehm-gc/patches/patch-bdw-gc_pc_in,v
retrieving revision 1.1
diff -u -p -u -r1.1 patch-bdw-gc_pc_in
--- patches/patch-bdw-gc_pc_in  9 Dec 2009 20:36:49 -   1.1
+++ patches/patch-bdw-gc_pc_in  2 Feb 2021 23:04:37 -
@@ -1,10 +1,11 @@
 $OpenBSD: patch-bdw-gc_pc_in,v 1.1 2009/12/09 20:36:49 sthen Exp $
 bdw-gc.pc.in.orig  Mon Dec  7 10:57:34 2009
-+++ bdw-gc.pc.in   Mon Dec  7 10:57:46 2009
+Index: bdw-gc.pc.in
+--- bdw-gc.pc.in.orig
 bdw-gc.pc.in
 @@ -6,5 +6,5 @@ includedir=@includedir@
  Name: Boehm-Demers-Weiser Conservative Garbage Collector
  Description: A garbage collector for C and C++
  Version: @PACKAGE_VERSION@
--Libs: -L${libdir} -lgc
-+Libs: -L${libdir} -lgc -pthread
+-Libs: -L${libdir} @ATOMIC_OPS_LIBS@ -lgc
++Libs: -L${libdir} @ATOMIC_OPS_LIBS@ -lgc -pthread
  Cflags: -I${includedir}
Index: patches/patch-dyn_load_c
===
RCS file: patches/patch-dyn_load_c
diff -N patches/patch-dyn_load_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-dyn_load_c2 Feb 2021 23:04:37 -
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+- Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD
+
+Index: dyn_load.c
+--- dyn_load.c.orig
 dyn_load.c
+@@ -81,13 +81,6 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 
+ #   define ELFSIZE ARCH_ELFSIZE
+ #endif
+ 
+-#if defined(OPENBSD)
+-# include 
+-# if (OpenBSD >= 200519) && !defined(HAVE_DL_ITERATE_PHDR)
+-#