From 413b9f70fcde7a42aab99429b7f86199a872ecf3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <clement.chigot@atos.net>
Date: Tue, 7 May 2019 10:11:17 +0200
Subject: [PATCH 1/2] libgo: remove -fno-section-anchors on AIX

Change-Id: I978c711a68a9d5946651781da6fd83af4e5a7cee
---
 libgo/configure    | 12 ++----------
 libgo/configure.ac |  8 --------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/libgo/configure b/libgo/configure
index 06b68b0f..9661cb5a 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -4563,10 +4563,6 @@
 
 case ${host} in
   *-*-aix*)
-    # static hash tables crashes on AIX when libgo is built with O2
-    CFLAGS="$CFLAGS -fno-section-anchors"
-    GOCFLAGS="$GOCFLAGS -fno-section-anchors"
-
     # Check default architecture for FAT library creation
     if test -z "`$CC -x c -E /dev/null -g3 -o - | grep 64BIT`" ; then
         AIX_EXTRA_ARCH='64'
@@ -11353,7 +11349,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11600 "configure"
+#line 11596 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11459,7 +11455,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11706 "configure"
+#line 11702 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 03c07fe8..a361a7a4 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -32,10 +32,6 @@
 
 case ${host} in
   *-*-aix*)
-    # static hash tables crashes on AIX when libgo is built with O2
-    CFLAGS="$CFLAGS -fno-section-anchors"
-    GOCFLAGS="$GOCFLAGS -fno-section-anchors"
-
     # Check default architecture for FAT library creation
     if test -z "`$CC -x c -E /dev/null -g3 -o - | grep 64BIT`" ; then
         AIX_EXTRA_ARCH='64'
-- 
2.17.1

