annotate libgo/README @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 See ../README.
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 This is the runtime support library for the Go programming language.
kono
parents:
diff changeset
4 This library is intended for use with the Go frontend.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 This library should not be stripped when it is installed. Go code
kono
parents:
diff changeset
7 relies on being able to look up file/line information, which comes
kono
parents:
diff changeset
8 from the debugging info using the libbacktrace library.
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 The library has only been tested on GNU/Linux using glibc, and on
kono
parents:
diff changeset
11 Solaris. It should not be difficult to port to other operating
kono
parents:
diff changeset
12 systems.
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 Directories:
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 go
kono
parents:
diff changeset
17 A copy of the Go library from http://golang.org/, with several
kono
parents:
diff changeset
18 changes for gccgo.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 runtime
kono
parents:
diff changeset
21 Runtime functions, written in C, which are called directly by the
kono
parents:
diff changeset
22 compiler or by the library.
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 Contributing
kono
parents:
diff changeset
25 ============
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 To contribute patches to the files in this directory, please see
kono
parents:
diff changeset
28 http://golang.org/doc/gccgo_contribute.html .
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 The master copy of these files is hosted at
kono
parents:
diff changeset
31 http://code.google.com/p/gofrontend . Changes to these files require
kono
parents:
diff changeset
32 signing a Google contributor license agreement. If you are the
kono
parents:
diff changeset
33 copyright holder, you will need to agree to the individual contributor
kono
parents:
diff changeset
34 license agreement at
kono
parents:
diff changeset
35 http://code.google.com/legal/individual-cla-v1.0.html. This agreement
kono
parents:
diff changeset
36 can be completed online.
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 If your organization is the copyright holder, the organization will
kono
parents:
diff changeset
39 need to agree to the corporate contributor license agreement at
kono
parents:
diff changeset
40 http://code.google.com/legal/corporate-cla-v1.0.html.
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 If the copyright holder for your code has already completed the
kono
parents:
diff changeset
43 agreement in connection with another Google open source project, it
kono
parents:
diff changeset
44 does not need to be completed again.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
45
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
46 Debugging
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
47 =========
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
48
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
49 This describes how to test libgo when built as part of gccgo.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
50
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
51 To test a specific package, cd to the libgo build directory
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
52 (TARGET/libgo) and run `make PKG/check`. For example, `make
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
53 bytes/check`.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
54
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
55 To see the exact commands that it runs, including how the compiler is
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
56 invoked, run `make GOTESTFLAGS=--trace bytes/check`. This will
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
57 display the commands if the test fails. If the test passes, the
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
58 commands and other output will be visible in a file named
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
59 check-testlog in a subdirectory with the name of the package being
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
60 checked. In the case of bytes/check, this will create
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
61 bytes/check-testlog.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
62
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
63 To leave the test program behind, run `make GOTESTFLAGS=--keep
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
64 bytes/check`. That will leave a gotestNNNN/test directory in the
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
65 libgo build directory. In that directory you can run
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
66 `LD_LIBRARY_PATH=../../.libs ./a.out -test.short` to run the tests.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
67 You can run specific failing tests using a -test.run option. You can
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
68 see the tests being run with the -test.v option. You can run the
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
69 program under a debugger such as gdb.