From patchwork Thu Mar 8 10:05:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 145477 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 17691B6ED0 for ; Thu, 8 Mar 2012 21:05:22 +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=1331805924; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received: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=kNkzPmu +N/YrSXpf0tVwL9zW+38=; b=YxmewyUMlYzzJu81c8PPGWMmDRUUEIu3+LUL1sH lfhZpfjbt30dEWV3RvcxlA5ktaoPeGdTsLnbO3ZGR59/J3q6g8UfMEhuaNYqZE7P 0K75PTI0sOcTn7tE0i+bH/dYwiREKb6Aw77tbGaMFn2mku00b++/Kawzd3ProMIp gh+U= 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:MIME-Version:Received:Received: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=SZSYw5Ur4oXQg18wihphMj1VJRxh6g4DaZM+kBPnALkMx0IVdYYdLwICEFssyU ft1bRY2WwicK0ArswkutuZfWYY8ghM3ZdaKa3btbk/aYQ3z94a3v3A81lmIqzDBn F0A2gXdpXuyKTBJ2Ois5QbGdTonClenIQESRP79ActFT4=; Received: (qmail 10052 invoked by alias); 8 Mar 2012 10:05:15 -0000 Received: (qmail 10043 invoked by uid 22791); 8 Mar 2012 10:05:14 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Mar 2012 10:05:01 +0000 Received: by qcso7 with SMTP id o7so203255qcs.20 for ; Thu, 08 Mar 2012 02:05:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.77.76 with SMTP id f12mr1010678qck.91.1331201100308; Thu, 08 Mar 2012 02:05:00 -0800 (PST) Received: by 10.224.95.196 with HTTP; Thu, 8 Mar 2012 02:05:00 -0800 (PST) Date: Thu, 8 Mar 2012 10:05:00 +0000 Message-ID: Subject: [Patch ARM/ configury] Add fall-back check for gnu_unique_object - Default to this for arm-linux-gnueabi From: Ramana Radhakrishnan To: gcc-patches Cc: Richard Earnshaw X-Gm-Message-State: ALoCoQl1q83ej8vfDk/8apGHHGBNQnRXWU2fywJ/Xh+ObPRpEjXQW8QhiNchwE2VgMJSDeuDlRNu 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 Hi, While investigating a report for odd behaviour with a C++ program, I discovered that the automatic checking for gnu_unique_object is broken during bootstrap for arm-linux-gnueabi targets because on ARM '@' is a comment character for the assembler. I do realize this can be worked around with the configure time option but it would be nice to fix this without having to resort to the workaround everytime. Fixed thusly - tested with bootstraps on both arm-linux-gnueabi and verified that auto-host.h has the right definition. Ok ? regards, Ramana 2012-03-07 Ramana Radhakrishnan * config.gcc (target_type_format_char): New. Document it. Set it for arm*-*-* . * configure.ac (gnu_unique_option): Use target_type_format_char in test. * configure: Regenerate . Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 185057) +++ gcc/config.gcc (working copy) @@ -184,6 +184,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: @@ -235,6 +240,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= @@ -321,6 +327,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" Index: gcc/configure =================================================================== --- gcc/configure (revision 185057) +++ gcc/configure (working copy) @@ -26178,7 +26178,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 Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 185057) +++ gcc/configure.ac (working copy) @@ -4187,7 +4187,7 @@ 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],, # 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 &&