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   <ramana.radhakrish...@linaro.org>

       * 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}<property>
+#                      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 &&

Reply via email to