Subject: Re: setting compiler flags globally?
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Johnny Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 04/04/2005 15:31:58
Julio M. Merino Vidal wrote:
>
> Given that the wrapper framework is used to override the compilers, it
> could also be used to pass the correct flags to each tool, regardless
> what the original program's makefile did.
This is something that would be nice to have, but when I looked at what
it would take to do, the implementation was harder than it looked. It
does us no good to jam ${PKGSRC_CFLAGS} into the wrappers unless those
flags are also filtered through the WRAPPER_TRANSFORMS to remove and
change flags that can cause problems. There is also the question of
where on the command-line these ${PKGSRC_CFLAGS} would go. There is
already an imperfect mechanism _WRAP_EXTRA_ARGS.CC that appends to the
end of the compiler command-line, but that is not always the right thing
to do.
FWIW, I'm in the middle of rewriting the wrapper and compiler frameworks
to fix a PR. I'm still not sure how to address the issue of injecting
arguments into the command-line without making the wrappers have some
deeper understanding of the tools they are wrapping.
Cheers,
-- Johnny Lam <jlam@NetBSD.org>