summaryrefslogtreecommitdiff
path: root/libgo/Makefile.in
AgeCommit message (Collapse)Author
2022-04-19libgo: make a couple of sed uses POSIX compliantIan Lance Taylor
Patch from Jonathan Wakely. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/401054
2022-02-18libgo: update to Go1.18rc1 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386594
2022-02-13runtime: call timer functions via syscallIan Lance Taylor
It turns out to be painful to require linking against -lrt on GNU/Linux, as that makes it harder to link Go code into C programs. Instead just call the timer syscalls directly. That is what the upstream library does anyhow. gcc/go/ * gospec.cc: Revert 2022-02-09 change: (RTLIB, RT_LIBRARY): Don't define. (lang_specific_driver): Don't add -lrt if linking statically on GNU/Linux. gotools/ * configure.ac: Revert 2022-02-09 change: (RT_LIBS): Don't define. * Makefile.am (check-runtime): Don't set GOLIBS to $(RT_LIBS). * configure, Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/385475
2022-02-11libgo: update to Go1.18beta2Ian Lance Taylor
gotools/ * Makefile.am (go_cmd_cgo_files): Add ast_go118.go (check-go-tool): Copy golang.org/x/tools directories. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
2021-09-21runtime: set runtime.GOROOT value at build timeIan Lance Taylor
In Go 1.17 the gc toolchain changed to set runtime.GOROOT in cmd/link (previously it was runtime/internal/sys.GOROOT). Do the same in libgo. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/351313 gotools/: * Makefile.am (check-runtime): Add goroot.go to --extrafiles. * Makefile.in: Regenerate.
2021-08-12libgo: update to Go1.17rc2Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
2021-02-25libgo: ensure memmove, memset 8 byte atomicity on ppc64xLynn Boger
Go requires that pointer moves are done 8 bytes at a time, but gccgo uses libc's memmove and memset which does not require that, and there are some cases where an 8 byte move might be done as 4+4. To enforce 8 byte moves for memmove and memset, this adds a C implementation in libgo/runtime for memmove and memset to be used on ppc64le and ppc64. Asm implementations were considered but discarded to avoid different implementations for different target ISAs. Fixes golang/go#41428 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/294931
2021-02-03libgo: install new 1.16 packagesIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/289069
2021-01-29libgo: update to Go1.16rc1Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
2021-01-14libgo: update hurd supportIan Lance Taylor
Patch from Svante Signell. Fixes PR go/98496 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/283692
2020-12-30libgo: update to Go1.16beta1 releaseIan Lance Taylor
This does not yet include support for the //go:embed directive added in this release. * Makefile.am (check-runtime): Don't create check-runtime-dir. (mostlyclean-local): Don't remove check-runtime-dir. (check-go-tool, check-vet): Copy in go.mod and modules.txt. (check-cgo-test, check-carchive-test): Add go.mod file. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
2020-12-03compiler: defer to middle-end for complex divisionIan Lance Taylor
Go used to use slightly different semantics than C99 for complex division, so we used runtime routines to handle the different. The gc compiler has changes its behavior to match C99, so changes ours as well. For golang/go#14644 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274213
2020-10-28libgo: handle linking to NetBSD's versioned symbolsNikhil Benesch
On NetBSD, for backwards compatibility, various libc symbols are renamed to a symbol with a version suffix. For example, this is the (abbreviated) definition of sigaction: int sigaction(...) __asm__ ("__sigaction14") This poses a challenge for libgo, which attempts to link sigaction by way of an "//extern" comment: //extern sigaction func sigaction(...) This results in a reference to the deprecated compatibility symbol "sigaction", rather than the desired "__sigaction14" symbol. This patch introduces a new "//extern-sysinfo" comment to handle this situation. The new mklinknames.awk script scans a package for these comments and outputs a "//go:linkname" directive that links the wrapper to the correct versioned symbol, as determined by parsing the __asm__ annotation on the function's declaration in gen-sysinfo.go. For now, only the following packages are scanned by mklinknames.awk: os os/user runtime syscall gotools/: * Makefile.am (check-runtime): Add runtime_linknames.go to --extrafiles. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265125
2020-10-15libgo: correct Makefile typo in path to x/net/route packageNikhil Benesch
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262342
2020-10-13reflect: ensure uniqueness of type descriptors on AIX.Clément Chigot
On AIX, duplication of type descriptors can occur if one is declared in the libgo and one in the Go program being compiled. The AIX linker isn't able to merge them together as Linux one does. One solution is to always load libgo first but that needs a huge mechanism in gcc core. Thus, this patch ensures that the duplication isn't visible for the end user. In reflect and internal/reflectlite, the comparison of rtypes is made on their name and not only on their addresses. In reflect, toType() function is using a canonicalization map to force rtypes having the same rtype.String() to return the same Type. This can't be made in internal/reflectlite as it needs sync package. But, for now, it doesn't matter as internal/reflectlite is not widely used. Fixes golang/go#39276 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/260158
2020-09-21libgo: don't put golang.org packages in zstdpkglist.goIan Lance Taylor
This ensures that internal/goroot.IsStandardPackage does not treat golang.org packages as being in the standard library. For golang/go#41368 Fixes golang/go#41499 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256319
2020-08-26libgo: add FAT library support for static libraries on AIXClément Chigot
Like shared libraries, AIX static libraries must also have both 32 and 64 bit objects. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/250777
2020-08-12libgo: correctly handle AIX FAT library creationClément Chigot
The previous patch wasn't working everytime. Especially when AR had "-X32_64", the new .so would replace the default one and not just being added. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247377
2020-08-01libgo: update to go1.15rc1Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
2020-07-23libgo: add AIX FAT libraries supportClément Chigot
AIX-style libraries contains both 32 and 64 bit shared objects. This patch follows the adding of FAT libraries support in other gcc libraries (libgcc, listdc++, etc). Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/242957
2020-05-15libgo: only build syscall test with -static if it worksIan Lance Taylor
Test whether -static works, and use it if possible. This time for sure. For PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234024
2020-05-14libgo: only build syscall test with -static on GNU/LinuxIan Lance Taylor
For PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234019
2020-05-13libgo: build syscall test with -staticIan Lance Taylor
This avoids problems finding libgo.so when running the test as root, which invokes the test as a child process in various limited environments. Fixes PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233897
2020-02-16libgo: install internal/reflectlite.goxIan Lance Taylor
This makes it possible to use gccgo to bootstrap Go 1.14. If we don't install this, gccgo can't compile the sort package. Fixes GCC PR go/93679 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219617
2020-01-24libgo: handle --with-toolexeclibdir=.Ian Lance Taylor
Patch by Maciej W. Rozycki. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216239
2020-01-21libgo: update to Go1.14beta1Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2020-01-07compiler, runtime: stop using __go_runtime_errorIan Lance Taylor
Use specific panic functions instead, which are mostly already in the runtime package. Also correct "defer nil" to panic when we execute the defer, rather than throw when we queue it. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213642 From-SVN: r279979
2019-12-06re PR go/92820 (libgo.so.15 has executable stack)Ian Lance Taylor
PR go/92820 runtime: only build go-context for x86 GNU/Linux Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210258 From-SVN: r279063
2019-09-12libgo: update to Go1.13Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698 From-SVN: r275691
2019-09-10libgo: Solaris and x/sys/cpu compatibility fixesIan Lance Taylor
Restore Solaris compatibility fixes lost when internal/x/net/lif moved to golang.org/x/net/lif. Also fix the Makefile for x/net/lif and x/net/route. Change x/sys/cpu to get the cache line size from goarch.sh as the gofrontend version of internal/cpu does. Partially based on work by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194438 From-SVN: r275611
2019-09-09libgo: only build x/sys/cpu/cpu_gccgo.c on x86 systemsIan Lance Taylor
The C file has a build tag, but the procedure we use for building C files ignores build tags. This should fix the libgo build on non-x86 systems. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194378 From-SVN: r275544
2019-09-06libgo: update to Go 1.13beta1 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
2019-08-28runtime: move osinit to GoIan Lance Taylor
This is a step toward updating libgo to 1.13. This adds the 1.13 version of the osinit function to Go code, and removes the corresponding code from the C runtime. This should simplify future updates. Some additional 1.13 code was brought in to simplify this change. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/191717 From-SVN: r275010
2019-08-27libgo: rebuild runtime.inc if mkruntimeinc.sh changesIan Lance Taylor
The Makefile was missing a dependency. Also remove runtime.inc.raw in mostlyclean. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/191958 From-SVN: r274956
2019-06-24compiler: use builtin memcmp directlyIan Lance Taylor
Instead of going through a C function __go_memcmp, we can just use __builtin_memcmp directly. This allows more optimizations in the compiler backend. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183537 From-SVN: r272620
2019-06-21compiler: open code string slice expressionsIan Lance Taylor
Currently a string slice expression is implemented with a runtime call __go_string_slice. Change it to open code it, which is more efficient, and allows the backend to further optimize it. Also omit the write barrier for length-only update (i.e. s = s[:n]). Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182540 From-SVN: r272549
2019-05-31runtime: drop unused C type reflection codeIan Lance Taylor
In particular, drop __go_type_descriptors_equal, which is no longer used, and will be made obsolete by CL 179598. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179858 From-SVN: r271823
2019-05-31runtime: implement cheaper context switch on Linux/AMD64Ian Lance Taylor
Currently, goroutine switches are implemented with libc getcontext/setcontext functions, which saves/restores the machine register states and also the signal context. This does more than what we need, and performs an expensive syscall. This CL implements a simplified version of getcontext/setcontext, in assembly, that only saves/restores the necessary part, i.e. the callee-save registers, and the PC, SP. A simplified version of makecontext, written in C, is also added. Currently this is only implemented on Linux/AMD64. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178298 From-SVN: r271818
2019-05-08runtime: use builtin memmove directlyCherry Zhang
We can use the intrinsic memmove directly, without going through C. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170004 * go-gcc.cc (Gcc_backend::Gcc_backend): Define memmove builtin. From-SVN: r271016
2019-02-28libgo: fix go_export extraction on DarwinIan Lance Taylor
On Darwin, the section name is prefixed with the segment name, __GNU_GO. Reviewed-on: https://go-review.googlesource.com/c/151097 From-SVN: r269271
2019-02-27re PR go/89172 (FAIL: runtime/pprof)Ian Lance Taylor
PR go/89172 internal/cpu, runtime, runtime/pprof: handle function descriptors When using PPC64 ELF ABI v1 a function address is not a PC, but is the address of a function descriptor. The first field in the function descriptor is the actual PC (see http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-DES). The libbacktrace library knows about this, and libgo uses actual PC values consistently except for the helper function funcPC that appears in both runtime and runtime/pprof. This patch fixes funcPC by recording, in the internal/cpu package, whether function descriptors are being used. We have to check for function descriptors using a C compiler check, because GCC can be configured using --with-abi to select the ELF ABI to use. Fixes https://gcc.gnu.org/PR89172 Reviewed-on: https://go-review.googlesource.com/c/162978 From-SVN: r269266
2019-02-01libgo: add configury and sysinfo support for hurdIan Lance Taylor
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160824 From-SVN: r268461
2019-02-01runtime, sync: use __atomic intrinsics instead of __syncIan Lance Taylor
GCC has supported the __atomic intrinsics since 4.7. They are better than the __sync intrinsics in that they specify a memory model and, more importantly for our purposes, they are reliably implemented either in the compiler or in libatomic. Fixes https://gcc.gnu.org/PR52084 Reviewed-on: https://go-review.googlesource.com/c/160820 From-SVN: r268458
2019-01-21libgo: fix building, and some testing, on SolarisIan Lance Taylor
Restore some of the fixes that were applied to golang_org/x/net/lif but were lost when 1.12 moved the directory to internal/x/net/lif. Add support for reading /proc to fetch argc/argv/env for c-archive mode. Reviewed-on: https://go-review.googlesource.com/c/158640 From-SVN: r268130
2019-01-18libgo: update to Go1.12beta2Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/158019 gotools/: * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/: * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. From-SVN: r268084
2018-10-31re PR bootstrap/82856 (--enable-maintainter-mode broken by incompatiblity of ↵Ian Lance Taylor
gcc's required automake and modern Perl) PR bootstrap/82856 libgo: update to autoconf 2.69 and automake 1.15.1 Initial patch from Joseph Myers. Reviewed-on: https://go-review.googlesource.com/c/146417 From-SVN: r265701
2018-09-25internal/bytealg, internal/cpu, internal/poll: portability fixesIan Lance Taylor
In internal/bytealg correct a +build tag to never build indexbyte_generic.go for the gofrontend, where we always use indexbyte_native.go. For internal/cpu let the Makefile define CacheLineSize using goarch.sh, rather than trying to enumerate all the possibilities in cpu_ARCH.go files. In internal/poll call the C fcntl function rather than using SYS_FCNTL. Change mksysinfo.sh to ensure that F_GETPIPE_SZ is always defined, and check that in internal/poll. Reviewed-on: https://go-review.googlesource.com/137256 From-SVN: r264572
2018-09-24libgo: update to Go 1.11Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/136435 gotools/: * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to make sure it is writable. (check-go-tools): Likewise. (check-vet): Copy internal/objabi to check-vet-dir. * Makefile.in: Rebuild. From-SVN: r264546
2018-05-09go/build, cmd/go: update to match recent changes to gcIan Lance Taylor
Several recent changes to the gc version of cmd/go improve the gofrontend support. These changes are partially copies of existing gofrontend differences, and partially new code. This CL makes the gofrontend match the upstream code. The changes included here come from: https://golang.org/cl/111575 https://golang.org/cl/111595 https://golang.org/cl/111635 https://golang.org/cl/111636 For the record, the following recent gc changes are based on code already present in the gofrontend repo: https://golang.org/cl/110915 https://golang.org/cl/111615 For the record, a gc change, partially based on earlier gofrontend work, also with new gc code, was already copied to gofrontend repo in CL 111099: https://golang.org/cl/111097 This moves the generated list of standard library packages from cmd/go/internal/load to go/build. Reviewed-on: https://go-review.googlesource.com/112475 gotools/: * Makefile.am (check-go-tool): Don't copy zstdpkglist.go. * Makefile.in: Rebuild. From-SVN: r260097
2018-05-02libgo: refactor code to enumerate stdlib packagesIan Lance Taylor
Move the list of libgo, gotool, and check-target packages into separate files, then read the file contents as part of the build process on the fly. This is intended to enable other build tooling to share the canonical list of target packages (avoid duplication). Reviewed-on: https://go-review.googlesource.com/89515 libgo: revise rules for runtime.inc generation Refactor code for generating runtime.inc: extract out the relevant commands and place them in a separate shell script ("mkruntimeinc.sh"). Update rules to avoid generating macros whose names begin with "$", such as "#define $sinkconst0 0". Reviewed-on: https://go-review.googlesource.com/85955 From-SVN: r259863