Open FGasper opened 3 years ago
The workaround that alh found in #xs is: CCFLAGS => "$Config{ccflags} -o \$@"
.
I don't think there's a good fix that would be backwards-compatible, since this is very long-standing behaviour across many C compilers.
@mohawk2 What if an enum-string were added, like:
OBJECTFILEMODE => 'givendir', # default = 'basedir'
That way authors can adopt the new/fixed behaviour, and nothing will disrupt existing projects.
To be honest, this general area of MakeMaker has proven to be so fragile that I'm worried about any such change causing a lot of breakage.
Having some more compilation infrastructure so we can do this sort of thing in an extension would probably be safer.
If (as I kind of expected) there’s this much aversion to touching the relevant code paths, it’s maybe best just to document the quirk.
Docs would probably be a good idea. Something else to try would be XSMULTI
/XSBUILD
since I expect any OBJECT
will be intended for XS usage.
If I do:
… then
bar.o
gets created in the base dir, not infoo/
.Note that this does compile
foo/bar.c
; it just doesn’t put the object file where it is meant to go.This seems like pretty undesirable behaviour. It seems like it should be either fixed (i.e., put the object file where I said to put it) or at least documented.
If necessary, maybe make the fixed version an opt-in affair?