summaryrefslogtreecommitdiff
path: root/libgo/Makefile.in
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-06 15:16:32 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-06 15:16:32 +0000
commit31ba6c3ff2311bad9422246f49d59c532cbb5078 (patch)
tree6e862e3ea14b2edf93a92c404a0d9b29f3f9ba65 /libgo/Makefile.in
parentbab85b65e545231656361b997a81fb8a44b266b4 (diff)
downloadgcc-31ba6c3ff2311bad9422246f49d59c532cbb5078.tar.gz
2011-11-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 181026 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@181034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/Makefile.in')
-rw-r--r--libgo/Makefile.in34
1 files changed, 32 insertions, 2 deletions
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 05223a6dc5b..4c07233d43d 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -424,9 +424,11 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIZEOF_STRUCT_EPOLL_EVENT = @SIZEOF_STRUCT_EPOLL_EVENT@
SPLIT_STACK = @SPLIT_STACK@
STRINGOPS_FLAG = @STRINGOPS_FLAG@
STRIP = @STRIP@
+STRUCT_EPOLL_EVENT_FD_OFFSET = @STRUCT_EPOLL_EVENT_FD_OFFSET@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
@@ -1868,7 +1870,7 @@ go_testing_script_files = \
@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@syscall_socket_file = go/syscall/socket_solaris.go
# Define socket sizes and types.
-@LIBGO_IS_LINUX_TRUE@syscall_socket_file = go/syscall/socket_linux.go
+@LIBGO_IS_LINUX_TRUE@syscall_socket_file = go/syscall/socket_linux.go epoll.go
@LIBGO_IS_386_FALSE@@LIBGO_IS_SOLARIS_TRUE@syscall_uname_file = go/syscall/libcall_uname.go
# Support for uname.
@@ -4475,6 +4477,34 @@ s-sysinfo: $(srcdir)/mksysinfo.sh config.h
$(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
$(STAMP) $@
+# The epoll struct has an embedded union and is packed on x86_64,
+# which is too complicated for mksysinfo.sh. We find the offset of
+# the only field we care about in configure.ac, and generate the
+# struct here.
+epoll.go: s-epoll; @true
+s-epoll: Makefile
+ rm -f epoll.go.tmp
+ echo 'package syscall' > epoll.go.tmp
+ echo 'type EpollEvent struct {' >> epoll.go.tmp
+ echo ' Events uint32' >> epoll.go.tmp
+ case "$(SIZEOF_STRUCT_EPOLL_EVENT),$(STRUCT_EPOLL_EVENT_FD_OFFSET)" in \
+ 0,0) echo 1>&2 "*** struct epoll_event data.fd offset unknown"; \
+ exit 1; ;; \
+ 8,4) echo ' Fd int32' >> epoll.go.tmp; ;; \
+ 12,4) echo ' Fd int32' >> epoll.go.tmp; \
+ echo ' Pad [4]byte' >> epoll.go.tmp; ;; \
+ 12,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
+ echo ' Fd int32' >> epoll.go.tmp; ;; \
+ 16,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
+ echo ' Fd int32' >> epoll.go.tmp; \
+ echo ' Pad2 [4]byte' >> epoll.go.tmp; ;; \
+ *) echo 1>&2 "*** struct epoll_event unsupported"; \
+ exit 1; ;; \
+ esac
+ echo '}' >> epoll.go.tmp
+ $(SHELL) $(srcdir)/../move-if-change epoll.go.tmp epoll.go
+ $(STAMP) $@
+
asn1/asn1.lo: $(go_asn1_files) big.gox bytes.gox fmt.gox io.gox os.gox \
reflect.gox strconv.gox strings.gox time.gox
$(BUILDPACKAGE)
@@ -5238,7 +5268,7 @@ encoding/pem/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: encoding/pem/check
-exp/ebnf.lo: $(go_exp_ebnf_files) go/scanner.gox go/token.gox os.gox \
+exp/ebnf.lo: $(go_exp_ebnf_files) scanner.gox go/token.gox os.gox \
strconv.gox unicode.gox utf8.gox
$(BUILDPACKAGE)
exp/ebnf/check: $(CHECK_DEPS)