Commit Graph

129 Commits

Author SHA1 Message Date
Ian Lance Taylor
2850beb940 syscall: Add ioctl consts from if_tun.h
During the gccgo build define constants from
    some header files are processed by mksysinfo.sh and
    added to syscall.go.  In some cases the constants
    are based on macros which are not processed
    correctly by mksysinfo.sh.  This adds the support
    to generate the correct values for the TUN* constants
    from linux/if_tun.h.
    
    Fixes golang/go#11707
    
    Reviewed-on: https://go-review.googlesource.com/12491

From-SVN: r226196
2015-07-25 00:01:04 +00:00
Ian Lance Taylor
5d22575b1b mksysinfo.sh: Define Solaris zone_net_addr_t struct.
From Rainer Orth.

From-SVN: r221920
2015-04-08 14:17:13 +00:00
Ian Lance Taylor
898c81f831 mksysinfo.sh: Remove _zone_net_addr_t handling.
From Rainer Orth.

The recent godump changes broke Solaris 11.1+ bootstrap in
libgo: before, gen-sysinfo.so had

type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru struct { znau_addr6 _in6_addr; }; }

which was filtered out by mksysinfo.sh due to the use of
_in6_addr.

After the change, there's now

type _zone_net_addr_t struct { zna_family uint16; zna_plen uint16; zna_addru struct { znau_addr6 [16]byte; Godump_0_align [0]uint32; }; }

instead, not filtered, but added a second time by the
_zone_net_addr_t code in mksysinfo.sh, which leads to
redefinition warnings/errors.

Simply removing the old _zone_net_addr_t fragment fixes this
and restores bootstrap.

From-SVN: r220481
2015-02-06 16:18:14 +00:00
Dominik Vogt
5c2648fb01 mksysinfo: Tolerate missing structures in upcase_fields.
2014-11-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>

* libgo/mksysinfo.sh: Tolerate missing structures.

From-SVN: r217194
2014-11-06 16:44:32 +00:00
Ian Lance Taylor
1fec5f5274 libgo: add s390 support
From Dominik Vogt.

* libgo/go/syscall/libcall_linux_s390.go: New file for s390 support.
* libgo/go/syscall/syscall_linux_s390.go: Ditto.
* libgo/go/syscall/libcall_linux_s390x.go: New file for s390x support.
* libgo/go/syscall/syscall_linux_s390x.go: Ditto.
* libgo/go/runtime/pprof/pprof.go (printStackRecord): Support s390 and
s390x.
* libgo/runtime/runtime.c (runtime_cputicks): Add support for s390 and
s390x
* libgo/mksysinfo.sh: Ditto.
(upcase_fields): New helper function

* libgo/go/debug/elf/file.go (applyRelocations): Implement relocations
on s390x.
(applyRelocationsS390x): Ditto.
(DWARF): Ditto.
* libgo/go/debug/elf/elf.go (R_390): New constants for S390 relocations.
(r390Strings): Ditto.
(String): Helper function for S390 relocations.
(GoString): Ditto.

* libgo/go/reflect/makefuncgo_s390.go: New file.
(S390MakeFuncStubGo): Implementation of s390 abi.
* libgo/go/reflect/makefuncgo_s390x.go: New file.
(S390xMakeFuncStubGo): Implementation of s390x abi.
* libgo/go/reflect/makefunc_s390.c: New file.
(makeFuncStub): s390 and s390x specific implementation of function.
* libgo/go/reflect/makefunc.go
(MakeFunc): Add support for s390 and s390x.
(makeMethodValue): Ditto.
(makeValueMethod): Ditto.
* libgo/Makefile.am (go_reflect_makefunc_s_file): Ditto.
(go_reflect_makefunc_file): Ditto.
* libgo/go/reflect/makefunc_dummy.c: Ditto.
* libgo/runtime/runtime.h (__go_makefunc_can_recover): Export prototype
for use in makefunc_s390.c.
(__go_makefunc_returning): Ditto.

