On 9-Dec-04, at 9:51 AM, Kelley Cook wrote:
Third iteration at fixing the duplicate PACKAGE warnings from boehm-gc should be the charm. The change from the second iteration is that this time I grab all the GC_*_THREADS definitions too.
Tom,
My first iteration did as you recently suggested and copied everything except PACKAGE and VERSION.
Both Nathanael and Bryce said that the logic for the generated file should be to only include definitions that we wish to externally present as opposed to only excluding those we know are problematic. I personally agree with them.
Indeed. I'd like to "fix" the GC so that it doesn't rely on things like THREADS_* being defined when we include its headers. It appears that the only problem with my original patch was naming the GC's config file "config.h". This meant that the "#include <config.h>" in gc.h resolved to libjava's config.h and not the GC's, when gc.h was included from libjava - oops.
Your patch should certainly work, but I don't like it so much because doing it with a grep in the Makefile obfuscates things somewhat - ie it won't be immediately obvious to future hackers precisely what is going on. Note that the only flag that should be needed externally by libjava is THREAD_LOCAL_ALLOC, so I think it would be better to make this explicit in gc_config.h. ie: use the original patch combined with your naming convention for the GC's config files. I'll test a patch to do this and post it soon.
Bootstrapped and regtested on powerpc-apple-darwin7.6.0
OK to install? The hundreds of libjava warnings are a regression that I caused, though I do not believe that there is a PR associated with the problem.
BTW: Bryce, is CVS's PR18699.out supposed to be a zero byte file?
Yes.
Regards
Bryce