Message ID | 20131023222142.GT19160@lug-owl.de |
---|---|
State | New |
Headers | show |
On Wed, Oct 23, 2013 at 6:21 PM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote: > Hi! > > When building on gcc111, I tried to use different compilers for my > build robot. This machine has IBM's XL C compiler installed, but not > the C++ compiler. So I used CC=xlC, g++ was auto-detected for CXX. > This led to depmode=aix, but g++ was actually used later on for > calculating dependencies, totally fucking up the build directory > (since it's output was wrongly parsed using aix-style.) Why do you say that the C++ compiler is not installed on gcc111? That statement is incorrect. The AIX XL C++ compiler is xlC, which you mention. Updating the dependencies to C++ makes sense. - David
>>>>> "Jan-Benedict" == Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
Jan-Benedict> I'd like to get some comments on this patch, which works
Jan-Benedict> for me for stage-1 builds with gcc/g++ (on a amd64-linux
Jan-Benedict> box) as well as with xlC/g++ on gcc111 (the mentioned AIX
Jan-Benedict> machine):
FWIW, I believe this patch is correct.
However, I cannot approve it.
Tom
On Wed, 2013-10-23 20:21:50 -0400, David Edelsohn <dje.gcc@gmail.com> wrote: > On Wed, Oct 23, 2013 at 6:21 PM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote: > > When building on gcc111, I tried to use different compilers for my > > build robot. This machine has IBM's XL C compiler installed, but not > > the C++ compiler. So I used CC=xlC, g++ was auto-detected for CXX. > > This led to depmode=aix, but g++ was actually used later on for > > calculating dependencies, totally fucking up the build directory > > (since it's output was wrongly parsed using aix-style.) > > Why do you say that the C++ compiler is not installed on gcc111? That > statement is incorrect. The AIX XL C++ compiler is xlC, which you > mention. > > Updating the dependencies to C++ makes sense. Ah! I thought this would be `xlc++', which is not in $PATH, unlike `xlC', which is. Now I see that xlC is symlinked from /usr/vacpp/bin/xlC, where the `xlc++' also exists (as a symlink to the same file.) That's great, thanks for the notice! So I'll change one instance to use xlC/xlc++ throughout the build. However I still think that the patch itself is correct and thus would like to discuss it to gain final approval. Thanks, JBG
Il 24/10/2013 03:17, Tom Tromey ha scritto: > Jan-Benedict> I'd like to get some comments on this patch, which works > Jan-Benedict> for me for stage-1 builds with gcc/g++ (on a amd64-linux > Jan-Benedict> box) as well as with xlC/g++ on gcc111 (the mentioned AIX > Jan-Benedict> machine): > > FWIW, I believe this patch is correct. > However, I cannot approve it. The patch is okay indeed. Paolo
On Thu, 2013-10-24 10:16:25 +0100, Paolo Bonzini <bonzini@gnu.org> wrote: > Il 24/10/2013 03:17, Tom Tromey ha scritto: > > Jan-Benedict> I'd like to get some comments on this patch, which works > > Jan-Benedict> for me for stage-1 builds with gcc/g++ (on a amd64-linux > > Jan-Benedict> box) as well as with xlC/g++ on gcc111 (the mentioned AIX > > Jan-Benedict> machine): > > > > FWIW, I believe this patch is correct. > > However, I cannot approve it. > > The patch is okay indeed. Thanks, committed as revision r204006. MfG, JBG
diff --git a/gcc/configure.ac b/gcc/configure.ac index 5111109..5e686db 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -974,7 +974,7 @@ AC_CONFIG_COMMANDS([gccdepdir],[ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR]) -ZW_PROG_COMPILER_DEPENDENCIES([CC]) +ZW_PROG_COMPILER_DEPENDENCIES([CXX]) AC_LANG_POP(C++) # -------- diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f0b8c5a..f519455 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -311,7 +311,7 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \ # -------- # Dependency tracking stuff. -CCDEPMODE = @CCDEPMODE@ +CXXDEPMODE = @CXXDEPMODE@ DEPDIR = @DEPDIR@ depcomp = $(SHELL) $(srcdir)/../depcomp @@ -1040,7 +1040,7 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ $(CLOOGINC) $(ISLINC) COMPILE.base = $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) -o $@ -ifeq ($(CCDEPMODE),depmode=gcc3) +ifeq ($(CXXDEPMODE),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 @@ -1049,7 +1049,7 @@ 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) + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base) POSTCOMPILE = endif diff --git a/gcc/configure b/gcc/configure index bedf3b1..1e7bcb6 100755 --- a/gcc/configure +++ b/gcc/configure @@ -737,7 +737,7 @@ LDEXP_LIB EXTRA_GCC_LIBS GNAT_LIBEXC COLLECT2_LIBS -CCDEPMODE +CXXDEPMODE DEPDIR am__leading_dot CXXCPP @@ -8766,12 +8766,12 @@ ac_config_commands="$ac_config_commands depdir" ac_config_commands="$ac_config_commands gccdepdir" -depcc="$CC" am_compiler_list= +depcc="$CXX" am_compiler_list= am_depcomp=$ac_aux_dir/depcomp { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -f "$am_depcomp"; then @@ -8793,7 +8793,7 @@ else # directory. mkdir sub - am_cv_CC_dependencies_compiler_type=none + am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi @@ -8838,7 +8838,7 @@ else # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode + am_cv_CXX_dependencies_compiler_type=$depmode $as_echo "$as_me:$LINENO: success" >&5 break fi @@ -8850,15 +8850,15 @@ else cd .. rm -rf conftest.dir else - am_cv_CC_dependencies_compiler_type=none + am_cv_CXX_dependencies_compiler_type=none fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -if test x${am_cv_CC_dependencies_compiler_type-none} = xnone +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +if test x${am_cv_CXX_dependencies_compiler_type-none} = xnone then as_fn_error "no usable dependency style found" "$LINENO" 5 -else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type +else CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type fi