* libgo/go/syscall/exec_linux.go (forkAndExecInChild): Fix order of the
arguments of the clone system call for s390[x].

* libgo/configure.ac (is_s390): New variable.
(is_s390x): Ditto
(LIBGO_IS_S390): Ditto.
(LIBGO_IS_S390X): Ditto.
(GOARCH): Support s390 and s390x.
* libgo/go/go/build/build.go (cgoEnabled): Ditto.
* libgo/go/go/build/syslist.go (goarchList): Ditto.

From-SVN: r217106
2014-11-04 22:39:30 +00:00
Ian Lance Taylor
3a21b777bb libgo: Add consts for ioctl
TIOCSWINSZ_val, TCGETS_val, TCSETS_val

From-SVN: r216807
2014-10-28 18:18:39 +00:00
Ian Lance Taylor
6736ef96ea libgo: Merge to master revision 19184.
The next revision, 19185, renames several runtime files, and
will be handled in a separate change.

From-SVN: r211328
2014-06-06 22:37:27 +00:00
Ian Lance Taylor
44d5790f7b mksysinfo: Define some more non-trivial TIOC constants.
From-SVN: r210192
2014-05-07 22:22:29 +00:00
Ian Lance Taylor
d3b4df0b17 mksysinfo: Define CLONE flags.
From-SVN: r210189
2014-05-07 21:48:29 +00:00
Ian Lance Taylor
3c450181dc mksysinfo, net: Always define F_DUPFD_CLOEXEC.
For Solaris and CentOS portability.

From-SVN: r204687
2013-11-11 21:21:50 +00:00
Ian Lance Taylor
f038dae646 libgo: Update to October 24 version of master library.
From-SVN: r204466
2013-11-06 19:49:01 +00:00
Ian Lance Taylor
d5b18b0b13 syscall: Add Dup3, {Get,List,Remove,Set}xattr, {Get,Set}priority.
From-SVN: r203788
2013-10-17 18:41:12 +00:00
Ian Lance Taylor
ae135907ba re PR go/56171 (syscall FAILs on Solaris)
PR go/56171
libgo: Solaris portability for syscall package.

From Rainer Orth.

From-SVN: r195950
2013-02-11 19:03:04 +00:00
Ian Lance Taylor
540817f4ef syscall: Always use _C_int for C libcalls.
From-SVN: r195897
2013-02-08 19:24:26 +00:00
Ian Lance Taylor
d6f2922e91 libgo: Update Go library to master revision 15489/921e53d4863c.
From-SVN: r195560
2013-01-29 20:52:43 +00:00
Ian Lance Taylor
98fd70c20f mksysinfo: Fix TIOCNOTTY and TIOCSCTTY for ARM.
From Matthias Klose.

From-SVN: r194118
2012-12-04 06:23:37 +00:00
Ian Lance Taylor
ff95e2ab0b syscall, mksysinfo: Prepare syscall package for 64-bit int.
From-SVN: r193112
2012-11-02 23:39:36 +00:00
Ian Lance Taylor
1a6c552d12 mksysinfo: Define SIGPOLL and SIGCLD if necessary.
From-SVN: r192775
2012-10-24 19:00:44 +00:00
Ian Lance Taylor
e162e288ec mksysinfo: Fix syscall.F_GETLK and friends for 32-bit x86.
From-SVN: r190554
2012-08-21 05:29:30 +00:00
Ian Lance Taylor
5ede5aa54e mksysinfo.sh: Fix handling of glibc 2.16 bits/resource.h.
From Jakub Jelinek.

From-SVN: r189372
2012-07-09 11:13:49 +00:00
Ian Lance Taylor
70b9f51628 mksysinfo: Fix for recent change to glibc <sys/resource.h>.
From-SVN: r188228
2012-06-05 05:32:54 +00:00
Ian Lance Taylor
81b9589421 re PR go/52586 (libgo fails to build for mips*64-linux-gnu (reference to undefined name 'SYS_GETDENTS64'))
PR go/52586
mksysinfo, syscall: Make sure SYS_GETDENTS64 is defined.

