From patchwork Mon Sep 20 19:22:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralf Wildenhues X-Patchwork-Id: 65249 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]) by ozlabs.org (Postfix) with SMTP id 8B9BEB70CC for ; Tue, 21 Sep 2010 05:22:17 +1000 (EST) Received: (qmail 4359 invoked by alias); 20 Sep 2010 19:22:15 -0000 Received: (qmail 4343 invoked by uid 22791); 20 Sep 2010 19:22:13 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_CX, TW_DC, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mail.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 20 Sep 2010 19:22:09 +0000 Received: (qmail invoked by alias); 20 Sep 2010 19:22:05 -0000 Received: from xdsl-89-0-188-237.netcologne.de (EHLO localhost.localdomain) [89.0.188.237] by mail.gmx.net (mp009) with SMTP; 20 Sep 2010 21:22:05 +0200 Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1OxlwD-0006h0-DS; Mon, 20 Sep 2010 21:22:05 +0200 Date: Mon, 20 Sep 2010 21:22:05 +0200 From: Ralf Wildenhues To: gcc-patches@gcc.gnu.org, paolo.carlini@oracle.com Cc: libstdc++@gcc.gnu.org Subject: [PATCH] Fix libstdc++/45711: --enable-libstdcxx-debug on darwin Message-ID: <20100920192205.GG22704@gmx.de> Mail-Followup-To: Ralf Wildenhues , gcc-patches@gcc.gnu.org, paolo.carlini@oracle.com, libstdc++@gcc.gnu.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2010-08-04) X-IsSubscribed: yes 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 I can reproduce the issue by simulating broken install and mkdir programs. The patch below should fix it. OK for trunk? The 4.5 branch probably has this issue as well, and 4.4 hasn't, because it used older autotools which didn't provide MKDIR_P yet (and mkdir_p is computed differently). There is a workaround: specify absolute $INSTALL at toplevel configure, for example: ../gcc/configure INSTALL="`pwd`/../install-sh -c" With that in mind, I'll leave you to decide whether a backport to 4.5 is desirable. If you agree, I'll do it. Thanks, Ralf Fix PR libstdc++/45711. libstdc++-v3/ChangeLog: 2010-09-20 Ralf Wildenhues PR libstdc++/45711 * src/Makefile.am (stamp-debug): Also adjust possibly-relative file names in MKDIR_P, and, for consistency, also top_build_prefix. * src/Makefile.in: Regenerate. diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index d5194c3..bd748aa 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -421,13 +421,16 @@ endif debugdir = debug # Build a set of debug objects here. +# Take care to fix all possibly-relative paths. stamp-debug: if test ! -d ${debugdir}; then \ mkdir -p ${debugdir}; \ (cd ${debugdir}; \ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \ + -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \ -e 's/srcdir = \.\./srcdir = ..\/../' \ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \ + -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \ -e 's/all-local: build_debug/all-local:/' \ -e 's/install-data-local: install_debug/install-data-local:/' \ < ../Makefile > Makefile) ; \