From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75021 invoked by alias); 5 May 2015 00:30:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 75007 invoked by uid 89); 5 May 2015 00:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-yk0-f178.google.com Received: from mail-yk0-f178.google.com (HELO mail-yk0-f178.google.com) (209.85.160.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 05 May 2015 00:30:22 +0000 Received: by ykep21 with SMTP id p21so37230778yke.3 for ; Mon, 04 May 2015 17:30:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/0XqhkqFn2t9CbF2/velqPl3K1+itFgv61z1r5F4VZM=; b=Jtgaym12ZUdUcT7IP38KvnJE29eV41G1ZwKVjaQf6yNQyzyLfbuh+YGxfBOgyl9EY3 j2nCK8qgEqwwcuxuYMSNrI2wDFL08LCGAVn63URf7WrS2s1egOdV/anto8NXwG2JNo2d 4Xz3WVQLdq9ITl9Jp9e0ZAWhzjtkiFqwbrZnXpCtjqR5gqjZ0l4GlW9IuB7inXeyDE7G GwmsZ8X1QFumOZUDtgFKyE5iMNtC9p7XKduq2i2gl/RsOOIcdBitlAYiKFHG1wiaCQ5B w+zw0SBk4rbqWd6ZNb637GjrYsHRxbNj1rN6xA9c52Iv47a2Ox2x1qEMHbI29wh4ia5t DnvQ== X-Gm-Message-State: ALoCoQlvRsiyrAwM8qQLkZQdAiSldhja+Wu8BY6IbrO35X+m6npcege9p8n/1dvBN6tET7aa0b10 MIME-Version: 1.0 X-Received: by 10.170.216.135 with SMTP id i129mr18208316ykf.116.1430785820381; Mon, 04 May 2015 17:30:20 -0700 (PDT) Received: by 10.13.244.6 with HTTP; Mon, 4 May 2015 17:30:20 -0700 (PDT) In-Reply-To: References: Date: Tue, 05 May 2015 00:30:00 -0000 Message-ID: Subject: Re: [PATCH/libiberty] fix build of gdb/binutils with clang. From: Ian Lance Taylor To: Yunlian Jiang Cc: gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00265.txt.bz2 On Mon, May 4, 2015 at 3:49 PM, Yunlian Jiang wrote: > There was a similar disscussion here > https://gcc.gnu.org/ml/gcc/2005-11/msg01190.html That was a discussion about libiberty. Your subject says you have trouble building gdb. Can you describe the exact problem that you are having? What precisely are you doing? What precisely happens? > The problem is in the configure stage, the __GNU_SOURCE is not > defined, and it could not find > the declaration of asprintf. so it make a declaration of asprintf in > libiberty.h. And for the file floatformat.c, > the __GNU_SOURCE is defined, so it could find another asprintf in > /usr/include/bits/stdio2.h, it also includes > libiberty.h. So these two asprintf conflicts when __USE_FORTIFY_LEVEL is set. I think the basic guideline should be that HAVE_DECL_ASPRINTF should be correct. If libiberty compiled with _GNU_SOURCE defined, then it should test HAVE_DECL_ASPRINTF with _GNU_SOURCE defined. If not, then not. So perhaps the problem is that libiberty is compiling some files with _GNU_SOURCE defined and some not. Ian