aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
AgeCommit message (Collapse)AuthorFilesLines
2020-12-15compiler: correct grammar in error messageIan Lance Taylor2-2/+2
For golang/go#43200 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278452
2020-12-15compiler: avoid knock-on errors from invalid interfacesIan Lance Taylor3-9/+37
The test case for this is issue11614.go. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278192
2020-12-15compiler: discard global sink variables with static initializersIan Lance Taylor4-2/+31
This is specifically for the test fixedbugs/issue23781.go, which builds a large static array. The code does compile and work without this change, but it takes a long time and generates a large object file. Discarding the unnecessary static initializer makes this test much faster. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278172
2020-12-15compiler: better error for unexpected digitIan Lance Taylor2-1/+8
A digit character is not invalid in general, but it's not permitted at the start of an identifier. Report a better error message. The test case is issue11359.go in the source repo. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278174
2020-12-11compiler: encode user visible names if necessaryIan Lance Taylor5-59/+144
Avoid putting weird characters into the user visible name. It breaks stabs in particular, and may also cause debugger problems. Instead, encode those names, and use a "g." prefix to tell the debugger. Also dereference the type for the name of a recover thunk, to avoid a pointless '*' that gets encoded. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/277232
2020-12-08libgo: update to 1.15.6 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/276153
2020-12-08compiler: use correct location for iota errorsIan Lance Taylor4-11/+99
Also check for valid array length when reducing len/cap to a constant. For golang/go#8183 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275654
2020-12-07syscall: don't use AF_LINK on hurdIan Lance Taylor1-1/+1
Patch from Svante Signell. Fixes PR go/98153 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275939
2020-12-07compiler: type of string index expression is byteIan Lance Taylor7-25/+53
To make this work from the do_type method, add "byte" and "rune" to the list of known integer types, and look them up that way rather than via gogo->lookup_global. For golang/go#8745 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275653
2020-12-07compiler: don't name type descriptor for alias typeIan Lance Taylor2-2/+2
The test case is https://golang.org/cl/275632. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275652
2020-12-04runtime: update type descriptor name in fieldtrack C support codeIan Lance Taylor1-1/+1
We were using the old name, but nothing noticed because it is a weak reference that is permitted to be nil, so that it works with code that does not use the field tracking library. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275449
2020-12-03compiler: cast comparison function result to expected bool typeIan Lance Taylor3-6/+49
Otherwise cases like type mybool bool var b mybool = [10]string{} == [10]string{} get an incorrect type checking error. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274446
2020-12-03compiler: defer to middle-end for complex divisionIan Lance Taylor3-28/+1
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-12-02compiler: reword "declared and not used" error messageIan Lance Taylor3-3/+3
This is a gofrontend copy of https://golang.org/cl/203282. From the CL 203282 description: "declared and not used" is technically correct, but might confuse the user. Switching "and" to "but" will hopefully create the contrast for the users: they did one thing (declaration), but not the other --- actually using the variable. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273629
2020-12-02compiler: improve mixed named/unnamed parameter error messageIan Lance Taylor2-2/+2
Use the same error as the current gc compiler. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273628
2020-12-02compiler: don't advance past unexpected semicolonIan Lance Taylor2-2/+1
We've already read the unexpected semicolon, so advancing again causes us to skip the next token, causing future errors to be out of sync. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274439
2020-11-30internal/cpu: don't define CacheLinePadSize for mips64xIan Lance Taylor1-1/+1
For libgo the definition comes from the generated file cpugen.go. Fixes PR go/98041 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273866
2020-11-30compiler, runtime: check len/cap for append(s, make(T, l)...)Ian Lance Taylor3-23/+19
The overflow checks done in growslice always reported an error for the capacity argument, even if it was the length argument that overflowed. This change lets the code pass the current issue4085b.go test. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273806
2020-11-30libgo: define SO_RCVTIMEO on 32-bit GNU/LinuxIan Lance Taylor1-1/+1
Fixes golang/go#42872 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273892
2020-11-30compiler: improve error messages for expected curly braceIan Lance Taylor2-4/+4
For golang/go#17328 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273890
2020-11-30compiler: use correct assignment order for type assertionsIan Lance Taylor2-3/+27
For "a, b := v.(T)" we must set a before b. For golang/go#13433 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273906
2020-11-30compiler: always use int context for index valuesIan Lance Taylor2-27/+6
For golang/go#14844 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273889
2020-11-30compiler: better error messages for missing interface methodIan Lance Taylor2-1/+10
For golang/go#10700 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273886
2020-11-30compiler: improve error for import of non-stringIan Lance Taylor2-2/+2
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273867
2020-11-28compiler: avoid follow-on errors for bad typesIan Lance Taylor4-8/+82
Mark bad types as erroneous, to avoid generating further errors. This required some code using array types to check for errors. For https://golang.org/issue/19880 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273626
2020-11-28compiler: better error for x, x := 1, 2Ian Lance Taylor2-4/+12
Was assign.go:59:28: error: multiple assignments to x Now assign.go:59:28: error: ‘x’ repeated on left side of := Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273546
2020-11-25compiler: avoid silent truncation for string(1 << 32)Ian Lance Taylor2-2/+10
In the conversion of a constant integer to a string type, the value of the constant integer was being silently truncated from unsigned long to unsigned int, producing the wrong string value. Add an explicit overflow check to avoid this problem. For golang/go#42790 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272611
2020-11-23log/syslog: correct asm name for C functionIan Lance Taylor1-1/+1
Patch from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272259
2020-11-20libgo: update to Go 1.15.5 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272146
2020-11-21Daily bump.GCC Administrator1-0/+7
2020-11-20compiler, libgo: change mangling schemeIan Lance Taylor12-713/+986
Overhaul the mangling scheme to avoid ambiguities if the package path contains a dot. Instead of using dot both to separate components and to mangle characters, use dot only to separate components and use underscore to mangle characters. For golang/go#41862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/271726
2020-11-20configury: Fix up --enable-link-serialization supportJakub Jelinek1-3/+3
Eric reported that the --enable-link-serialization changes seemed to cause the binaries to be always relinked, for example from the gcc/ directory of the build tree: make [relink of gnat1, brig1, cc1plus, d21, f951, go1, lto1, ...] make [relink of gnat1, brig1, cc1plus, d21, f951, go1, lto1, ...] Furthermore as reported in PR, it can cause problems during make install where make install rebuilds the binaries again. The problem is that for make .PHONY targets are just "rebuilt" always, so it is very much undesirable for the cc1plus$(exeext) etc. dependencies to include .PHONY targets, but I was using them - cc1plus.prev which would depend on some *.serial and e.g. cc1.serial depending on c and c depending on cc1$(exeext). The following patch rewrites this so that *.serial and *.prev aren't .PHONY targets, but instead just make variables. I was worried that the order in which the language makefile fragments are included (which is quite random, what order we get from the filesystem matching */config-lang.in) would be a problem but it seems to work fine - as it uses make = rather than := variables, later definitions are just fine for earlier uses as long as the uses aren't needed during the makefile parsing, but only in the dependencies of make targets and in their commands. 2020-11-20 Jakub Jelinek <jakub@redhat.com> PR other/97911 gcc/ * configure.ac: In SERIAL_LIST use lang words without .serial suffix. Change $lang.prev from a target to variable and instead of depending on *.serial expand to the *.serial variable if the word is in the SERIAL_LIST at all, otherwise to nothing. * configure: Regenerated. gcc/c/ * Make-lang.in (c.serial): Change from goal to a variable. (.PHONY): Drop c.serial. gcc/ada/ * gcc-interface/Make-lang.in (ada.serial): Change from goal to a variable. (.PHONY): Drop ada.serial and ada.prev. (gnat1$(exeext)): Depend on $(ada.serial) rather than ada.serial. gcc/brig/ * Make-lang.in (brig.serial): Change from goal to a variable. (.PHONY): Drop brig.serial and brig.prev. (brig1$(exeext)): Depend on $(brig.serial) rather than brig.serial. gcc/cp/ * Make-lang.in (c++.serial): Change from goal to a variable. (.PHONY): Drop c++.serial and c++.prev. (cc1plus$(exeext)): Depend on $(c++.serial) rather than c++.serial. gcc/d/ * Make-lang.in (d.serial): Change from goal to a variable. (.PHONY): Drop d.serial and d.prev. (d21$(exeext)): Depend on $(d.serial) rather than d.serial. gcc/fortran/ * Make-lang.in (fortran.serial): Change from goal to a variable. (.PHONY): Drop fortran.serial and fortran.prev. (f951$(exeext)): Depend on $(fortran.serial) rather than fortran.serial. gcc/go/ * Make-lang.in (go.serial): Change from goal to a variable. (.PHONY): Drop go.serial and go.prev. (go1$(exeext)): Depend on $(go.serial) rather than go.serial. gcc/jit/ * Make-lang.in (jit.serial): Change from goal to a variable. (.PHONY): Drop jit.serial and jit.prev. ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than jit.serial. gcc/lto/ * Make-lang.in (lto1.serial, lto2.serial): Change from goals to variables. (.PHONY): Drop lto1.serial, lto2.serial, lto1.prev and lto2.prev. ($(LTO_EXE)): Depend on $(lto1.serial) rather than lto1.serial. ($(LTO_DUMP_EXE)): Depend on $(lto2.serial) rather than lto2.serial. gcc/objc/ * Make-lang.in (objc.serial): Change from goal to a variable. (.PHONY): Drop objc.serial and objc.prev. (cc1obj$(exeext)): Depend on $(objc.serial) rather than objc.serial. gcc/objcp/ * Make-lang.in (obj-c++.serial): Change from goal to a variable. (.PHONY): Drop obj-c++.serial and obj-c++.prev. (cc1objplus$(exeext)): Depend on $(obj-c++.serial) rather than obj-c++.serial.
2020-11-19Daily bump.GCC Administrator1-0/+6
2020-11-18configury: --enable-link-serialization supportJakub Jelinek1-2/+5
When performing LTO bootstraps, especially when using tmpfs for /tmp, one can run a machine to halt when using higher levels of parallelism and a large number of FEs, because there are too many concurrent LTO link commands running at the same time and each one of them puts most of the middle-end/backend objects into /tmp. We have --enable-link-mutex configure option, but --enable-link-mutex has a big problem that it decreases number of available jobs by the number of link commands waiting for the lock, so e.g. when doing make -j32 build with 11 different big programs linked with $(LLINKER) we end up with just 22 effective jobs, and with e.g. make -j8 with those 11 different big programs we actually most likely serialize everything during linking onto a single job. The following patch implements a new configure option, --enable-link-serialization, which implements different serialization and as it doesn't use the mutex, just modifying the old option to be implemented differently would be strange. We can deprecate and later remove the old option. The new option doesn't use any shell mutexes, but uses make dependencies. The option is implemented inside of gcc/ configure and Makefiles, which means that even inside of gcc/ make all (as well as e.g. make lto-dump) will serialize and build all previous large binaries when configured this way. One can always make -j32 cc1 DO_LINK_SERIALIZATION= to avoid that. Furthermore, I've implemented the idea I wrote about, so that --enable-link-serialization is the same as --enable-link-serialization=1 and means the large link commands are serialized, one can (the default) --disable-link-serialization which will cause all links to be parallelizable, but one can also --enable-link-serialization=3 etc. which says that at most 3 of the large link commands can run concurrently. And finally I've implemented (only if the serialization is enabled) simple progress bars for the linking. With --enable-link-serialization and e.g. the 5 large links I have in my current tree (cc1, cc1plus, f951, lto1 and lto-dump), before the linking it prints Linking |==-- | 20% and after it Linking |==== | 40% (each == characters stand for already finished links, each -- characters stand for the link being started). With --enable-link-serialization=3 it will change the way the start is printed, one will get: Linking |-- | 0% at the start of cc1 link, Linking |>>-- | 0% at the start of the second large link and Linking |>>>>-- | 0% at the start of the third large link, where the >> characters stand for already pending links. The printing at the end of link command is the same as with the full serialization, i.e. for the above 3: Linking |== | 20% Linking |==== | 40% Linking |====== | 60% but one could actually get them in any order depending on which of those 3 finishes first - to get it 100% accurate I'd need to add some directory with files representing finished links or similar, doesn't seem worth it. 2020-11-18 Jakub Jelinek <jakub@redhat.com> gcc/ * configure.ac: Add $lang.prev rules, INDEX.$lang and SERIAL_LIST and SERIAL_COUNT variables to Make-hooks. (--enable-link-serialization): New configure option. * Makefile.in (DO_LINK_SERIALIZATION, LINK_PROGRESS): New variables. * doc/install.texi (--enable-link-serialization): Document. * configure: Regenerated. gcc/c/ * Make-lang.in (c.serial): New goal. (.PHONY): Add c.serial c.prev. (cc1$(exeext)): Call LINK_PROGRESS. gcc/cp/ * Make-lang.in (c++.serial): New goal. (.PHONY): Add c++.serial c++.prev. (cc1plus$(exeext)): Depend on c++.prev. Call LINK_PROGRESS. gcc/fortran/ * Make-lang.in (fortran.serial): New goal. (.PHONY): Add fortran.serial fortran.prev. (f951$(exeext)): Depend on fortran.prev. Call LINK_PROGRESS. gcc/lto/ * Make-lang.in (lto, lto1.serial, lto2.serial): New goals. (.PHONY): Add lto lto1.serial lto1.prev lto2.serial lto2.prev. (lto.all.cross, lto.start.encap): Remove dependencies. ($(LTO_EXE)): Depend on lto1.prev. Call LINK_PROGRESS. ($(LTO_DUMP_EXE)): Depend on lto2.prev. Call LINK_PROGRESS. gcc/objc/ * Make-lang.in (objc.serial): New goal. (.PHONY): Add objc.serial objc.prev. (cc1obj$(exeext)): Depend on objc.prev. Call LINK_PROGRESS. gcc/objcp/ * Make-lang.in (obj-c++.serial): New goal. (.PHONY): Add obj-c++.serial obj-c++.prev. (cc1objplus$(exeext)): Depend on obj-c++.prev. Call LINK_PROGRESS. gcc/ada/ * gcc-interface/Make-lang.in (ada.serial): New goal. (.PHONY): Add ada.serial ada.prev. (gnat1$(exeext)): Depend on ada.prev. Call LINK_PROGRESS. gcc/brig/ * Make-lang.in (brig.serial): New goal. (.PHONY): Add brig.serial brig.prev. (brig1$(exeext)): Depend on brig.prev. Call LINK_PROGRESS. gcc/go/ * Make-lang.in (go.serial): New goal. (.PHONY): Add go.serial go.prev. (go1$(exeext)): Depend on go.prev. Call LINK_PROGRESS. gcc/jit/ * Make-lang.in (jit.serial): New goal. (.PHONY): Add jit.serial jit.prev. ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS. gcc/d/ * Make-lang.in (d.serial): New goal. (.PHONY): Add d.serial d.prev. (d21$(exeext)): Depend on d.prev. Call LINK_PROGRESS.
2020-11-17cmd/go, cmd/cgo: update gofrontend mangling checksIan Lance Taylor1-1/+1
This is a port of two patches in the master repository. https://golang.org/cl/259298 cmd/cgo: split gofrontend mangling checks into cmd/internal/pkgpath This is a step toward porting https://golang.org/cl/219817 from the gofrontend repo to the main repo. Note that this also corrects the implementation of the v2 mangling scheme to use ..u and ..U where appropriate. https://golang.org/cl/259299 cmd/go: use cmd/internal/pkgpath for gccgo pkgpath symbol For golang/go#37272 For golang/go#41862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/270637
2020-11-12Daily bump.GCC Administrator1-0/+5
2020-11-11Re: Refactor copying decl section namesAlan Modra1-1/+1
* go-gcc.cc (Gcc_backend::global_variable_set_init): Cast NULL to avoid ambiguous overloaded call.
2020-11-10libgo: update to Go 1.15.4 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/268177
2020-11-07Daily bump.GCC Administrator1-0/+5
2020-11-06core: Rename DECL_IS_BUILTIN -> DECL_IS_UNDECLARED_BUILTINNathan Sidwell1-1/+1
In cleaning up C++'s handling of hidden decls, I renamed its DECL_BUILTIN_P, which checks for loc == BUILTINS_LOCATION to DECL_UNDECLARED_BUILTIN_P, because the location gets updated, if user source declares the builtin, and the predicate no longer holds. The original name was confusing me. (The builtin may still retain builtin properties in the redeclaration, and other predicates can still detect that.) I discovered that tree.h had its own variant 'DECL_IS_BUILTIN', which behaves in (almost) the same manner. And therefore has the same mutating behaviour. This patch deletes the C++ one, and renames tree.h's to DECL_IS_UNDECLARED_BUILTIN, to emphasize its non-constantness. I guess _IS_ wins over _P gcc/ * tree.h (DECL_IS_BUILTIN): Rename to ... (DECL_IS_UNDECLARED_BUILTIN): ... here. No need to use SOURCE_LOCUS. * calls.c (maybe_warn_alloc_args_overflow): Adjust for rename. * cfgexpand.c (pass_expand::execute): Likewise. * dwarf2out.c (base_type_die, is_naming_typedef_decl): Likewise. * godump.c (go_decl, go_type_decl): Likewise. * print-tree.c (print_decl_identifier): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise. * xcoffout.c (xcoff_assign_fundamental_type_number): Likewise. gcc/c-family/ * c-ada-spec.c (collect_ada_nodes): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. (collect_ada_node): Likewise. (dump_forward_type): Likewise. * c-common.c (set_underlying_type): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. (user_facing_original_type, c_common_finalize_early_debug): Likewise. gcc/c/ * c-decl.c (diagnose_mismatched_decls): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. (warn_if_shadowing, implicitly_declare, names_builtin_p) (collect_source_refs): Likewise. * c-typeck.c (inform_declaration, inform_for_arg) (convert_for_assignment): Likewise. gcc/cp/ * cp-tree.h (DECL_UNDECLARED_BUILTIN_P): Delete. * cp-objcp-common.c (names_bultin_p): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. * decl.c (decls_match): Likewise. Replace DECL_UNDECLARED_BUILTIN_P with DECL_IS_UNDECLARED_BUILTIN. (duplicate_decls): Likewise. * decl2.c (collect_source_refs): Likewise. * name-lookup.c (anticipated_builtin_p, print_binding_level) (do_nonmember_using_decl): Likewise. * pt.c (builtin_pack_fn_p): Likewise. * typeck.c (error_args_num): Likewise. gcc/lto/ * lto-symtab.c (lto_symtab_merge_decls_1): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. gcc/go/ * go-gcc.cc (Gcc_backend::call_expression): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. libcc1/ * libcc1plugin.cc (address_rewriter): Rename DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. * libcp1plugin.cc (supplement_binding): Likewise.
2020-11-05Daily bump.GCC Administrator1-0/+5
2020-11-04go: disable -fipa-icf-functions by default in Go frontendIan Lance Taylor1-0/+6
Go programs expect to be able to get reliable backtrace information with correct file/line information, but -fipa-icf-functions breaks that because it merges together distinct functions which should have distinct file/line info. * go-lang.c (go_langhook_post_options): Disable -fipa-icf-functions if it was not explicitly enabled.
2020-10-28libgo: handle linking to NetBSD's versioned symbolsNikhil Benesch1-1/+1
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-28syscall: don't build libcall_bsd.go on solarisIan Lance Taylor1-1/+1
This new file was based on master sources that are built for *BSD but not Solaris Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/266017
2020-10-27libgo: update to Go 1.15.3 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265717
2020-10-27compiler, go/internal/gccgoimporter: export notinheap annotationIan Lance Taylor5-9/+28
This is the gofrontend version of https://golang.org/cl/259297. This is required now because that change is in the 1.15.3 release. This requires changing the go/internal/gccgoimporter package, to skip the new annotation. This change will need to be ported to the gc and x/tools repos. For golang/go#41761 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265258
2020-10-27compiler: remove unused Type::in_heap_ member variableIan Lance Taylor2-3/+1
This member variable was added in https://golang.org/cl/46490, but it was never used. The code uses Named_type::in_heap_ instead. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265257
2020-10-26syscall: import additional BSD-specific syscall wrappersNikhil Benesch1-1/+1
Import additional code from upstream for handing system calls on BSD systems. This makes the syscall package on NetBSD complete enough to compile the standard library. Updates golang/go#38538. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
2020-10-23net/http/cgi: merge upstream changes to default env varsNikhil Benesch1-1/+1
Incorporate upstream modifications to the cgi package's set of rules about which environment variables should be inherited by child processes by default on each platform. In particular this permits tests to pass on NetBSD by preserving the value of the LD_LIBRARY_PATH environment variable. This is a partial backport of the following upstream CLs: https://golang.org/cl/263802 https://golang.org/cl/263577 https://golang.org/cl/254740 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/264097
2020-10-21syscall: only compile ptrace varargs shim on LinuxNikhil Benesch1-1/+1
Only compile the __go_ptrace varargs shim on Linux to avoid compilation failures on some other platforms. The C ptrace function is not entirely portable (e.g., NetBSD has `int data` instead of `void* data`), and so far Linux is the only platform that needs the varargs shim. Additionally, make the types in the ptrace and raw_ptrace function declarations match. This makes it more clear that the only difference between the two is that calls via the former are allowed to block while calls via the latter are not. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517