On Wed, Oct 31, 2018 at 10:04 AM, Joseph Myers <jos...@codesourcery.com> wrote:
> On Wed, 31 Oct 2018, Thomas Koenig wrote:
>
>> Am 31.10.18 um 04:26 schrieb Joseph Myers:
>> > This patch (diffs to generated files omitted below) updates GCC to use
>> > autoconf 2.69 and automake 1.15.1.
>>
>> I think this should fix PR 82856.  Maybe you could confirm that this
>> restores automake functionality with perl 5.6.26, and mention the PR
>> in the ChangeLog.
>
> At least, the warnings I saw with an older perl version and automake
> 1.11.x are gone when using 1.15.1.
>
> I've committed this revised patch version, minus the libgo changes
> (note the libgo changes in this version have differences from the
> libgo changes in the previous version).

Thanks.  I committed the libgo changes, with additional subdir-objects
support (which was trivial), as follows.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 265700)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-8dae05f57f3c8249319e3360b10f07dcc2cd57a7
+df841cce9fd271a25269e3514c2e9b61deaf2c4c
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am   (revision 265700)
+++ libgo/Makefile.am   (working copy)
@@ -1224,3 +1224,5 @@ clean-local:
 
 distclean-local:
        find . -name '*.lo.dep' -print | xargs rm -f
+
+include $(top_srcdir)/../multilib.am
Index: libgo/config/go.m4
===================================================================
--- libgo/config/go.m4  (revision 265700)
+++ libgo/config/go.m4  (nonexistent)
@@ -1,92 +0,0 @@
-dnl acinclude.m4 -- configure macros
-
-dnl Copyright 2009 The Go Authors. All rights reserved.
-dnl Use of this source code is governed by a BSD-style
-dnl license that can be found in the LICENSE file.
-
-dnl Go support--this could be in autoconf.
-dnl This version is probably autoconf 2.64 specific.
-
-AC_LANG_DEFINE([Go], [go], [GO], [],
-[ac_ext=go
-ac_compile='$GOC -c $GOCFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
-ac_link='$GOC -o conftest$ac_exeext $GOCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 
>&AS_MESSAGE_LOG_FD'
-ac_compile_gnu=yes
-])
-
-AU_DEFUN([AC_LANG_GO], [AC_LANG(Go)])
-
-m4_define([AC_LANG_PROGRAM(Go)],
-[package main
-$1
-func main() {
-$2
-}])
-
-m4_define([AC_LANG_IO_PROGRAM(Go)],
-[AC_LANG_PROGRAM([import "os"],
-[if f, err := os.Open("conftest.out", os.O_WRONLY), err != nil {
-       os.Exit(1);
- }
- if err := f.Close(); err != nil {
-       os.Exit(1);
- }
- os.Exit(0);
-])])
-
-m4_define([AC_LANG_CALL(Go)],
-[AC_LANG_PROGRAM([$1
-m4_if([$2], [main], ,
-[func $2();])],[$2();])])
-
-m4_define([AC_LANG_FUNC_LINK_TRY(Go)],
-[AC_LANG_PROGRAM(
-[func $1() int;
-var f := $1;
-], [return f();])])
-
-m4_define([AC_LANG_BOOL_COMPILE_TRY(Go)],
-[AC_LANG_PROGRAM([$1], [var test_array @<:@1 - 2 * !($2)@:>@;
-test_array @<:@0@:>@ = 0
-])])
-
-m4_define([AC_LANG_INT_SAVE(Go)],
-[AC_LANG_PROGRAM([$1
-import os
-func longval() long { return $2 }
-func ulongval() ulong { return $2 }],
-[panic("unimplemented")])])
-
-AC_DEFUN([AC_LANG_COMPILER(Go)],
-[AC_REQUIRE([AC_PROG_GO])])
-
-AN_MAKEVAR([GOC], [AC_PROG_GO])
-AN_PROGRAM([gccgo], [AC_PROG_GO])
-AC_DEFUN([AC_PROG_GO],
-[AC_LANG_PUSH(Go)dnl
-AC_ARG_VAR([GOC],   [Go compiler command])dnl
-AC_ARG_VAR([GOCFLAGS], [Go compiler flags])dnl
-_AC_ARG_VAR_LDFLAGS()dnl
-m4_ifval([$1],
-      [AC_CHECK_TOOLS(GOC, [$1])],
-[AC_CHECK_TOOL(GOC, gccgo)
-if test -z "$GOC"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [$ac_tool_prefix}gccgo])
-  fi
-fi
-if test -z "$GOC"; then
-  AC_CHECK_PROG(GOC, gccgo, gccgo, , , gccgo)
-fi
-])
-
-# Provide some information about the compiler.
-_AS_ECHO_LOG([checking for _AC_LANG compiler version])
-set X $ac_compile
-ac_compiler=$[2]
-_AC_DO_LIMIT([$ac_compiler --version >&AS_MESSAGE_LOG_FD])
-m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
-m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
-GOCFLAGS="-g -O2"
-AC_LANG_POP(Go)dnl
-])# AC_PROG_GO
Index: libgo/config/libtool.m4
===================================================================
--- libgo/config/libtool.m4     (revision 265700)
+++ libgo/config/libtool.m4     (working copy)
@@ -1084,7 +1084,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # to the aix ld manual.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+AC_LINK_IFELSE([AC_LANG_SOURCE([AC_LANG_PROGRAM])],[
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
        /^0/ {
@@ -4937,7 +4937,7 @@ _LT_EOF
        # implicitly export all symbols.
         save_LDFLAGS="$LDFLAGS"
         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo 
${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
+        AC_LINK_IFELSE([AC_LANG_SOURCE([int foo(void) {}])],
           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs 
$compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 
func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry 
${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o 
$lib'
         )
         LDFLAGS="$save_LDFLAGS"
Index: libgo/configure.ac
===================================================================
--- libgo/configure.ac  (revision 265700)
+++ libgo/configure.ac  (working copy)
@@ -6,7 +6,6 @@
 
 # Process this file with autoreconf to produce configure.
 
-AC_PREREQ(2.64)
 AC_INIT(package-unused, version-unused,, libgo)
 AC_CONFIG_SRCDIR(Makefile.am)
 AC_CONFIG_HEADER(config.h)
@@ -19,7 +18,7 @@ AM_ENABLE_MULTILIB(, ..)
 AC_CANONICAL_SYSTEM
 target_alias=${target_alias-$host_alias}
 
-AM_INIT_AUTOMAKE([1.9.3 no-define foreign no-dist -Wall -Wno-portability])
+AM_INIT_AUTOMAKE([1.9.3 no-define foreign no-dist subdir-objects -Wall 
-Wno-portability -Wno-override])
 AH_TEMPLATE(PACKAGE, [Name of package])
 AH_TEMPLATE(VERSION, [Version number of package])
 
@@ -248,15 +247,17 @@ case ${host} in
 changequote(,)dnl
   i[34567]86-*-* | x86_64-*-*)
 changequote([,])dnl
-    AC_COMPILE_IFELSE([
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #ifdef __x86_64__
 #error 64-bit
-#endif],
+#endif
+])],
        [GOARCH=386],
-       AC_COMPILE_IFELSE([
+       AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #ifdef __ILP32__
 #error x32
-#endif],
+#endif
+])],
        [GOARCH=amd64],
        [GOARCH=amd64p32]))
     ;;
