This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gcc/Makefile.in gcc-3_0-branch, pass CFLAGS to stage1_build
At 21:20 26.03.2001, DJ Delorie wrote:
> > - passing CFLAGS to the build sets the flags for stage2+ and target
> libraries
> > - with BOOT_CFLAGS you can override the flags used for stage2+
> > - pass STAGE1_CFLAGS to override flags for stage1 in a native build
>
>STAGE1_CFLAGS is the default not only for stage1, but for a plain old
>"make" as well.
>
>BOOT_FLAGS is for stage[234].
>
>CFLAGS is set (internally) to either STAGE1_CFLAGS or BOOT_FLAGS,
>depending on which stage you are building.
>
>If you just type "make" you are building a stage1. Pass either
>CFLAGS= or STAGE1_CFLAGS=, it doesn't matter which.
>
>If you type "make bootstrap" you pass STAGE1_CFLAGS for the stage1
>compiler, and BOOT_CFLAGS for stage[234]. You *can* pass CFLAGS for
>stage1 instead of STAGE1_CFLAGS, but it'll be more obvious what you
>mean if you don't.
>
> make bootstrap STAGE1_CFLAGS="-g" BOOT_CFLAGS="-O3 -fwhatever"
That won't work from the toplevel as STAGE1_CFLAGS currently isn't passed
down. Moreover Gordon's checked in patch always overrides the CFLAGS passed
to the stage1 with the CFLAGS passed to make, so
make bootstrap CFLAGS="-O2 -g" STAGE1_CFLAGS="-g" BOOT_CFLAGS="-O3
-fwhatever"
currently wouldn't even work if the toplevel Makefile passed down
STAGE1_CFLAGS. Moreover, I looked up the MAKEINFO issue again in the
current sources and it is still broken, MAKEINFO/MAKEINFOFLAGS are used
differently in the various language files and the C "info" target is still
built during stage1 :-(. That means that additionally to
CFLAGS=$(STAGE1_CFLAGS) we have to pass down MAKEINFO=$(MAKEINFO) and
MAKEINFOFLAGS=$(MAKEINFOFLAGS) to stage1.
Franz.