Fixes build on MIPS GNU/Linux.

From-SVN: r186986
2012-04-30 16:04:17 +00:00
Ian Lance Taylor
181c7267c7 mksysinfo, net: Always define syscall.SO_REUSEPORT.
From-SVN: r186857
2012-04-26 04:25:56 +00:00
Ian Lance Taylor
1a985a5642 mksysinfo: Only define PathMax if PATH_MAX is defined.
From-SVN: r186778
2012-04-24 19:12:26 +00:00
Ian Lance Taylor
f04e40afc1 mksysinfo: More fixes to emulate master Go library.
From-SVN: r186685
2012-04-22 20:07:23 +00:00
Ian Lance Taylor
df32732fa8 mksysinfo: Define more structs.
From-SVN: r186683
2012-04-22 19:26:01 +00:00
Ian Lance Taylor
f12e8bd5c3 godump.c (go_output_typedef): Dump size of structs.
* godump.c (go_output_typedef): Dump size of structs.

mksysinfo, syscall: Change Sizeof names from var to const.

From-SVN: r186678
2012-04-22 18:51:44 +00:00
Ian Lance Taylor
1410c22260 syscall: Additional constants, some type corrections.
From-SVN: r186655
2012-04-21 18:49:58 +00:00
Ian Lance Taylor
b059fba469 syscall: Add more constants.
From-SVN: r186144
2012-04-04 18:50:09 +00:00
Ian Lance Taylor
8db6380aa7 mksysinfo.sh: Add some more networking constants.
From-SVN: r186114
2012-04-03 19:42:24 +00:00
Ian Lance Taylor
199ebde370 mksysinfo: Fix use of _in6_addr in _zone_net_addr_t.
From Rainer Orth.

From-SVN: r185938
2012-03-28 23:19:06 +00:00
Ian Lance Taylor
42cd874911 re PR go/52557 (Timex undefined on arm-linux-gnueabi)
PR go/52557
mksysinfo: Fix handling of timex for ARM GNU/Linux.

From-SVN: r185354
2012-03-13 20:56:23 +00:00
Ian Lance Taylor
2aeaf0fb26 libgo: Try to fix use of <ustat.h> for Solaris and older GNU/Linux.
From-SVN: r184828
2012-03-02 21:07:52 +00:00
Ian Lance Taylor
cbb6491d76 libgo: Update to weekly.2012-02-14 release.
From-SVN: r184798
2012-03-02 16:38:43 +00:00
Ian Lance Taylor
116b061e74 mksysinfo: Define MADV_ constants for madvise.
From-SVN: r184752
2012-03-01 17:22:29 +00:00
Ian Lance Taylor
b65734ac6c syscall: Fill out GNU/Linux support.
From-SVN: r184669
2012-02-29 20:02:31 +00:00
Ian Lance Taylor
5d46bf0538 libgo: Add mount flags, fallocate, statfs.
From-SVN: r184365
2012-02-18 01:22:02 +00:00
Ian Lance Taylor
cf54a93ca9 mksysinfo: Fix type of last field of Cmsghdr.
From-SVN: r183860
2012-02-03 01:06:19 +00:00
Ian Lance Taylor
10f5ffa4e9 syscall: Add syscall.Times.
From-SVN: r183826
2012-02-02 06:40:11 +00:00
Ian Lance Taylor
4a1a859611 syscall: Support socket control messages.
From-SVN: r183745
2012-01-30 23:57:42 +00:00
Ian Lance Taylor
eb6a1fe097 libgo: Fix merge errors shown on Solaris.
From Rainer Orth.

