From 19048871b213e654e53c04edd65236698bf60a58 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 4 Dec 2014 20:39:58 +0000 Subject: [PATCH] Roll gofrontend to 2a85649c19e1. llvm-svn: 223385 --- llgo/third_party/gofrontend/libgo/Makefile.am | 12 ++++---- llgo/third_party/gofrontend/libgo/Makefile.in | 12 ++++---- llgo/third_party/gofrontend/libgo/configure | 35 ++++++++++++++++++++-- llgo/third_party/gofrontend/libgo/configure.ac | 13 ++++++-- .../gofrontend/libgo/go/go/build/syslist.go | 2 +- .../{ => third_party/gofrontend/libgo}/mvifdiff.sh | 5 ++-- llgo/third_party/gofrontend/libgo/testsuite/gotest | 2 +- llgo/third_party/gofrontend/move-if-change | 14 --------- llgo/update_third_party.sh | 3 +- 9 files changed, 61 insertions(+), 37 deletions(-) rename llgo/{ => third_party/gofrontend/libgo}/mvifdiff.sh (59%) delete mode 100755 llgo/third_party/gofrontend/move-if-change diff --git a/llgo/third_party/gofrontend/libgo/Makefile.am b/llgo/third_party/gofrontend/libgo/Makefile.am index c6ee01b..48114d11 100644 --- a/llgo/third_party/gofrontend/libgo/Makefile.am +++ b/llgo/third_party/gofrontend/libgo/Makefile.am @@ -1007,7 +1007,7 @@ s-version: Makefile echo 'const theVersion = "'`$(GOC) --version | sed 1q`'"' >> version.go.tmp echo 'const theGoarch = "'$(GOARCH)'"' >> version.go.tmp echo 'const theGoos = "'$(GOOS)'"' >> version.go.tmp - $(SHELL) $(srcdir)/../move-if-change version.go.tmp version.go + $(SHELL) $(srcdir)/mvifdiff.sh version.go.tmp version.go $(STAMP) $@ go_sort_files = \ @@ -1791,14 +1791,14 @@ s-libcalls: libcalls-list go/syscall/mksyscall.awk $(go_base_syscall_files) rm -f libcalls.go.tmp files=`echo $^ | sed -e 's/libcalls-list//' -e 's|[^ ]*go/syscall/mksyscall.awk||'`; \ $(AWK) -f $(srcdir)/go/syscall/mksyscall.awk $${files} > libcalls.go.tmp - $(SHELL) $(srcdir)/../move-if-change libcalls.go.tmp libcalls.go + $(SHELL) $(srcdir)/mvifdiff.sh libcalls.go.tmp libcalls.go $(STAMP) $@ libcalls-list: s-libcalls-list; @true s-libcalls-list: Makefile rm -f libcalls-list.tmp echo $(go_base_syscall_files) > libcalls-list.tmp - $(SHELL) $(srcdir)/../move-if-change libcalls-list.tmp libcalls-list + $(SHELL) $(srcdir)/mvifdiff.sh libcalls-list.tmp libcalls-list $(STAMP) $@ syscall_arch.go: s-syscall_arch; @true @@ -1807,13 +1807,13 @@ s-syscall_arch: Makefile echo "package syscall" > syscall_arch.go.tmp echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp - $(SHELL) $(srcdir)/../move-if-change syscall_arch.go.tmp syscall_arch.go + $(SHELL) $(srcdir)/mvifdiff.sh syscall_arch.go.tmp syscall_arch.go $(STAMP) $@ sysinfo.go: s-sysinfo; @true s-sysinfo: $(srcdir)/mksysinfo.sh config.h CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(OSCFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh - $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go + $(SHELL) $(srcdir)/mvifdiff.sh tmp-sysinfo.go sysinfo.go $(STAMP) $@ # The epoll struct has an embedded union and is packed on x86_64, @@ -1841,7 +1841,7 @@ s-epoll: Makefile exit 1; ;; \ esac echo '}' >> epoll.go.tmp - $(SHELL) $(srcdir)/../move-if-change epoll.go.tmp epoll.go + $(SHELL) $(srcdir)/mvifdiff.sh epoll.go.tmp epoll.go $(STAMP) $@ if LIBGO_IS_LINUX diff --git a/llgo/third_party/gofrontend/libgo/Makefile.in b/llgo/third_party/gofrontend/libgo/Makefile.in index f42c8f9..259d134 100644 --- a/llgo/third_party/gofrontend/libgo/Makefile.in +++ b/llgo/third_party/gofrontend/libgo/Makefile.in @@ -4392,7 +4392,7 @@ s-version: Makefile echo 'const theVersion = "'`$(GOC) --version | sed 1q`'"' >> version.go.tmp echo 'const theGoarch = "'$(GOARCH)'"' >> version.go.tmp echo 'const theGoos = "'$(GOOS)'"' >> version.go.tmp - $(SHELL) $(srcdir)/../move-if-change version.go.tmp version.go + $(SHELL) $(srcdir)/mvifdiff.sh version.go.tmp version.go $(STAMP) $@ libcalls.go: s-libcalls; @true @@ -4400,14 +4400,14 @@ s-libcalls: libcalls-list go/syscall/mksyscall.awk $(go_base_syscall_files) rm -f libcalls.go.tmp files=`echo $^ | sed -e 's/libcalls-list//' -e 's|[^ ]*go/syscall/mksyscall.awk||'`; \ $(AWK) -f $(srcdir)/go/syscall/mksyscall.awk $${files} > libcalls.go.tmp - $(SHELL) $(srcdir)/../move-if-change libcalls.go.tmp libcalls.go + $(SHELL) $(srcdir)/mvifdiff.sh libcalls.go.tmp libcalls.go $(STAMP) $@ libcalls-list: s-libcalls-list; @true s-libcalls-list: Makefile rm -f libcalls-list.tmp echo $(go_base_syscall_files) > libcalls-list.tmp - $(SHELL) $(srcdir)/../move-if-change libcalls-list.tmp libcalls-list + $(SHELL) $(srcdir)/mvifdiff.sh libcalls-list.tmp libcalls-list $(STAMP) $@ syscall_arch.go: s-syscall_arch; @true @@ -4416,13 +4416,13 @@ s-syscall_arch: Makefile echo "package syscall" > syscall_arch.go.tmp echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp - $(SHELL) $(srcdir)/../move-if-change syscall_arch.go.tmp syscall_arch.go + $(SHELL) $(srcdir)/mvifdiff.sh syscall_arch.go.tmp syscall_arch.go $(STAMP) $@ sysinfo.go: s-sysinfo; @true s-sysinfo: $(srcdir)/mksysinfo.sh config.h CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(OSCFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh - $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go + $(SHELL) $(srcdir)/mvifdiff.sh tmp-sysinfo.go sysinfo.go $(STAMP) $@ # The epoll struct has an embedded union and is packed on x86_64, @@ -4450,7 +4450,7 @@ s-epoll: Makefile exit 1; ;; \ esac echo '}' >> epoll.go.tmp - $(SHELL) $(srcdir)/../move-if-change epoll.go.tmp epoll.go + $(SHELL) $(srcdir)/mvifdiff.sh epoll.go.tmp epoll.go $(STAMP) $@ @go_include@ bufio.lo.dep diff --git a/llgo/third_party/gofrontend/libgo/configure b/llgo/third_party/gofrontend/libgo/configure index 3352c0f..ae98e3d 100755 --- a/llgo/third_party/gofrontend/libgo/configure +++ b/llgo/third_party/gofrontend/libgo/configure @@ -637,6 +637,8 @@ LIBGO_IS_S390X_FALSE LIBGO_IS_S390X_TRUE LIBGO_IS_S390_FALSE LIBGO_IS_S390_TRUE +LIBGO_IS_PPC64LE_FALSE +LIBGO_IS_PPC64LE_TRUE LIBGO_IS_PPC64_FALSE LIBGO_IS_PPC64_TRUE LIBGO_IS_PPC_FALSE @@ -11119,7 +11121,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11122 "configure" +#line 11124 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11225,7 +11227,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11228 "configure" +#line 11230 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13622,6 +13624,7 @@ is_m68k=no mips_abi=unknown is_ppc=no is_ppc64=no +is_ppc64le=no is_s390=no is_s390x=no is_sparc=no @@ -13734,13 +13737,27 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : is_ppc=yes else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) +#error 64be +#endif +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + is_ppc64le=yes +else is_ppc64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$is_ppc" = "yes"; then GOARCH=ppc - else + elif test "$is_ppc64" = "yes"; then GOARCH=ppc64 + else + GOARCH=ppc64le fi ;; s390*-*-*) @@ -13880,6 +13897,14 @@ else LIBGO_IS_PPC64_FALSE= fi + if test $is_ppc64le = yes; then + LIBGO_IS_PPC64LE_TRUE= + LIBGO_IS_PPC64LE_FALSE='#' +else + LIBGO_IS_PPC64LE_TRUE='#' + LIBGO_IS_PPC64LE_FALSE= +fi + if test $is_s390 = yes; then LIBGO_IS_S390_TRUE= LIBGO_IS_S390_FALSE='#' @@ -15691,6 +15716,10 @@ if test -z "${LIBGO_IS_PPC64_TRUE}" && test -z "${LIBGO_IS_PPC64_FALSE}"; then as_fn_error "conditional \"LIBGO_IS_PPC64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LIBGO_IS_PPC64LE_TRUE}" && test -z "${LIBGO_IS_PPC64LE_FALSE}"; then + as_fn_error "conditional \"LIBGO_IS_PPC64LE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LIBGO_IS_S390_TRUE}" && test -z "${LIBGO_IS_S390_FALSE}"; then as_fn_error "conditional \"LIBGO_IS_S390\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/llgo/third_party/gofrontend/libgo/configure.ac b/llgo/third_party/gofrontend/libgo/configure.ac index 6dac4d6..6f2c665 100644 --- a/llgo/third_party/gofrontend/libgo/configure.ac +++ b/llgo/third_party/gofrontend/libgo/configure.ac @@ -194,6 +194,7 @@ is_m68k=no mips_abi=unknown is_ppc=no is_ppc64=no +is_ppc64le=no is_s390=no is_s390x=no is_sparc=no @@ -266,11 +267,18 @@ changequote([,])dnl #ifdef _ARCH_PPC64 #error 64-bit #endif], -[is_ppc=yes], [is_ppc64=yes]) +[is_ppc=yes], + [AC_COMPILE_IFELSE([ +#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) +#error 64be +#endif], +[is_ppc64le=yes],[is_ppc64=yes])]) if test "$is_ppc" = "yes"; then GOARCH=ppc - else + elif test "$is_ppc64" = "yes"; then GOARCH=ppc64 + else + GOARCH=ppc64le fi ;; s390*-*-*) @@ -310,6 +318,7 @@ AM_CONDITIONAL(LIBGO_IS_MIPSN64, test $mips_abi = n64) AM_CONDITIONAL(LIBGO_IS_MIPSO64, test $mips_abi = o64) AM_CONDITIONAL(LIBGO_IS_PPC, test $is_ppc = yes) AM_CONDITIONAL(LIBGO_IS_PPC64, test $is_ppc64 = yes) +AM_CONDITIONAL(LIBGO_IS_PPC64LE, test $is_ppc64le = yes) AM_CONDITIONAL(LIBGO_IS_S390, test $is_s390 = yes) AM_CONDITIONAL(LIBGO_IS_S390X, test $is_s390x = yes) AM_CONDITIONAL(LIBGO_IS_SPARC, test $is_sparc = yes) diff --git a/llgo/third_party/gofrontend/libgo/go/go/build/syslist.go b/llgo/third_party/gofrontend/libgo/go/go/build/syslist.go index 84712bd..bde12a5 100644 --- a/llgo/third_party/gofrontend/libgo/go/go/build/syslist.go +++ b/llgo/third_party/gofrontend/libgo/go/go/build/syslist.go @@ -5,4 +5,4 @@ package build const goosList = "darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows " -const goarchList = "386 amd64 amd64p32 arm arm64 alpha m68k mipso32 mipsn32 mipsn64 mipso64 ppc ppc64 s390 s390x sparc sparc64 " +const goarchList = "386 amd64 amd64p32 arm arm64 alpha m68k mipso32 mipsn32 mipsn64 mipso64 ppc ppc64 ppc64le s390 s390x sparc sparc64 " diff --git a/llgo/mvifdiff.sh b/llgo/third_party/gofrontend/libgo/mvifdiff.sh similarity index 59% rename from llgo/mvifdiff.sh rename to llgo/third_party/gofrontend/libgo/mvifdiff.sh index 1b8bac6..6706e40 100755 --- a/llgo/mvifdiff.sh +++ b/llgo/third_party/gofrontend/libgo/mvifdiff.sh @@ -1,7 +1,8 @@ #!/bin/sh -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. +# Copyright 2014 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. # The mvifdiff.sh script works like the mv(1) command, except # that it does not touch the destination file if its contents diff --git a/llgo/third_party/gofrontend/libgo/testsuite/gotest b/llgo/third_party/gofrontend/libgo/testsuite/gotest index 39beac3..1bcd4b9 100755 --- a/llgo/third_party/gofrontend/libgo/testsuite/gotest +++ b/llgo/third_party/gofrontend/libgo/testsuite/gotest @@ -379,7 +379,7 @@ localname() { { text="T" case "$GOARCH" in - ppc64) text="[TD]" ;; + ppc64*) text="[TD]" ;; esac symtogo='sed -e s/_test/XXXtest/ -e s/.*_\([^_]*\.\)/\1/ -e s/XXXtest/_test/' diff --git a/llgo/third_party/gofrontend/move-if-change b/llgo/third_party/gofrontend/move-if-change deleted file mode 100755 index 1b8bac6..0000000 --- a/llgo/third_party/gofrontend/move-if-change +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. - -# The mvifdiff.sh script works like the mv(1) command, except -# that it does not touch the destination file if its contents -# are the same as the source file. - -if cmp -s "$1" "$2" ; then - rm "$1" -else - mv "$1" "$2" -fi diff --git a/llgo/update_third_party.sh b/llgo/update_third_party.sh index c189d40a..0c55935 100755 --- a/llgo/update_third_party.sh +++ b/llgo/update_third_party.sh @@ -1,7 +1,7 @@ #!/bin/sh -e gofrontendrepo=https://code.google.com/p/gofrontend -gofrontendrev=82f97044669e +gofrontendrev=2a85649c19e1 gccrepo=svn://gcc.gnu.org/svn/gcc/trunk gccrev=216268 @@ -48,7 +48,6 @@ mkdir -p third_party/gofrontend/include third_party/gofrontend/libgcc cp include/dwarf2.h third_party/gofrontend/include/ cp include/filenames.h third_party/gofrontend/include/ cp include/unwind-pe.h third_party/gofrontend/libgcc/ -cp mvifdiff.sh third_party/gofrontend/move-if-change cp ../../autoconf/config.guess third_party/gofrontend/ cp ../../autoconf/config.sub third_party/gofrontend/ -- 2.7.4