This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -mmacosx-version-min and libgcc


Geoffrey Keating <geoffk@apple.com> writes:

> > For this particular case you just have to define STRIP_FOR_TARGET in
> > the gcc Makefile.  It doesn't have to have precisely the same value as
> > it does at top-level; it just has to work well enough for developers,
> > not for users.
> 
> The problem with this is that there's no equivalent of
> TARGET_FLAGS_TO_PASS.  Exporting to sub-makes is done via environment
> variables, so if you explicitly set anything in the makefile that is
> the setting that wins in a sub-make (for instance, in a stage of a
> bootstrap).

I'm not sure I understand.  AR_FOR_TARGET, for example, is in
BASE_FLAGS_TO_PASS in the top level Makefile.  So it will be
explicitly passed to the gcc Makefile, and will override any setting
in the gcc Makefile.

If your concern is that there is no TARGET_FLAGS_TO_PASS in the gcc
Makefile, I don't see how that matters.  Either it will get the
setting from the top level, as passed explicitly or via MAKEFLAGS, or
it will be using the same setting anyhow since it is using the same
Makefile.

There is a potential problem is gcc calls another Makefile recursively
and that other Makefile needs to use AR_FOR_TARGET, but as far as I
know that never happens.

Can you give a clearer example of what won't work?

> > (But with today's infrastructure, if you want complete safety, have
> > the top level configure script export STRIP_FOR_TARGET, have the gcc
> > configure script pick up STRIP_FOR_TARGET from the environment and
> > cache it (use the same value as top level if uncached) and then
> > substitute STRIP_FOR_TARGET in gcc/Makefile.in.  Then for extra credit
> > do the same for AR_FOR_TARGET and RANLIB_FOR_TARGET.)
> 
> Interestingly, as far as I can tell, there's no existing example of
> this in the GCC build system.  Are there really no other uses of
> *_FOR_TARGET that are supposed to be inherited from the top-level
> makefiles?

We've just never bothered to do it the fully safe way because it's
never mattered.  People who aren't developers always build from the
top level.  People who are developers can look out for themselves.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]