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: Death to configure.frag


neroden@twcny.rr.com (Nathanael Nerode) writes:

> (As a matter of fact, the GCC configure.in is fully 2.5x compatible 
> already, although Alex has some improvements he'd like to make.)

Hm, so is there anything stopping us from cutting over to
AC_PREREQ(2.57) now?  Then I could use the './config.status Makefile'
form which is indeed much less confusing than CONFIG_{FILES,HEADERS}.

>>  I would also like to
>>use per-target variable settings in preference to the $($@-warn) hack.
> Not quite sure how you're planning to do that with pattern rules, so I 
> guess I'll have to wait and see.  :-)

Per-target variable settings are a separate feature, not anything to
do with pattern rules, except for notational similarity.

Basically, right now we have

GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)

...

.-warn = $(STRICT_WARN)
cp-warn = $(STRICT_WARN) $(WERROR)
java-warn = $(WERROR)
...

gcc.o-warn = -Wno-error
jvspec.o-warn = -Wno-error
...

With per-target variable settings, this could instead be done like
this:

GCC_WARN_CFLAGS = $(LOOSE_WARN) $(MAYBE_STRICT_WARN) $(NOCOMMON_FLAG)

MAYBE_STRICT_WARN = $(STRICT_WARN) # default

# per-directory overrides:
cp/%.o   : MAYBE_STRICT_WARN = $(STRICT_WARN) $(WERROR)
java/%.o : MAYBE_STRICT_WARN = $(WERROR)
...

# per-file overrides:
gcc.o    : GCC_WARN_CFLAGS += -Wno-error
jvspec.o : GCC_WARN_CFLAGS += -Wno-error
...

I think this will wind up being less weird and confusing, especially
if we can get bootstrap moved to the top level and gcc/configure
re-run between stages, so that all the 'override this stuff in stage
2 and beyond' mess will go away.

The feature was added in GNU make 3.77, which is safely below Mark's
suggested minimum of 3.79.1.

zw


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