summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 22:07:25 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 22:07:25 +0000
commitbaa8cbc79cec765219efec17b6a4d62a64e6e71b (patch)
tree039261e25953b5b0565a3994b8a96a27ed7ee01c
parent949e5786db04eee7fe3feec227d76e6c54d56c3a (diff)
downloadgcc-baa8cbc79cec765219efec17b6a4d62a64e6e71b.tar.gz
syscall: Don't build wait status functions on RTEMS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182313 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgo/Makefile.am13
-rw-r--r--libgo/Makefile.in11
-rw-r--r--libgo/go/syscall/exec_stubs.go16
3 files changed, 33 insertions, 7 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 3db823e8e1a..67ae8710903 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1450,11 +1450,22 @@ syscall_exec_file = go/syscall/exec_unix.go
endif
# Define Wait4.
+if LIBGO_IS_RTEMS
+syscall_wait_file =
+else
if HAVE_WAIT4
syscall_wait_file = go/syscall/libcall_wait4.go
else
syscall_wait_file = go/syscall/libcall_waitpid.go
endif
+endif
+
+# Support for pulling apart wait status.
+if LIBGO_IS_RTEMS
+syscall_wait_c_file =
+else
+syscall_wait_c_file = go/syscall/wait.c
+endif
# Define Sleep.
if LIBGO_IS_RTEMS
@@ -1564,7 +1575,7 @@ go_syscall_files = \
syscall_arch.go
go_syscall_c_files = \
go/syscall/errno.c \
- go/syscall/wait.c
+ $(syscall_wait_c_file)
libcalls.go: s-libcalls; @true
s-libcalls: Makefile go/syscall/mksyscall.awk $(go_base_syscall_files)
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 6552074a3da..2e1ea76eb2c 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1837,10 +1837,15 @@ go_unicode_utf8_files = \
# Define ForkExec and Exec.
@LIBGO_IS_RTEMS_TRUE@syscall_exec_file = go/syscall/exec_stubs.go
-@HAVE_WAIT4_FALSE@syscall_wait_file = go/syscall/libcall_waitpid.go
+@HAVE_WAIT4_FALSE@@LIBGO_IS_RTEMS_FALSE@syscall_wait_file = go/syscall/libcall_waitpid.go
+@HAVE_WAIT4_TRUE@@LIBGO_IS_RTEMS_FALSE@syscall_wait_file = go/syscall/libcall_wait4.go
# Define Wait4.
-@HAVE_WAIT4_TRUE@syscall_wait_file = go/syscall/libcall_wait4.go
+@LIBGO_IS_RTEMS_TRUE@syscall_wait_file =
+@LIBGO_IS_RTEMS_FALSE@syscall_wait_c_file = go/syscall/wait.c
+
+# Support for pulling apart wait status.
+@LIBGO_IS_RTEMS_TRUE@syscall_wait_c_file =
@LIBGO_IS_RTEMS_FALSE@syscall_sleep_file = go/syscall/sleep_select.go
# Define Sleep.
@@ -1908,7 +1913,7 @@ go_syscall_files = \
go_syscall_c_files = \
go/syscall/errno.c \
- go/syscall/wait.c
+ $(syscall_wait_c_file)
@LIBGO_IS_LINUX_FALSE@os_lib_inotify_lo =
diff --git a/libgo/go/syscall/exec_stubs.go b/libgo/go/syscall/exec_stubs.go
index 74b0af597e8..35bb17487b7 100644
--- a/libgo/go/syscall/exec_stubs.go
+++ b/libgo/go/syscall/exec_stubs.go
@@ -7,17 +7,27 @@
package syscall
func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []int) (pid int, err int) {
- return -1, ENOSYS;
+ return -1, ENOSYS
}
func Exec(argv0 string, argv []string, envv []string) (err int) {
- return ENOSYS;
+ return ENOSYS
}
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- return -1, ENOSYS;
+ return -1, ENOSYS
}
+func (w WaitStatus) Exited() bool { return false }
+func (w WaitStatus) Signaled() bool { return false }
+func (w WaitStatus) Stopped() bool { return false }
+func (w WaitStatus) Continued() bool { return false }
+func (w WaitStatus) CoreDump() bool { return false }
+func (w WaitStatus) ExitStatus() int { return 0 }
+func (w WaitStatus) Signal() int { return 0 }
+func (w WaitStatus) StopSignal() int { return 0 }
+func (w WaitStatus) TrapCause() int { return 0 }
+
func raw_ptrace(request int, pid int, addr *byte, data *byte) Errno {
return ENOSYS
}