On Sun, Aug 21, 2011 at 4:19 PM, David Edelsohn <dje....@gmail.com> wrote:
> This patch broke bootstrap on AIX.  It emits a ".section" op in
> assembly but ".section" is an ELF syntax op not AIX XCOFF.
>
> FE..initialize_critical:
>        .section        .init_array
>
> varasm.c should not be generating ELF ops for non-ELF targets.
>
> config.log shows:
>
> gcc_cv_initfini_array=yes
> tm_file_list includes initfini-array.h
> tm_include_list includes initfini-array.h
>
> Why is the patch affecting non-ELF targets?  Please fix or revert immediately.
>

I didn't know .init_array section was enabled for AIX.  Does this patch
work for you?

Sorry about the breakage.

-- 
H.J.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 7f29213..843b382 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -3058,9 +3058,13 @@ if test x$with_schedule = x; then
        esac
 fi
 
-# Support --enable-initfini-array.
+# Support --enable-initfini-array for ELF OSes.
 if test x$enable_initfini_array = xyes; then
-  tm_file="${tm_file} initfini-array.h"
+       case "${tm_file}" in
+       *elfos.h*)
+               tm_file="${tm_file} initfini-array.h"
+               ;;
+       esac
 fi
 
 # Validate and mark as valid any --with options supported

Reply via email to