@@ -267,20 +268,23 @@ changequote([,])dnl
     GOARCH=m68k
     ;;
   mips*-*-*)
-    AC_COMPILE_IFELSE([
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if _MIPS_SIM != _ABIO32
 #error not o32
-#endif],
+#endif
+])],
 [mips_abi="o32"],
-       [AC_COMPILE_IFELSE([
+       [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if _MIPS_SIM != _ABIN32
 #error not n32
-#endif],
+#endif
+])],
 [mips_abi="n32"],
-       [AC_COMPILE_IFELSE([
+       [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if _MIPS_SIM != _ABI64
 #error not n64
-#endif],
+#endif
+])],
 [mips_abi="n64"],
        [AC_MSG_ERROR([unknown MIPS ABI])
 [mips_abi="n32"]])])])
@@ -299,16 +303,18 @@ changequote([,])dnl
     GOARCH=nios2
     ;;
   rs6000*-*-* | powerpc*-*-*)
-    AC_COMPILE_IFELSE([
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #ifdef _ARCH_PPC64
 #error 64-bit
-#endif],
+#endif
+])],
 [GOARCH=ppc],
     [
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__)
 #error 64be
-#endif],
+#endif
+])],
 [GOARCH=ppc64le],
 [GOARCH=ppc64])])
     ;;
@@ -316,10 +322,11 @@ AC_COMPILE_IFELSE([
     GOARCH=riscv64
     ;;
   s390*-*-*)
-    AC_COMPILE_IFELSE([
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if defined(__s390x__)
 #error 64-bit
-#endif],
+#endif
+])],
 [GOARCH=s390],
 [GOARCH=s390x])
     ;;
@@ -330,10 +337,11 @@ AC_COMPILE_IFELSE([
     GOARCH=sh
     ;;
   sparc*-*-*)
-    AC_COMPILE_IFELSE([
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if defined(__sparcv9) || defined(__arch64__)
 #error 64-bit
-#endif],
+#endif
+])],
 [GOARCH=sparc],
 [GOARCH=sparc64])
     ;;
