diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-12 14:28:05 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-12 14:28:05 +0000 |
commit | c8dc49fb0318088e30040d1162cea181931f1ab4 (patch) | |
tree | bcfc25031f13595df938603e4e0d86327cfde9a2 /libgo/Makefile.am | |
parent | a25f5b28d740a5ae7a81608e0b10df94f110d7a5 (diff) | |
download | gcc-c8dc49fb0318088e30040d1162cea181931f1ab4.zip gcc-c8dc49fb0318088e30040d1162cea181931f1ab4.tar.gz gcc-c8dc49fb0318088e30040d1162cea181931f1ab4.tar.bz2 |
syscall, internal/syscall/unix: Fix getrandom, clone on sparc64
Since sparc is a valid architecture, the name of
getrandom_linux_sparc.go means that it will be ignored on sparc64,
even though it's whitelisted with a +build line.
On SPARC, clone has a unique return value convention which requires
some inline assembly to convert it to the normal convention.
Reviewed-on: https://go-review.googlesource.com/30873
From-SVN: r241051
Diffstat (limited to 'libgo/Makefile.am')
-rw-r--r-- | libgo/Makefile.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am index b7c3e18..b4243e7 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -736,6 +736,12 @@ s-epoll: Makefile $(SHELL) $(srcdir)/mvifdiff.sh epoll.go.tmp epoll.go $(STAMP) $@ +if LIBGO_IS_LINUX +syscall_lib_clone_lo = syscall/clone_linux.lo +else +syscall_lib_clone_lo = +endif + libgo_go_objs = \ bufio.lo \ bytes.lo \ @@ -767,6 +773,7 @@ libgo_go_objs = \ strings/index.lo \ sync.lo \ syscall.lo \ + $(syscall_lib_clone_lo) \ syscall/errno.lo \ syscall/signame.lo \ syscall/wait.lo \ @@ -2534,6 +2541,9 @@ syscall.lo.dep: $(srcdir)/go/syscall/*.go $(extra_go_files_syscall) $(BUILDDEPS) syscall.lo: $(BUILDPACKAGE) +syscall/clone_linux.lo: go/syscall/clone_linux.c runtime.inc + @$(MKDIR_P) syscall + $(LTCOMPILE) -c -o $@ $< syscall/errno.lo: go/syscall/errno.c runtime.inc @$(MKDIR_P) syscall $(LTCOMPILE) -c -o $@ $< |