From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id D0FC13851C36 for ; Thu, 20 Aug 2020 17:44:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D0FC13851C36 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Richard.Earnshaw@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 914A530E; Thu, 20 Aug 2020 10:44:00 -0700 (PDT) Received: from [192.168.1.19] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E9B363F66B; Thu, 20 Aug 2020 10:43:59 -0700 (PDT) Subject: Re: [PATCH] configure: Require C++11 for building code generation tools To: Vaseeharan Vinayagamoorthy , Szabolcs Nagy Cc: "gcc-patches@gcc.gnu.org" References: <20200820125924.GA8397@e109781-lin.cambridge.arm.com> <20200820152557.GB13330@arm.com> <37ECA5CF-D9F4-4C74-A7BB-5668883CC1F2@arm.com> From: "Richard Earnshaw (lists)" Message-ID: Date: Thu, 20 Aug 2020 18:43:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <37ECA5CF-D9F4-4C74-A7BB-5668883CC1F2@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3036.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2020 17:44:09 -0000 On 20/08/2020 18:07, Vaseeharan Vinayagamoorthy wrote: > Hi Szabolcs, > > In the top level gcc config.log, I see: > > configure:5541: checking whether aarch64-none-linux-gnu-g++ supports C++11 features by default > configure:5837: aarch64-none-linux-gnu-g++ -c -g -O2 conftest.cpp >&5 > configure:5837: $? = 0 > configure:5844: result: yes > configure:6542: checking whether g++ supports C++11 features by default > configure:6845: result: yes > > Not sure whether that helps? > I suspect this is a host/build confusion issue. Are you sure that's the compiler used for BUILD? R. > Regards > Vasee > > > On 20/08/2020, 16:26, "Szabolcs Nagy" wrote: > > The 08/20/2020 13:59, Vasee Vinayagamoorthy wrote: > > +# Also require C++11 for building code generation tools. > > +# Do nothing if "${build}" = "${host}", because in this case > > +# CXX_FOR_BUILD="\$(CXX)", and $CXX is already set to the correct value above. > > +if test "${build}" != "${host}"; then > > + saved_CXX=$CXX > > + saved_CXXCPP=$CXXCPP > > + CXX=$CXX_FOR_BUILD > > + CXXCPP= > > + AX_CXX_COMPILE_STDCXX(11) > > + CXX="$CXX -std=c++11" > > + CXX_FOR_BUILD=$CXX > > + CXX=$saved_CXX > > + CXXCPP=$saved_CXXCPP > > +fi > > i think AX_CXX_COMPILE_STDCXX(11) should > set CXX correctly (it seems it would set > it to "g++ -std=gnu++11" instead of > "g++ -std=c++11" but either should work) > > please look at the top level config.log > i think you should look for > > "checking whether g++ supports C++11 features with -std=gnu++11" > > and that check should be successful. >