[m-dev.] Upgrading Boehm GC, attempt #2

Sebastian Godelet sebastian.godelet+github at gmail.com
Mon Nov 17 01:23:23 AEDT 2014


Hello,

I just updated my local git clone and figured out that I forgot two
other assignments of the BOEHM_CFLAGS_FOR_THREADS in autoconf.ac. I'm
sorry I didn't supply a complete patch in the first place.
For anyone running into the same problem,
attached is a patch for the other two assignments I found which might
be problematic.

Greetings,

Sebastian.

On 16 November 2014 21:08, Paul Bone <paul at bone.id.au> wrote:
> On Sun, Nov 16, 2014 at 04:47:20PM +1100, Julien Fischer wrote:
>>
>> On Sun, 16 Nov 2014, Julien Fischer wrote:
>>
>>> One other issue with the version of Boehm we are upgrading to is that
>>> clang generates a spectacular number of warnings like the following:
>>>
>>> /include/private/../gc.h:455:23: warning: unknown attribute
>>> '__alloc_size__' ignored [-Wattributes]
>>> GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL
>>
>> This one has been fixed upstream in commit
>> b725923951d77f5c6792c2797f89179267c58c9c.
>>
>
> I've fixed this and the issue that Sebasitan reported.  After you "git pull"
> you may need to "git submodule update --remote" to get the updated boehm_gc
> directory.
>
> Thanks.
>
>
> --
> Paul Bone
> _______________________________________________
> developers mailing list
> developers at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/developers
-------------- next part --------------
diff --git a/configure.ac b/configure.ac
index 472c033..04b74fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3128,16 +3128,14 @@ case "$host" in
                     # architecture for the GCC built-in atomic ops to be
                     # available.
                     CFLAGS_FOR_THREADS="$WIN32_GC_THREADLIB -march=i686"
-                    BOEHM_CFLAGS_FOR_THREADS="-DGC_THREADS
-                        $WIN32_GC_THREADLIB"
+                    BOEHM_CFLAGS_FOR_THREADS="-DGC_THREADS $WIN32_GC_THREADLIB"
                     THREAD_LIBS="-lpthread"
                 else
                     # The compiler is unconditionally linked against the thread
                     # libraries so if pthreads is not present then we need to
                     # set THREAD_LIBS to empty in order to avoid linker errors.
                     CFLAGS_FOR_THREADS="$WIN32_GC_THREADLIB"
-                    BOEHM_CFLAGS_FOR_THREADS="-DGC_THREADS
-                        $WIN32_GC_THREADLIB"
+                    BOEHM_CFLAGS_FOR_THREADS="-DGC_THREADS $WIN32_GC_THREADLIB"
                     THREAD_LIBS=
                 fi
                 ENABLE_BOEHM_THREAD_LOCAL_ALLOC="-DTHREAD_LOCAL_ALLOC"


More information about the developers mailing list