From patchwork Tue Oct 1 20:30:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan-Benedict Glaw X-Patchwork-Id: 279575 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E89F02C0082 for ; Wed, 2 Oct 2013 06:31:12 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=W66iHUfVrOdokIKtj YonRhBq/r8DlbyB1RxezQbbTy0s77iQo7oxlI7EVlSBclMyB1YGucKYnZxUI5dUt sRmgOhjxqK56+o697yXp1QLw5/SKs2LhFgs39dlspNvNgToRdIPDNZx/mRzqZGP3 uCgKDoL8/Hzexz8YqAuDQIDTFs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=RddSG1hCzXgesyu6NU/4CEF 3+6M=; b=JxkcSV0QJUrAV0iZT4fIsBo8e+hMk4Xo8NZOXxOmGAsjy858lIqAj5G oB6ddSow+AMXy/AfWFyCkxmpEEOu2JO6XZMUKZSyo9eCLINgm+NxDQR9u6XeFU/Z lrLPbH0SsauXqBRfpC3ejPvHgtjcqsLP4hEbVSMx4qWudPPcUNK4= Received: (qmail 20632 invoked by alias); 1 Oct 2013 20:30:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 20593 invoked by uid 89); 1 Oct 2013 20:30:50 -0000 Received: from lug-owl.de (HELO lug-owl.de) (195.71.106.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 01 Oct 2013 20:30:50 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, NO_RELAYS autolearn=ham version=3.3.2 X-HELO: lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id AE8F3F05D5; Tue, 1 Oct 2013 22:30:44 +0200 (CEST) Date: Tue, 1 Oct 2013 22:30:44 +0200 From: Jan-Benedict Glaw To: gcc-patches@gcc.gnu.org Cc: Tom Tromey Subject: [RFC] [PATCH] Change dependency-generating compiler from $(CC) to $(CXX) in gcc/ Message-ID: <20131001203043.GO16772@lug-owl.de> References: <20131001184929.GN16772@lug-owl.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20131001184929.GN16772@lug-owl.de> X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Tue, 2013-10-01 20:49:30 +0200, Jan-Benedict Glaw wrote: [...] > Since we're using $(CXX) instead of $(CC) these days, I suggest > using CXX instead of CC. A quick check (without regenerating all > configure and Makefile files just changing CC to CXX in gcc/configure) > makes it build properly. (If done properly, some variables will change > their name s/CC/CXX/, so that must be changed in some more files if > done properly.) For gcc/, I prepared this patch, which seems to work: 2013-10-01 Jan-Benedict Glaw gcc/ * configure.ac: Use CXX instead of CC for dependency generation. * Makefile.in: Change CCDEPMODE to CXXDEPMODE. * configure: Regenerate. diff --git a/gcc/configure.ac b/gcc/configure.ac index f216962..105c534 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 f55f1d1..9a6369e 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -309,7 +309,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 @@ -1029,7 +1029,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 @@ -1038,7 +1038,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 2ac0347..0ca79bd 100755 --- a/gcc/configure +++ b/gcc/configure @@ -735,7 +735,7 @@ LDEXP_LIB EXTRA_GCC_LIBS GNAT_LIBEXC COLLECT2_LIBS -CCDEPMODE +CXXDEPMODE DEPDIR am__leading_dot CXXCPP @@ -8762,12 +8762,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 @@ -8789,7 +8789,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 @@ -8834,7 +8834,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 @@ -8846,15 +8846,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