From-SVN: r183651
2012-01-27 22:34:53 +00:00
Ian Lance Taylor
2887732181 libgo/mksysinfo: Always define IPV6_TCLASS.
From-SVN: r183552
2012-01-26 05:43:42 +00:00
Ian Lance Taylor
70a3ffe8c7 libgo/mksysinfo: Correct typo.
From-SVN: r183549
2012-01-26 01:08:20 +00:00
Ian Lance Taylor
df1304ee03 libgo: Update to weekly.2012-01-15.
From-SVN: r183539
2012-01-25 20:56:26 +00:00
Ian Lance Taylor
eec3e72c11 mksysinfo: Fix Alpha GNU/Linux compatibility patch.
From Uros Bizjak.

From-SVN: r183245
2012-01-17 14:13:33 +00:00
Ian Lance Taylor
dd1628807a mksysinfo: Pick up TIOCGWINSZ even if expression is too complex.
From-SVN: r183169
2012-01-13 23:17:20 +00:00
Ian Lance Taylor
daeae9f196 mksysinfo: Make sure EPOLL_CLOEXEC is defined.
From-SVN: r183168
2012-01-13 23:03:02 +00:00
Ian Lance Taylor
d48be5dfaf libgo: Fix use of -D_GNU_SOURCE and friends when building libgo.
From-SVN: r182548
2011-12-20 18:14:30 +00:00
Ian Lance Taylor
c915f63f73 mksysinfo.sh: Ensure that IPV6 constants and types are defined.
From-SVN: r182314
2011-12-13 22:25:30 +00:00
Ian Lance Taylor
ab61e9c4da libgo: Update to weekly.2011-11-18.
From-SVN: r182266
2011-12-12 23:40:51 +00:00
Ian Lance Taylor
d8f412571f Update Go library to last weekly.
From-SVN: r180552
2011-10-26 23:57:58 +00:00
Ian Lance Taylor
f9367b7c70 Fix Solaris build.
From Rainer Orth.

From-SVN: r180439
2011-10-25 17:45:55 +00:00
Ian Lance Taylor
de27caacfb Implement new syscall package.
Calls to library functions now use entersyscall and
exitsyscall as appropriate.  This is a first step toward
multiplexing goroutines onto threads.

From-SVN: r180345
2011-10-23 19:04:37 +00:00
Ian Lance Taylor
fbfb84e623 mksysinfo: #include <ttold.h> on Irix.
From Rainer Orth.

From-SVN: r179312
2011-09-28 13:14:11 +00:00
Ian Lance Taylor
3019bbaeb3 mksysinfo: Fix for systems that don't define TIOCSCTTY.
From Rainer Orth.

From-SVN: r179269
2011-09-27 13:16:22 +00:00
Ian Lance Taylor
f0f91207e4 Fix sysinfo.go on systems which don't need to import "unsafe".
From-SVN: r179216
2011-09-26 21:49:08 +00:00
Ian Lance Taylor
6172a2f298 Include <termios.h> in mksysinfo.sh.
From Rainer Orth.

From-SVN: r179120
2011-09-23 15:29:17 +00:00
Ian Lance Taylor
adb0401dac Update Go library to r60.
From-SVN: r178910
2011-09-16 15:47:21 +00:00
Ian Lance Taylor
f718d442f6 libgo/mksysinfo: Remove structs within stat found on Alpha.
From-SVN: r174500
2011-05-31 18:06:47 +00:00
Ian Lance Taylor
9ff56c9570 Update to current version of Go library.
From-SVN: r173931
2011-05-20 00:18:15 +00:00
Ian Lance Taylor
9f3b1e6c60 libgo: Irix 6 patches.
From Rainer Orth.

From-SVN: r172935
2011-04-25 19:36:12 +00:00
Ian Lance Taylor
405ca10418 libgo: Update to current Go library.
From-SVN: r172106
2011-04-07 17:09:10 +00:00
Ian Lance Taylor
4ac7fcaac0 libgo: Try to guess the right type for select bits in mksysinfo.
From-SVN: r171858
2011-04-01 22:53:54 +00:00
Ian Lance Taylor
90630d1932 libgo: Support Solaris 8/9.
From Rainer Orth.

