Ticket #2019 (closed bug: fixed)
Set GC_DEFAULT_TYPE in config.h instead of on cc command line.
Reported by: | doughera | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | configure | Version: | branch |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | new | Platform: |
Description
In the gen_gc2 branch, the GC to be used is specified at Configure.pl time. The step config::auto::gc.pm currently adds a flag like
-DPARROT_GC_DEFAULT_TYPE=GMS
to the C compiler command line. The attached patch changes it to set a #define in include/parrot/config.h instead. This has two main advantages. First, it is simpler. I was able to remove gc_flag from several places that previously needed to manually add it to the compiler flags. Second, it scales better to other potential Configure steps that might also want to #define things.
The RT ticket linked in TT #1048 goes into much more detail on these issues.
I had to comment out one test in t/steps/gc-01.t because either I don't understand what the test is trying to do, or it's broken. (The test, that is, not the config/auto/gc.pm function that is being tested.) I don't understand the testing infrastructure well enough to figure out what's going on.
Rakudo currently includes 'gc_flag' in its Makefile, though the field is currently empty. This patch retains an empty, useless gc_flag for backwards compatibility.