From patchwork Fri Aug 17 12:23:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 178195 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 BAFDD2C008D for ; Fri, 17 Aug 2012 22:23:35 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345811016; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=HS1vvM9BNF5N2vp6rhDeelS+hOY=; b=MajlHTXMahRy118WgYNBQepUPWpt5gy/7cBHr8SIW5Xra97NXGHXuQxx7Rv0/N hxfs1DK4DEf613vLvn7x8czgW3MOY8re/ZTRhkvfq1azpfbUr00fCQdblhif8XFP xndD9089f0anxifsZLew9V92Cylnf3LvJreW0sxEUj37Q= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PO6sW7uIbyVK/tYOEhSD0J62TUDVhR7bkNKiBR/uWhurHf9H9gNO+QgsKnC0pS AdETF4MAytiQlMxBPvCPgmFtjOHb1fscAOKhSi8HwHd/cdzVb8zzCcE4ghrgF690 ZLSwfi8aD3OfCcAoF5LB0U7eyW7uxA4NLb54CNg0XKmrg=; Received: (qmail 6409 invoked by alias); 17 Aug 2012 12:23:26 -0000 Received: (qmail 6396 invoked by uid 22791); 17 Aug 2012 12:23:24 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Aug 2012 12:23:07 +0000 Received: by yenm1 with SMTP id m1so4083904yen.20 for ; Fri, 17 Aug 2012 05:23:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type:x-gm-message-state; bh=O16QxlKPrZuxcOnLkjBmXE7fWYNqYvre671yObqzR1g=; b=TW2J+7WA75+6LvDv8kbRGHzil25QSfIEVWUgFdjB+AptqseraD2pL8R5LGEDROGAwO VDMncaK+MFH5nE0YP53Ylqhs6epEpcScGeQ6Gh2dHGBZ9APpa87z61YIumVSsn1naDei v99c5cgHK/ScytFd6XcG9kHrEB9u2nUImmOOH4lLEqMHztpePqFhIz7wQmWBpg8vUQxF ecRNlvg42cqdzfKh7Bt86eEp48yKrymQ0yZR2+6/lnbkbC7o7AxPFPO9kEBr1uqifq7z wzM5F713btJCycdRwvnTN1+Mum6ng2ldOJiJ0I3Mtph0+6e+lrzIuUG+OPZ5ahjw14ry bhXw== Received: by 10.50.236.4 with SMTP id uq4mr1746347igc.18.1345206185723; Fri, 17 Aug 2012 05:23:05 -0700 (PDT) Received: by 10.50.236.4 with SMTP id uq4mr1746305igc.18.1345206185295; Fri, 17 Aug 2012 05:23:05 -0700 (PDT) Received: from dhcp-172-29-42-237.tor.corp.google.com ([2620:0:101b:9:a92d:d1ca:63b2:1e78]) by mx.google.com with ESMTPS id dk6sm4512204igb.0.2012.08.17.05.23.03 (version=SSLv3 cipher=OTHER); Fri, 17 Aug 2012 05:23:04 -0700 (PDT) Message-ID: <502E37A6.5010000@google.com> Date: Fri, 17 Aug 2012 08:23:02 -0400 From: Diego Novillo User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lance Taylor CC: "Joseph S. Myers" , Magnus Fromreide , gcc-patches@gcc.gnu.org, Richard Guenther , "Iyer, Balaji V" , Hans-Peter Nilsson Subject: Re: [bootstrap] Tentative fix for PR 54281 References: <20120816115551.GA13453@google.com> <20120816175027.GA20994@bacon.lysator.liu.se> <502D3C00.30707@google.com> <502D4365.8010205@google.com> <502D4638.40009@google.com> In-Reply-To: X-Gm-Message-State: ALoCoQm2GggxIFGKSzvYKPDfjLzFCdG3W1ar44mz2QYdP/uSywMf0Hw23KNdrdfwZZ3WI+91Mmqa6MZCo0TLyUI9gC0o6iELft+yFBEYv0JrUTM3vx4HEGw9GB7MeGET9Uhhr1cpRvS2CHjRgeOUNk1nqaQOsEVlp3Mtt3W5JFyxg0xPCG6rvgUPD5vZRyM9yAaGRaaPra4r 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 On 12-08-16 20:29 , Ian Lance Taylor wrote: > I recommend that you add libintl.h to the AC_CHECK_HEADERS list in > gcc/configure.ac Thanks. The attached patch implements the approach. Tested with --disable-nls and --enable-nls. Folks with 4.1 compilers, could you test it there? OK for trunk if testing succeeds? Thanks. Diego. commit 8583ba1f22ba310114bf64960f61f6bcc805e9c2 Author: Diego Novillo Date: Thu Aug 16 14:27:49 2012 -0400 2012-08-17 Diego Novillo PR bootstrap/54281 * configure.ac: Add libintl.h to AC_CHECK_HEADERS list. * config.in: Regenerate. * configure: Regenerate. * intl.h: Always include libintl.h if HAVE_LIBINTL_H is set. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9a81d1..43b0af7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-08-17 Diego Novillo + + PR bootstrap/54281 + * configure.ac: Add libintl.h to AC_CHECK_HEADERS list. + * config.in: Regenerate. + * configure: Regenerate. + * intl.h: Always include libintl.h if HAVE_LIBINTL_H is + set. + 2012-08-17 Richard Guenther * bitmap.h (struct bitmap_element_def): GTY annotate next/prev. @@ -213,7 +222,7 @@ * config/tilegx/feedback.h: New file. * config/tilepro/feedback.h: New file. -2012-08-16 Diego Novillo +2012-08-16 Diego Novillo Revert diff --git a/gcc/config.in b/gcc/config.in index 6d986be..a9417df 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1260,6 +1260,12 @@ #endif +/* Define to 1 if you have the header file. */ +#ifndef USED_FOR_TARGET +#undef HAVE_LIBINTL_H +#endif + + /* Define to 1 if you have the header file. */ #ifndef USED_FOR_TARGET #undef HAVE_LIMITS_H diff --git a/gcc/configure b/gcc/configure index 1585bae..7f3489d 100755 --- a/gcc/configure +++ b/gcc/configure @@ -8248,7 +8248,7 @@ fi for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ sys/resource.h sys/param.h sys/times.h sys/stat.h \ - direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h + direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h libintl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" @@ -17742,7 +17742,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17744 "configure" +#line 17745 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17848,7 +17848,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17850 "configure" +#line 17851 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 579d9a8..6bfbf35 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -912,7 +912,7 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ sys/resource.h sys/param.h sys/times.h sys/stat.h \ - direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h) + direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h libintl.h) # Check for thread headers. AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=]) diff --git a/gcc/intl.h b/gcc/intl.h index c4db354..42ca873 100644 --- a/gcc/intl.h +++ b/gcc/intl.h @@ -27,8 +27,16 @@ # define setlocale(category, locale) (locale) #endif +/* If libintl.h is available, include it before testing for NLS. If we + are building with --disable-nls and another header file includes + libintl.h, the stubs defined down below will cause syntax errors + when parsing libintl.h. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281 + for details. */ +#ifdef HAVE_LIBINTL_H +# include +#endif + #ifdef ENABLE_NLS -#include extern void gcc_init_libintl (void); extern size_t gcc_gettext_width (const char *); #else