diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-09-30 13:45:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-09-30 13:45:08 +0000 |
commit | c0401cf78c555ef38d2d2fba94ebffeaef7c6bc9 (patch) | |
tree | d1646c0c4bb59624dfdc04420f835270129cc18e /libgo/Makefile.am | |
parent | 9e28a77462f81a9a2ab9064d768bd7c9484047e1 (diff) | |
download | gcc-c0401cf78c555ef38d2d2fba94ebffeaef7c6bc9.tar.gz |
runtime: copy internal locking code from Go 1.7 runtime
Remove the old locking code written in C.
Add a shell script mkrsysinfo.sh to generate the runtime_sysinfo.go
file, so that we can get Go copies of the system time structures and
other types.
Tweak the compiler so that when compiling the runtime package the
address operator does not cause local variables to escape. When the gc
compiler compiles the runtime, an escaping local variable is treated as
an error. We should implement that, instead of this change, when escape
analysis is turned on.
Tweak the compiler so that the generated C header does not include names
that start with an underscore followed by a non-upper-case letter,
except for the special cases of _defer and _panic. Otherwise we
translate C types to Go in runtime_sysinfo.go and then generate those Go
types back as C types in runtime.inc, which is useless and painful for
the C code.
Change entersyscall and friends to take a dummy argument, as the gc
versions do, to simplify calls from the shared code.
Reviewed-on: https://go-review.googlesource.com/30079
From-SVN: r240657
Diffstat (limited to 'libgo/Makefile.am')
-rw-r--r-- | libgo/Makefile.am | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am index 23cfd07ba94..e5150693fab 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -396,9 +396,9 @@ rtems_task_variable_add_file = endif if LIBGO_IS_LINUX -runtime_lock_files = runtime/lock_futex.c runtime/thread-linux.c +runtime_thread_files = runtime/thread-linux.c else -runtime_lock_files = runtime/lock_sema.c runtime/thread-sema.c +runtime_thread_files = runtime/thread-sema.c endif if LIBGO_IS_LINUX @@ -502,7 +502,6 @@ runtime_files = \ runtime/go-varargs.c \ runtime/env_posix.c \ runtime/heapdump.c \ - $(runtime_lock_files) \ runtime/mcache.c \ runtime/mcentral.c \ $(runtime_mem_file) \ @@ -518,6 +517,7 @@ runtime_files = \ runtime/runtime.c \ runtime/signal_unix.c \ runtime/thread.c \ + $(runtime_thread_files) \ runtime/yield.c \ $(rtems_task_variable_add_file) \ chan.c \ @@ -633,12 +633,8 @@ s-version: Makefile $(STAMP) $@ runtime_sysinfo.go: s-runtime_sysinfo; @true -s-runtime_sysinfo: sysinfo.go - rm -f tmp-runtime_sysinfo.go - echo 'package runtime' > tmp-runtime_sysinfo.go - echo >> tmp-runtime_sysinfo.go - grep 'const _sizeof_ucontext_t ' sysinfo.go >> tmp-runtime_sysinfo.go - grep 'type _sigset_t ' sysinfo.go >> tmp-runtime_sysinfo.go +s-runtime_sysinfo: $(srcdir)/mkrsysinfo.sh gen-sysinfo.go + $(SHELL) $(srcdir)/mkrsysinfo.sh $(SHELL) $(srcdir)/mvifdiff.sh tmp-runtime_sysinfo.go runtime_sysinfo.go $(STAMP) $@ |