This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v4 04/20] add configury
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, bonzini at gnu dot org
- Date: Fri, 27 Sep 2013 22:45:55 +0300 (EEST)
- Subject: Re: [PATCH v4 04/20] add configury
- Authentication-results: sourceware.org; auth=none
- References: <1379945520-3839-1-git-send-email-tromey at redhat dot com> <1379945520-3839-5-git-send-email-tromey at redhat dot com>
Hi Tom,
On Mon, 23 Sep 2013, Tom Tromey wrote:
> This adds the configury needed for automatic dependency tracking. It
> also adds some bits to the Makefile so we can begin converting
> (removing) explicit dependencies.
>
> * Makefile.in (CCDEPMODE, DEPDIR, depcomp, COMPILE.base)
> (COMPILE, POSTCOMPILE): New variables.
> (.cc.o .c.o): Use COMPILE, POSTCOMPILE.
I believe this may be breaking all my testers on FreeBSD
(i386-unknown-freebsd10.0 for example). The timing of when this
patchset went in fits pretty much when my builds started to break
and I am wondering about some code.
Here is the failure mode:
gmake[2]: Entering directory `/scratch/tmp/gerald/OBJ-0927-1848/gcc'
g++ -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
-DHAVE_CONFIG_H -I. -Ic -I/scratch/tmp/gerald/gcc-HEAD/gcc ...[-I
options]...
-o c/c-lang.o -MT c/c-lang.o -MMD -MP -MF c/.deps/c-lang.TPo
/scratch/tmp/gerald/gcc-HEAD/gcc/c/c-lang.c
cc1plus: error: unrecognized command line option "-Wno-narrowing"
gmake[2]: *** [c/c-lang.o] Error 1
gmake[1]: *** [install-gcc] Error 2
gmake: *** [install] Error 2
The issue is the invocation of g++ (the old system compiler, not what
we built) with -Wno-narrowing (a new option).
And looking at the code, I see
+COMPILE.base = $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) -o $@
+ifeq ($(CCDEPMODE),depmode=gcc3)
+# Note a subtlety here: we use $(@D) for the directory part, to make
+# things like the go/%.o rule work properly; but we use $(*F) for the
+# file part, as we just want the file part of the stem, not the entire
+# file name.
+COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo
+POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
+else
+COMPILE = source='$<' object='$@' libtool=no \
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) $(COMPILE.base)
+POSTCOMPILE =
+endif
Where does $(ALL_COMPILERFLAGS) compile from? If I read the code
right, we do disable these warnings for the stage1 build. However,
the install compiler is the same -- so I guess we should disable
warnings there, too?
Gerald