From patchwork Wed Mar 14 15:37:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 146639 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 C0581B6EEC for ; Thu, 15 Mar 2012 02:37:58 +1100 (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=1332344279; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=DvJvwIoOIfc82xEItLcb62EQ1BA=; b=IZVseAf0R7hT6T7u9iM1wGs2VuFBpS9OZJAOUb2dtC9bevYuljMhWkGo8KWkAg O9L7BRDnVb2vs78y0IWvJDY1UKjsTvdrAZcdCq1dGY3H9Mrc21m0HUIg5u2SRIaV IwHNVAxCDzayYYSb0tHcpwx0pa4YfvxxrUBL1/N07ifg0= 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:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc: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=GL9fm4riREZ8sYH2PgCjqTK9s4RT3LSIcSrO4qAZOFAjATXPovkiVCEcf3tUoC jAUC6yx8n+jeLD1JbQvU7A0+jyPogZ2aV5HDubrGXIqvmB8e7NK/ZTG2suntKd8C +60xBBlbn9O//19nkjCHxvmpBW3k5UsaVkfxB6QbIGz9c=; Received: (qmail 11355 invoked by alias); 14 Mar 2012 15:37:53 -0000 Received: (qmail 10863 invoked by uid 22791); 14 Mar 2012 15:37:51 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, TW_SV, URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from mail-fa0-f47.google.com (HELO mail-fa0-f47.google.com) (209.85.161.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Mar 2012 15:37:37 +0000 Received: by faaq2 with SMTP id q2so389165faa.20 for ; Wed, 14 Mar 2012 08:37:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=rSQnUNHvlx5DkAn4S7DMK4D7qK29PAGozk66jv+WK5E=; b=m+mjBXF9bw2V1yjMEhxsRcwQlqv1b1+j1Nkn+1o7mGnTwe6IfkYNfSvnEqS2tAS7OH f9qfkkT9QFjWhduzxXaweuuQ0m32h3odYVVNA3pkDI6A0k0Z8FoY9SyX40x413vU37wD BhT8NfpwKiAVLXWCS1x9OewTobTjP5HhPAFy741wylPUKgOH3BIDOPmowXcpfGLAAU9i PCni7JCkVtSaaqIqZf1ELpsk+L/1wTiY03Xg2wISTBCsDuCMZktJjb0qj7mIn8Uf/PKX XnIpYm9FnQGyUysSd5NA49+MT/UB/WYMohPX1dZaVuSpvFEhHyq2X2mg14ah52qBzdVK uTlg== MIME-Version: 1.0 Received: by 10.224.33.14 with SMTP id f14mr3532308qad.49.1331739455593; Wed, 14 Mar 2012 08:37:35 -0700 (PDT) Received: by 10.224.95.196 with HTTP; Wed, 14 Mar 2012 08:37:35 -0700 (PDT) In-Reply-To: <201203121810.q2CIA7QG012460@greed.delorie.com> References: <201203100039.q2A0dRt3030036@greed.delorie.com> <201203121810.q2CIA7QG012460@greed.delorie.com> Date: Wed, 14 Mar 2012 15:37:35 +0000 Message-ID: Subject: Re: [Patch ARM/ configury] Add fall-back check for gnu_unique_object From: Ramana Radhakrishnan To: DJ Delorie Cc: gcc-patches@gcc.gnu.org, bonzini@gnu.org X-Gm-Message-State: ALoCoQk+CCVUQpsNuT59QlL8ldD0y4nQPIQpHSPT8MJ/+FD+wfcT6Fb0EuptXn1y0AoIy+y1vQvC 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 March 2012 18:10, DJ Delorie wrote: > > Looks OK to me. I was about to commit this into my svn checkout and then realized the patch p4 didn't have the changes to configure - So I regenerated it again and then began a journey into the depths of m4 and autoconf for a bit before I gave up. Empirically I spotted this odd behaviour with gcc_GAS_CHECK_FEATURE and comments - Attached are the 2 alternate patches that I tried and the difference in the configure scripts themselves . I am no m4 expert but it does look like the m4_substr in gcc_GAS_CHECK_FEATURE doesn't really like that comment there. Any ideas anyone ? I must decline any knowledge of m4 at this point and I don't want to commit this until I understand what's going on here. Ramana - correct-configure-output.txt : Patch where everything looks sane. - incorrect-configure-output.txt: Patch where everything looks insane. - Diffs in the configure output : differences in configure files - for ease of viewing. Index: configure.ac =================================================================== --- configure.ac (revision 185343) +++ configure.ac (working copy) @@ -4177,7 +4177,8 @@ esac], [gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object, [elf,2,19,52],, - [.type foo, @gnu_unique_object],, +# We need to unquote above to to use the definition from config.gcc. + [.type foo, '$target_type_format_char'gnu_unique_object],, # Also check for ld.so support, i.e. glibc 2.11 or higher. [[if test x$host = x$build -a x$host = x$target && ldd --version 2>/dev/null && Index: configure =================================================================== --- configure (revision 185343) +++ configure (working copy) @@ -26167,7 +26167,7 @@ then gcc_cv_as_gnu_unique_object=yes fi elif test x$gcc_cv_as != x; then - $as_echo '.type foo, @gnu_unique_object' > conftest.s + $as_echo > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 Index: config.gcc =================================================================== --- config.gcc (revision 185343) +++ config.gcc (working copy) @@ -182,6 +182,11 @@ # the --with-sysroot configure option or the # --sysroot command line option is used this # will be relative to the sysroot. +# target_type_format_char +# The default character to be used for formatting +# the attribute in a +# .type symbol_name, ${t_t_f_c} +# directive. # The following variables are used in each case-construct to build up the # outgoing variables: @@ -232,6 +237,7 @@ need_64bit_hwint= need_64bit_isa= native_system_header_dir=/usr/include +target_type_format_char='@' # Don't carry these over build->host->target. Please. xm_file= @@ -316,6 +322,7 @@ arm*-*-*) cpu_type=arm extra_headers="mmintrin.h arm_neon.h" + target_type_format_char='%' c_target_objs="arm-c.o" cxx_target_objs="arm-c.o" extra_options="${extra_options} arm/arm-tables.opt" --- configure 2012-03-14 15:20:52.591266022 +0000 +++ configure-correct 2012-03-14 15:20:11.035268052 +0000 @@ -26167,7 +26167,7 @@ then gcc_cv_as_gnu_unique_object=yes fi elif test x$gcc_cv_as != x; then - $as_echo > conftest.s + $as_echo '.type foo, '$target_type_format_char'gnu_unique_object' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -26186,7 +26186,8 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5 $as_echo "$gcc_cv_as_gnu_unique_object" >&6; } if test $gcc_cv_as_gnu_unique_object = yes; then - # Also check for ld.so support, i.e. glibc 2.11 or higher. + # We need to unquote above to to use the definition from config.gcc. +# Also check for ld.so support, i.e. glibc 2.11 or higher. if test x$host = x$build -a x$host = x$target && ldd --version 2>/dev/null && glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then Index: configure.ac =================================================================== --- configure.ac (revision 185343) +++ configure.ac (working copy) @@ -4177,7 +4177,8 @@ esac], [gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object, [elf,2,19,52],, - [.type foo, @gnu_unique_object],, + [.type foo, '$target_type_format_char'gnu_unique_object],, +# We need to unquote above to to use the definition from config.gcc. # Also check for ld.so support, i.e. glibc 2.11 or higher. [[if test x$host = x$build -a x$host = x$target && ldd --version 2>/dev/null && Index: configure =================================================================== --- configure (revision 185343) +++ configure (working copy) @@ -26167,7 +26167,7 @@ then gcc_cv_as_gnu_unique_object=yes fi elif test x$gcc_cv_as != x; then - $as_echo '.type foo, @gnu_unique_object' > conftest.s + $as_echo '.type foo, '$target_type_format_char'gnu_unique_object' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -26186,7 +26186,8 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5 $as_echo "$gcc_cv_as_gnu_unique_object" >&6; } if test $gcc_cv_as_gnu_unique_object = yes; then - # Also check for ld.so support, i.e. glibc 2.11 or higher. + # We need to unquote above to to use the definition from config.gcc. +# Also check for ld.so support, i.e. glibc 2.11 or higher. if test x$host = x$build -a x$host = x$target && ldd --version 2>/dev/null && glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then Index: config.gcc =================================================================== --- config.gcc (revision 185343) +++ config.gcc (working copy) @@ -182,6 +182,11 @@ # the --with-sysroot configure option or the # --sysroot command line option is used this # will be relative to the sysroot. +# target_type_format_char +# The default character to be used for formatting +# the attribute in a +# .type symbol_name, ${t_t_f_c} +# directive. # The following variables are used in each case-construct to build up the # outgoing variables: @@ -232,6 +237,7 @@ need_64bit_hwint= need_64bit_isa= native_system_header_dir=/usr/include +target_type_format_char='@' # Don't carry these over build->host->target. Please. xm_file= @@ -316,6 +322,7 @@ arm*-*-*) cpu_type=arm extra_headers="mmintrin.h arm_neon.h" + target_type_format_char='%' c_target_objs="arm-c.o" cxx_target_objs="arm-c.o" extra_options="${extra_options} arm/arm-tables.opt"