From-SVN: r171818
2011-04-01 05:11:23 +00:00
Ian Lance Taylor
654d2ec080 re PR go/47515 (Issues porting libgo to IRIX 6.5)
PR go/47515
libgo: Add Irix support.

From Rainer Orth.

From-SVN: r171806
2011-03-31 23:55:21 +00:00
Ian Lance Taylor
0b3189e79f libgo: Use waitpid on systems which do not have wait4.
From-SVN: r171758
2011-03-30 23:05:04 +00:00
Ian Lance Taylor
5133f00ef8 Update to current version of Go library (revision 94d654be2064).
From-SVN: r171076
2011-03-16 23:05:44 +00:00
Ian Lance Taylor
a3dbf764ae Support libgo on Solaris.
From Rainer Orth.

From-SVN: r170355
2011-02-21 04:17:20 +00:00
Ian Lance Taylor
c9610865d0 mksysinfo.sh: Use -std=gnu99.
From-SVN: r169379
2011-01-28 23:54:56 +00:00
Ian Lance Taylor
46adbf0c6b mksysinfo.sh: Fix Solaris specific define.
From-SVN: r169376
2011-01-28 23:33:28 +00:00
Ian Lance Taylor
b47750fee3 mksysinfo: Add #defines for Solaris.
From-SVN: r169345
2011-01-28 00:11:23 +00:00
Ian Lance Taylor
75d0b39856 mksysinfo: Always define IPV6_V6ONLY.
From-SVN: r169343
2011-01-27 23:28:09 +00:00
Ian Lance Taylor
24d6250f98 Don't force rebuild if mksysinfo.sh does not change sysinfo.go.
From-SVN: r169342
2011-01-27 23:25:31 +00:00
Ian Lance Taylor
83f2ff2ad3 mksysinfo.sh: #include <sys/uio.h>.
From-SVN: r169312
2011-01-27 00:03:51 +00:00
Ian Lance Taylor
ff5f50c52c Remove the types float and complex.
Update to current version of Go library.

Update testsuite for removed types.

	* go-lang.c (go_langhook_init): Omit float_type_size when calling
	go_create_gogo.
	* go-c.h: Update declaration of go_create_gogo.

From-SVN: r169098
2011-01-21 18:19:03 +00:00
Ian Lance Taylor
8610843513 mksysinfo: Define _pad128_t and _upad128_t if commented out.
From Rainer Orth.

From-SVN: r168800
2011-01-14 18:41:31 +00:00
Ian Lance Taylor
389295b785 Don't exit mksysinfo.sh if there is no _user_regs_struct.
From-SVN: r168764
2011-01-13 20:23:19 +00:00
Ian Lance Taylor
5fd58e56f0 Add some Solaris support to mksysinfo.sh.
From Rainer Orth.

From-SVN: r168739
2011-01-13 05:42:40 +00:00
Ian Lance Taylor
7a9389330e Add Go frontend, libgo library, and Go testsuite.
gcc/:
	* gcc.c (default_compilers): Add entry for ".go".
	* common.opt: Add -static-libgo as a driver option.
	* doc/install.texi (Configuration): Mention libgo as an option for
	--enable-shared.  Mention go as an option for --enable-languages.
	* doc/invoke.texi (Overall Options): Mention .go as a file name
	suffix.  Mention go as a -x option.
	* doc/frontends.texi (G++ and GCC): Mention Go as a supported
	language.
	* doc/sourcebuild.texi (Top Level): Mention libgo.
	* doc/standards.texi (Standards): Add section on Go language.
	Move references for other languages into their own section.
	* doc/contrib.texi (Contributors): Mention that I contributed the
	Go frontend.
gcc/testsuite/:
	* lib/go.exp: New file.
	* lib/go-dg.exp: New file.
	* lib/go-torture.exp: New file.
	* lib/target-supports.exp (check_compile): Match // Go.

From-SVN: r167407
2010-12-03 04:34:57 +00:00