summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-04-13 14:43:26 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-13 21:36:16 +0400
commit9787d8a19dcb0e45bf0fe0a245341e884a3259a1 (patch)
tree75056366ea2512aeb97865f0f6d34f38096b1ada
parent5405fca9720bb31164f90902f719cfff0608e582 (diff)
downloadgcl-9787d8a19dcb0e45bf0fe0a245341e884a3259a1.tar.gz
Added solaris-amd64 config
-rw-r--r--gcl/configure.in3
-rwxr-xr-xgcl/h/solaris-amd64.defs29
-rw-r--r--gcl/h/solaris-amd64.h62
3 files changed, 94 insertions, 0 deletions
diff --git a/gcl/configure.in b/gcl/configure.in
index da328150..d6de8709 100644
--- a/gcl/configure.in
+++ b/gcl/configure.in
@@ -273,6 +273,9 @@ case $canonical in
i?86-pc-solaris*)
use=solaris-i386;;
+ x86_64-pc-solaris*)
+ use=solaris-amd64;;
+
old)
use=sun2r3;;
diff --git a/gcl/h/solaris-amd64.defs b/gcl/h/solaris-amd64.defs
new file mode 100755
index 00000000..c3b51ef1
--- /dev/null
+++ b/gcl/h/solaris-amd64.defs
@@ -0,0 +1,29 @@
+LBINDIR=/usr/local/bin
+LDCC=${CC}
+
+# Enable the fastloading mechanism which does not use ld -A
+# requires c/rel_.. machine dependent code.
+
+RSYM = rsym
+ifneq ($(findstring bfd,$(LIBS)),)
+RSYM =
+endif
+ifneq ($(BUILD_BFD),)
+RSYM =
+endif
+
+SFASL = $(ODIR)/sfasl.o
+
+
+# When using SFASL it is good to have (si::build-symbol-table)
+INITFORM=(si::build-symbol-table)
+
+# Use symbolic links
+SYMB=-s
+
+LIBFILES=bsearch.o
+
+# the make to use for saved_kcp the profiler.
+KCP=kcp-bsd
+
+SHELL=/bin/bash
diff --git a/gcl/h/solaris-amd64.h b/gcl/h/solaris-amd64.h
new file mode 100644
index 00000000..bb8bee97
--- /dev/null
+++ b/gcl/h/solaris-amd64.h
@@ -0,0 +1,62 @@
+#ifndef _GCL_SOLARIS_AMD64_H
+#define _GCL_SOLARIS_AMD64_H
+
+#define I386
+#define LITTLE_END
+#define GNUMALLOC
+
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__
+#endif
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
+
+#define ElfW(a) Elf64_ ## a
+#if !defined(HAVE_LIBBFD) && !defined(USE_DLOPEN)
+#define ELF_TARGET_AMD64
+#include <sys/elf.h>
+#endif
+#include "linux.h"
+
+#ifdef IN_GBC
+#undef MPROTECT_ACTION_FLAGS
+#define MPROTECT_ACTION_FLAGS SA_RESTART|SA_SIGINFO
+#define GET_FAULT_ADDR(sig,code,sv,a) \
+ ((siginfo_t *)code)->si_addr
+#endif
+
+#define ADDITIONAL_FEATURES \
+ ADD_FEATURE("SUN");
+
+#define SGC
+
+#define PTR_ALIGN 8
+
+#undef LISTEN_FOR_INPUT
+#undef SIG_UNBLOCK_SIGNALS
+#define NO_SYSTEM_TIME_ZONE
+#define SOLARIS11
+
+#define RELOC_H "elf64_i386_reloc.h"
+
+#include <thread.h>
+#include <errno.h>
+#include <sys/resource.h>
+#define NULL_OR_ON_C_STACK(p) \
+({ \
+ stack_t s; \
+ int ret = 1; \
+ int rc; \
+ if (NULL != p) { \
+ do { rc = thr_stksegment(&s); \
+ } while (rc != 0 && errno == EAGAIN); \
+ ret = (s.ss_size != RLIM_INFINITY) ? \
+ ((void*)(s.ss_sp - s.ss_size) < (void*)p && (void*)p < s.ss_sp): \
+ ((void*)0xFFFF800000000000L < (void*)p && (void*)p < s.ss_sp); \
+ } \
+ ret; \
+})
+
+#endif // _GCL_SOLARIS_AMD64_H
+