Makefile.in FLAGS_TO_PASS: why pass *_FOR_TARGET variables?
David Edelsohn
dje@watson.ibm.com
Fri Jul 31 00:34:00 GMT 1998
I have been tracking down some build problems on AIX 4.3 and have
become confused about the intent of some of the *_FOR_TARGET variables
passed using FLAGS_TO_PASS. This variable includes a number of flag
variables such as GCC_FOR_TARGET, AR_FOR_TARGET, and RANLIB_FOR_TARGET.
FLAGS_TO_PASS is used when calling subsidiary language Makefiles, but none
of those Makefiles utilize any of the _FOR_TARGET variables other than
GCC_FOR_TARGET.
The "gcc" Makefile defines many variables as their _FOR_TARGET
counterparts because "We always act like a cross-compiler, even when we're
compiling native." It seems to me that passing the _FOR_TARGET variables
has no effect, unless I am missing something. Those variables are used in
the "gcc" Makefile, but nowhere else.
Because AR and RANLIB obtain their correct values in the "gcc"
Makefile, I think that the variables themselves should be passed, as
LDFLAGS and CFLAGS, etc. already are. One could pass
"AR=$(AR_FOR_TARGET)"
but $(AR) already has the correct value, so just pass "AR=$(AR)".
What is the point of passing the _FOR_TARGET variables other than
GCC_FOR_TARGET? The definition and use of FLAGS_TO_PASS in the top-level
directory makes more sense.
Thanks,
David
More information about the Gcc
mailing list