From patchwork Fri Oct 24 04:32:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 402747 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7B528140080 for ; Fri, 24 Oct 2014 15:32:26 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:cc:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=hWy H2Yv7CZFF6LG26xyQhLVhYA3vtusguTUuCeyqRnYLZA1lLQkLDfPF8vDrzd3lYIl C2DA7CpujCR4oRsNQtJtkT8aObORG3hjRFr9Q1feo7Ht1Dk8NieSZgMkxLGUu+/I NQrwy5WAo79B5d14Ok8HonZhA58X0mho8po/lTRU= 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 :message-id:from:to:cc:in-reply-to:subject:mime-version :content-type:content-transfer-encoding; s=default; bh=QLAZT0nGV IbnTIZlaFRk86GPWas=; b=XG2F4AjYBt0InUWEZvXZRIJoaGVJNCQfX6oY5LrDL XJSVUVfUnaCGh2u8e8tz0gzOtDuW4jkE6O3gb3h9R9EzYodFqz05b2YViz4QRaEr 8OrYjnv1R2y8ytXHc5R+X64ravR+rldOJmnU1+GjywTRNb9bWJYYkIs5syCx6b81 tA= Received: (qmail 4562 invoked by alias); 24 Oct 2014 04:32:19 -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 4552 invoked by uid 89); 24 Oct 2014 04:32:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLACK autolearn=no version=3.3.2 X-HELO: bes.se.axis.com Received: from bes.se.axis.com (HELO bes.se.axis.com) (195.60.68.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Oct 2014 04:32:15 +0000 Received: from localhost (localhost [127.0.0.1]) by bes.se.axis.com (Postfix) with ESMTP id E74BF2E457; Fri, 24 Oct 2014 06:32:12 +0200 (CEST) Received: from bes.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bes.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id IgllOsCWsBUx; Fri, 24 Oct 2014 06:32:08 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bes.se.axis.com (Postfix) with ESMTP id 23DCF2E44E; Fri, 24 Oct 2014 06:32:08 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 03FCE104E; Fri, 24 Oct 2014 06:32:08 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id ECB3EFDC; Fri, 24 Oct 2014 06:32:07 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id E984A34053; Fri, 24 Oct 2014 06:32:07 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id s9O4W7QD006212; Fri, 24 Oct 2014 06:32:07 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id s9O4W6AK006208; Fri, 24 Oct 2014 06:32:06 +0200 Date: Fri, 24 Oct 2014 06:32:06 +0200 Message-Id: <201410240432.s9O4W6AK006208@ignucius.se.axis.com> From: Hans-Peter Nilsson To: rguenther@suse.de CC: gcc-patches@gcc.gnu.org, jakub@redhat.com In-reply-to: (message from Richard Biener on Thu, 23 Oct 2014 10:47:43 +0200) Subject: PATCH: fix breakage from "[PATCH] Fix genmatch linking" MIME-Version: 1.0 > From: Richard Biener > Date: Thu, 23 Oct 2014 10:47:43 +0200 > This adds a libcpp host module without NLS and ICONV support > and properly links genmatch against the build libcpp instead of > the host one. > > Bootstrap running on x86_64-unknown-linux-gnu (stage1 all-gcc > finished fine). > > Ok for trunk? > > Thanks, > Richard. > > 2014-10-23 Richard Biener > > * Makefile.def: Add libcpp build module and dependencies. > * configure.ac: Add libcpp build module. > * Makefile.in: Regenerate. > * configure: Likewise. You only exposed a dormant issue, but ever since this commit (nominally, some commit in "(216573:216588]" but I only see this one matching) I see, for cross-builds (to cris-elf): make[2]: Entering directory `/tmp/hpautotest-gcc1/cris-elf/gccobj/build-x86_64-unknown-linux-gnu/libcpp' g++ -I/tmp/hpautotest-gcc1/gcc/libcpp -I. -I/tmp/hpautotest-gcc1/gcc/libcpp/../include -I/tmp/hpautotest-gcc1/gcc/libcpp/include -g -O2 -W -Wall -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -fno-exceptions -fno-rtti -I/tmp/hpautotest-gcc1/gcc/libcpp -I. -I/tmp/hpautotest-gcc1/gcc/libcpp/../include -I/tmp/hpautotest-gcc1/gcc/libcpp/include -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo /tmp/hpautotest-gcc1/gcc/libcpp/charset.c In file included from /tmp/hpautotest-gcc1/gcc/libcpp/system.h:370, from /tmp/hpautotest-gcc1/gcc/libcpp/charset.c:21: /tmp/hpautotest-gcc1/gcc/libcpp/../include/libiberty.h:113: error: new declaration 'char* basename(const char*)' /usr/include/string.h:601: error: ambiguates old declaration 'const char* basename(const char*)' make[2]: *** [charset.o] Error 1 make[2]: Leaving directory `/tmp/hpautotest-gcc1/cris-elf/gccobj/build-x86_64-unknown-linux-gnu/libcpp' make[1]: *** [all-build-libcpp] Error 2 make[1]: Leaving directory `/tmp/hpautotest-gcc1/cris-elf/gccobj' make: *** [all] Error 2 Above that, we have: checking whether basename is declared... (cached) no and above that, we have: make[2]: Leaving directory `/tmp/hpautotest-gcc1/cris-elf/gccobj/build-x86_64-unknown-linux-gnu/fixincludes' mkdir -p -- build-x86_64-unknown-linux-gnu/libcpp Configuring in build-x86_64-unknown-linux-gnu/libcpp configure: loading cache ../config.cache which is apparently set due to (above that, first non-cached): mkdir -p -- build-x86_64-unknown-linux-gnu/libiberty Configuring in build-x86_64-unknown-linux-gnu/libiberty configure: creating cache ../config.cache ... checking whether basename is declared... no Your commit introduces build-subdirectories for cross-builds. Build-subdirs share a config.cache (in build-/config.cache), with subdirs in build- being fixincludes, libcpp and libiberty. But, libiberty and fixincludes are configure-tested and compiled using gcc, while libcpp is compiled with g++, which causes a different set of declarations to be exposed, so the shared config.cache is invalid and its use is bogus. Not sure how this works for native builds. The libcpp configure checks are actually run with gcc which is bogus by itself, but apparently working. I guess the C vs. C++ declaration etc. differences for libcpp are mostly hidden by using _GNU_SOURCE (through AC_USE_SYSTEM_EXTENSIONS), and I'm a bit surprised that's not used for libiberty and fixincludes. Still, a red herring. Aligning those options *may* cause the build to succeed, but I think that'd be too much of sweeping the issue under the carpet. It seems "more correct" to just disable the config.cache sharing between the differently-configured build-subdirectories, as is already is done for host-libraries and target-libraries, even if that may slow down the builds. (Erroring out is infinitely slower. :) Still, I don't understand exactly how your patch introduces build-subdirectories where there were none before. Maybe that "+all-gcc: maybe-all-build-libcpp" was wrong and should be different? Anyway, with this, a cris-elf cross build passes the point of failure; compilers and libraries built, progressing into testing. Ok to commit? toplev: * configure.ac (build_configargs): Don't share config.cache between build subdirs. brgds, H-P Index: configure.ac =================================================================== --- configure.ac (revision 216610) +++ configure.ac (working copy) @@ -2922,8 +2922,10 @@ AC_ARG_VAR([target_configargs], # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor -# desired. -build_configargs="$build_configargs --cache-file=../config.cache ${baseargs}" +# desired. We can't even use the same cache file for all build-side +# libraries, as they're compiled differently; some with C, some with +# C++ or with different feature-enabling options. +build_configargs="$build_configargs --cache-file=./config.cache ${baseargs}" # For host modules, accept cache file option, or specification as blank. case "${cache_file}" in Index: configure =================================================================== --- configure (revision 216610) +++ configure (working copy) @@ -7386,8 +7386,10 @@ tbaseargs="$tbaseargs --disable-option-c # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor -# desired. -build_configargs="$build_configargs --cache-file=../config.cache ${baseargs}" +# desired. We can't even use the same cache file for all build-side +# libraries, as they're compiled differently; some with C, some with +# C++ or with different feature-enabling options. +build_configargs="$build_configargs --cache-file=./config.cache ${baseargs}" # For host modules, accept cache file option, or specification as blank. case "${cache_file}" in