Patchwork [ARM/,configury] Add fall-back check for gnu_unique_object

mail settings
Submitter Ramana Radhakrishnan
Date March 11, 2012, 11:07 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/145975/
State New
Headers show


Ramana Radhakrishnan - March 11, 2012, 11:07 a.m.
On 10 March 2012 00:39, DJ Delorie <> wrote:
>> > Ping -
>> And now really add Paolo and DJ.
> +   [.type foo, '$target_type_format_char'gnu_unique_object],,
> This un-quoting looks incorrect if you don't know what's going on
> under the hood, but I don't see a clean way around it.  A suitable
> comment would be appropriate.

Thanks for the quick review - I thought however
it was kind of a "standard" workaround for this issue
having seen this elsewhere in the same file - given this is used
in multiple places/

> +target_type_format_char="@"
> +       target_type_format_char="%"
> Since the string always has "special" characters, it's likely that
> single quotes are more appropriate here.  The two characters in the
> patch don't care, but some future porter might naively do "$" and
> wonder why (or worse, not wonder why) it doesn't work right.

Fair point  - done.

> Other than that it looks OK to me, assuming you tested it on all the
> relevent targets (i.e. arm and not-arm).

I tested x86_64-linux-gnu with a bootstrap and that showed identical
auto-host.h to the previous run and thus that appeared to be fine.
(This is a target that uses the default '@') .. On ARM I've done a
full bootstrap and auto-host.h shows the appropriate macro defined (
and it does with this version of the patch as well). Are there any
other targets you'd suggest ?

Assuming all tests pass is this version better ?


 2012-03-11  Ramana Radhakrishnan   <>

       * config.gcc (target_type_format_char): New. Document it. Set it for
         arm*-*-* .
       * (gnu_unique_option): Use target_type_format_char in test.
         Comment rationale.
       * configure: Regenerate .
DJ Delorie - March 12, 2012, 6:10 p.m.
Looks OK to me.


diff --git a/gcc/config.gcc b/gcc/config.gcc
index 99f0b47..a769d0c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -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}<property>
+#			directive.
 # The following variables are used in each case-construct to build up the
 # outgoing variables:
@@ -235,6 +240,7 @@  target_gtfiles=
 # Don't carry these over build->host->target.  Please.
@@ -321,6 +327,7 @@  am33_2.0-*-linux*)
 	extra_headers="mmintrin.h arm_neon.h"
+	target_type_format_char='%'
 	extra_options="${extra_options} arm/arm-tables.opt"
diff --git a/gcc/ b/gcc/
index 39302ad..4a534a1 100644
--- a/gcc/
+++ b/gcc/
@@ -4188,7 +4188,9 @@  Valid choices are 'yes' and 'no'.]) ;;
  [gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object,
-   [.type foo, @gnu_unique_object],,
+#We have to unquote here to reuse the variable from 
+   [.type foo, '$target_type_format_char'gnu_unique_object],,
 # Also check for support, i.e. glibc 2.11 or higher.
    [[if test x$host = x$build -a x$host = x$target &&
        ldd --version 2>/dev/null &&