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: Fix post stage1 Ada flags


Nicolas Roche wrote:
Since GCC has switched to toplevel bootstrap mechanism, all stages are
using the same Ada flags (the one defined for statge 1). The expected
behavior is in fact to ignore warnings during stage1 but not during the
other stages. I have attached a patch to fix the issue.

Here is the changelog entry:
2008-08-13  Nicolas Roche  <roche@adacore.com>

        * configure.ac: Add ADAFLAGS
        * Makefile.in: Add ADAFLAGS and BOOT_ADAFLAGS

Adding BOOT_ADAFLAGS is okay (but you have to add it in Makefile.tpl and regenerate, or just add it to both files).


Adding ADAFLAGS instead is not okay, because the toplevel expects the flags to be set by gcc/ada/gcc-interface/Make-lang.in, where we have already:

  ifeq ($(CROSS),)
  # If not in cross context we are probably doing a bootstrap
  # so disable warnings during stage1
  ADAFLAGS= $(COMMON_ADAFLAGS) -gnatws
  else
  ADAFLAGS= $(COMMON_ADAFLAGS)
  endif

Maybe, the right solution is to have a STAGE1_ADAFLAGS variable and pass it down appropriately. Can you investigate that, or check if it works to only set BOOT_ADAFLAGS?

Testing done:
- boostrap on x86_64-linux
- cross build from x86_64-linux -> powerpc-elf

Should I supply also the changes to the regenerated configure ?

No, thanks.


Paolo


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