@@ -389,7 +397,7 @@ AC_CACHE_CHECK([whether -fsplit-stack is
 [libgo_cv_c_split_stack_supported],
 [CFLAGS_hold=$CFLAGS
 CFLAGS="$CFLAGS -fsplit-stack"
-AC_COMPILE_IFELSE([[int i;]],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 [libgo_cv_c_split_stack_supported=yes],
 [libgo_cv_c_split_stack_supported=no])
 CFLAGS=$CFLAGS_hold])
@@ -505,7 +513,7 @@ AC_CACHE_CHECK([whether -pthread is supp
 [libgo_cv_lib_pthread],
 [CFLAGS_hold=$CFLAGS
 CFLAGS="$CFLAGS -pthread -L../libatomic/.libs"
-AC_COMPILE_IFELSE([[int i;]],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 [libgo_cv_lib_pthread=yes],
 [libgo_cv_lib_pthread=no])
 CFLAGS=$CFLAGS_hold])
@@ -572,11 +580,11 @@ LIBS="$LIBS_hold"
 
 AC_CACHE_CHECK([for __sync_bool_compare_and_swap_4],
 [libgo_cv_func___sync_bool_compare_and_swap_4],
-[AC_LINK_IFELSE([
+[AC_LINK_IFELSE([AC_LANG_SOURCE([
 typedef unsigned int uint32  __attribute__ ((mode (SI)));
 uint32 i;
 int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
-],
+])],
 [libgo_cv_func___sync_bool_compare_and_swap_4=yes],
 [libgo_cv_func___sync_bool_compare_and_swap_4=no])])
 if test "$libgo_cv_func___sync_bool_compare_and_swap_4" = "yes"; then
@@ -586,11 +594,11 @@ fi
 
 AC_CACHE_CHECK([for __sync_bool_compare_and_swap_8],
 [libgo_cv_func___sync_bool_compare_and_swap_8],
-[AC_LINK_IFELSE([
+[AC_LINK_IFELSE([AC_LANG_SOURCE([
 typedef unsigned int uint64  __attribute__ ((mode (DI)));
 uint64 i;
 int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
-],
+])],
 [libgo_cv_func___sync_bool_compare_and_swap_8=yes],
 [libgo_cv_func___sync_bool_compare_and_swap_8=no])])
 if test "$libgo_cv_func___sync_bool_compare_and_swap_8" = "yes"; then
@@ -600,11 +608,11 @@ fi
 
 AC_CACHE_CHECK([for __sync_fetch_and_add_4],
 [libgo_cv_func___sync_fetch_and_add_4],
-[AC_LINK_IFELSE([
+[AC_LINK_IFELSE([AC_LANG_SOURCE([
 typedef unsigned int uint32  __attribute__ ((mode (SI)));
 uint32 i;
 int main() { return __sync_fetch_and_add (&i, 1); }
-],
+])],
 [libgo_cv_func___sync_fetch_and_add_4=yes],
 [libgo_cv_func___sync_fetch_and_add_4=no])])
 if test "$libgo_cv_func___sync_fetch_and_add_4" = "yes"; then
@@ -614,11 +622,11 @@ fi
 
 AC_CACHE_CHECK([for __sync_add_and_fetch_8],
 [libgo_cv_func___sync_add_and_fetch_8],
-[AC_LINK_IFELSE([
+[AC_LINK_IFELSE([AC_LANG_SOURCE([
 typedef unsigned int uint64  __attribute__ ((mode (DI)));
 uint64 i;
 int main() { return __sync_add_and_fetch (&i, 1); }
-],
+])],
 [libgo_cv_func___sync_add_and_fetch_8=yes],
 [libgo_cv_func___sync_add_and_fetch_8=no])])
 if test "$libgo_cv_func___sync_add_and_fetch_8" = "yes"; then
@@ -632,7 +640,7 @@ AC_CACHE_CHECK([whether compiler support
 [libgo_cv_c_stringops],
 [CFLAGS_hold=$CFLAGS
 CFLAGS="$CFLAGS -minline-all-stringops"
-AC_COMPILE_IFELSE([int i;],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 [libgo_cv_c_stringops=yes],
 [libgo_cv_c_stringops=no])
 CFLAGS=$CFLAGS_hold])
@@ -648,7 +656,7 @@ AC_CACHE_CHECK([whether compiler support
 [libgo_cv_c_fancymath],
 [CFLAGS_hold=$CFLAGS
 CFLAGS="$CFLAGS -mfancy-math-387"
-AC_COMPILE_IFELSE([int i;],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 [libgo_cv_c_fancymath=yes],
 [libgo_cv_c_fancymath=no])
 CFLAGS=$CFLAGS_hold])
@@ -819,7 +827,7 @@ AC_CACHE_CHECK([if compiler supports -Qu
 [libgo_cv_c_unused_arguments],
 [CFLAGS_hold=$CFLAGS
 CFLAGS="$CFLAGS -Qunused-arguments"
-AC_COMPILE_IFELSE([[int i;]],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 [libgo_cv_c_unused_arguments=yes],
 [libgo_cv_c_unused_arguments=no])
 CFLAGS=$CFLAGS_hold])

Reply via email to