libgo: change build procedure to use build tags
authorIan Lance Taylor <ian@gcc.gnu.org>
Sat, 6 Aug 2016 00:36:33 +0000 (00:36 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Sat, 6 Aug 2016 00:36:33 +0000 (00:36 +0000)
commite0f69f36ea1e068cb9aa48ea0d274b98530f2488
tree8925fdf222aa5a7635a6eb748602b694043eafb7
parentd712e9a7e2ec4de5e6e9f72b85b620e719757ee3
libgo: change build procedure to use build tags

    Previously the libgo Makefile explicitly listed the set of files to
    compile for each package.  For packages that use build tags, this
    required a lot of awkward automake conditionals in the Makefile.

    This CL changes the build to look at the build tags in the files.
    The new shell script libgo/match.sh does the matching.  This required
    adjusting a lot of build tags, and removing some files that are never
    used.  I verified that the exact same sets of files are compiled on
    amd64 GNU/Linux.  I also tested the build on i386 Solaris.

    Writing match.sh revealed some bugs in the build tag handling that
    already exists, in a slightly different form, in the gotest shell
    script.  This CL fixes those problems as well.

    The old code used automake conditionals to handle systems that were
    missing strerror_r and wait4.  Rather than deal with those in Go, those
    functions are now implemented in runtime/go-nosys.c when necessary, so
    the Go code can simply assume that they exist.

    The os testsuite looked for dir_unix.go, which was never built for gccgo
    and has now been removed.  I changed the testsuite to look for dir.go
    instead.

    Reviewed-on: https://go-review.googlesource.com/25546

From-SVN: r239189
109 files changed:
gcc/go/gofrontend/MERGE
libgo/Makefile.am
libgo/Makefile.in
libgo/go/crypto/aes/aes_gcm.go
libgo/go/crypto/aes/cipher_amd64.go
libgo/go/crypto/aes/cipher_generic.go
libgo/go/crypto/aes/cipher_s390x.go
libgo/go/crypto/elliptic/p256.go
libgo/go/crypto/elliptic/p256_amd64.go
libgo/go/crypto/md5/md5block_decl.go
libgo/go/crypto/md5/md5block_generic.go
libgo/go/crypto/rc4/rc4_asm.go
libgo/go/crypto/rc4/rc4_ref.go
libgo/go/crypto/sha1/fallback_test.go
libgo/go/crypto/sha1/sha1block_amd64.go
libgo/go/crypto/sha1/sha1block_decl.go
libgo/go/crypto/sha1/sha1block_generic.go
libgo/go/crypto/sha1/sha1block_s390x.go
libgo/go/crypto/sha256/sha256block_decl.go
libgo/go/crypto/sha256/sha256block_generic.go
libgo/go/crypto/sha256/sha256block_s390x.go
libgo/go/crypto/sha512/fallback_test.go
libgo/go/crypto/sha512/sha512block_decl.go
libgo/go/crypto/sha512/sha512block_generic.go
libgo/go/crypto/sha512/sha512block_s390x.go
libgo/go/hash/crc32/crc32_amd64.go
libgo/go/hash/crc32/crc32_generic.go
libgo/go/log/syslog/syslog_libc.go
libgo/go/log/syslog/syslog_unix.go
libgo/go/math/big/arith_decl.go
libgo/go/math/big/arith_decl_pure.go
libgo/go/math/floor_asm.go
libgo/go/net/fd_select.go [deleted file]
libgo/go/net/newpollserver_rtems.go
libgo/go/os/dir_largefile.go
libgo/go/os/dir_regfile.go
libgo/go/os/dir_unix.go [deleted file]
libgo/go/os/os_test.go
libgo/go/os/stat.go
libgo/go/os/stat_atim.go
libgo/go/os/stat_atimespec.go
libgo/go/os/stat_solaris.go
libgo/go/os/sys_uname.go
libgo/go/runtime/cgo_mips64x.go [deleted file]
libgo/go/runtime/cgo_mmap.go
libgo/go/runtime/cgo_ppc64x.go [deleted file]
libgo/go/runtime/cgocheck.go
libgo/go/runtime/defs_linux_mips64x.go [deleted file]
libgo/go/runtime/defs_linux_s390x.go [deleted file]
libgo/go/runtime/defs_plan9_arm.go [deleted file]
libgo/go/runtime/fastlog2.go
libgo/go/runtime/fastlog2table.go
libgo/go/runtime/lfstack_64bit.go
libgo/go/runtime/mmap.go
libgo/go/runtime/msan.go [deleted file]
libgo/go/runtime/msan0.go
libgo/go/runtime/mstkbar.go
libgo/go/runtime/os_android.go [deleted file]
libgo/go/runtime/os_linux_generic.go [deleted file]
libgo/go/runtime/os_linux_mips64x.go [deleted file]
libgo/go/runtime/os_linux_noauxv.go [deleted file]
libgo/go/runtime/os_linux_s390x.go [deleted file]
libgo/go/runtime/os_netbsd_386.go [deleted file]
libgo/go/runtime/os_netbsd_amd64.go [deleted file]
libgo/go/runtime/os_plan9_arm.go [deleted file]
libgo/go/runtime/print.go
libgo/go/runtime/signal2_unix.go
libgo/go/runtime/signal_linux_mips64x.go [deleted file]
libgo/go/runtime/signal_linux_s390x.go [deleted file]
libgo/go/runtime/signal_mips64x.go [deleted file]
libgo/go/runtime/signal_sigtramp.go
libgo/go/runtime/sigtab_linux_generic.go [deleted file]
libgo/go/runtime/sigtab_linux_mips64x.go [deleted file]
libgo/go/runtime/stack.go
libgo/go/runtime/sys_mips64x.go [deleted file]
libgo/go/runtime/sys_nonppc64x.go [deleted file]
libgo/go/runtime/sys_s390x.go [deleted file]
libgo/go/runtime/vlrt.go [deleted file]
libgo/go/runtime/write_err.go [deleted file]
libgo/go/runtime/write_err_android.go [deleted file]
libgo/go/strings/strings_amd64.go
libgo/go/strings/strings_generic.go
libgo/go/syscall/errstr.go
libgo/go/syscall/errstr_linux.go
libgo/go/syscall/errstr_nor.go [deleted file]
libgo/go/syscall/exec_bsd.go
libgo/go/syscall/exec_stubs.go
libgo/go/syscall/libcall_bsd.go
libgo/go/syscall/libcall_irix.go
libgo/go/syscall/libcall_linux_ustat.go
libgo/go/syscall/libcall_posix_largefile.go
libgo/go/syscall/libcall_posix_regfile.go
libgo/go/syscall/libcall_posix_utimesnano.go
libgo/go/syscall/libcall_uname.go
libgo/go/syscall/libcall_waitpid.go [deleted file]
libgo/go/syscall/msan.go [deleted file]
libgo/go/syscall/sleep_rtems.go
libgo/go/syscall/sleep_select.go
libgo/go/syscall/socket_bsd.go
libgo/go/syscall/socket_irix.go
libgo/go/syscall/socket_linux_ppc64x_type.go
libgo/go/syscall/socket_linux_type.go
libgo/go/syscall/socket_posix.go
libgo/go/syscall/socket_xnet.go
libgo/go/syscall/syscall_stubs.go
libgo/godeps.sh
libgo/match.sh [new file with mode: 0755]
libgo/runtime/go-nosys.c
libgo/testsuite/gotest