[Gc] [RFC] patch, MPROTECT_VDB support for Darwin

Boehm, Hans hans.boehm at hp.com
Wed Feb 7 13:02:29 PST 2007

This looks OK to me, thanks.

But I'm not an expert on either Darwin or autoconf conventions.  Other
opinions would be useful.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Andreas Tobler
> Sent: Tuesday, February 06, 2007 12:19 PM
> To: Boehm-gc
> Cc: Bradley Lucier
> Subject: [Gc] [RFC] patch, MPROTECT_VDB support for Darwin
> Hi,
> this patch was a bit expensive until I found out what the 
> reason for the failure could have been. Anyway, in comparison 
> to the duration of the lifetime of this problem it was a 
> short time I needed to find it out ;)
> Here you see the problem:
> https://permalink.gmane.org/gmane.comp.programming.garbage-coll
> ection.boehmgc/848
> Well, the exact reason I still don't understand fully. But I 
> think it has to do with the fact that ld builds multi-modules 
> by default which can not have common symbols. To achieve 
> common symbols we pass -single_module to the linker.
> See here for an explanation about:
> https://developer.apple.com/documentation/DeveloperTools/Concep
> tual/MachOTopics/index.html
> under Executing Mach-O Files. (Search for common symbols)
> I hope I got it right somehow.
> I tested the patch under ppc32 Darwin, i686 and x86_64 
> Darwin. I also tested it under ppc64 Darwin but here I have 
> no luck atm since I'm stuck with something else. I get nasty 
> Bus Errors which I can not isolate.
> Here a big thanks go to Brad Lucier who gave me access to a dual G5. 
> Thanks Brad, I really appreciate.
> The second part of the patch is the preparation for ppc64 
> support for Darwin. Here I pass 3 of 4 tests right now.
> Maybe an experienced thread degugger who owns a G5 can enter 
> the game and help me to track this issue.
> Hans, the introduction of the gc_ldflags, is this the right 
> way to do it? I followed the instructions to add target 
> specific issues there.
> But I did not find another possibility as to add it this way. 
> Well, I could have added it to the configure.ac only but then ....
> I welcome comments!
> Thanks
> Andreas
> 2007-02-06  Andreas Tobler  <a.tobler at schweiz.org>
> 	* configure.host (gc_ldflags): Introduce new 
> gc_ldflags. Use it for
> 	Darwin to pass -Wl,-single_module to the linker.
> 	* configure.ac: Substitue the new GC_LDFLAGS.
> 	* configure: Regenerate.
> 	* Makefile.am (libgc_la_LDFLAGS): Use the GC_LDFLAGS.
> 	* Makefile.in: Regenerate.
> 	* include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
> 	targets. Remove comments.
> 	Prepare ppc64 support for Darwin.

More information about the Gc mailing list