On Tue, Sep 10, 2013 at 08:46:53AM -0400, Andy Dougherty wrote:
> I have attached a new batch of patches to work towards building MoarVM on
> Solaris 11/x86 with Sun's compiler suite. One additional patch is needed
> to the 3rdparty/dyncall module, but since that's in a git submodule,
> I'll send it separately.
Here is the patch I used for 3rdparty/dyncall/dynload/dynload_syms_elf.c.
Since that's part of a git submodule, git diff didn't pick it up from the
main MoarVM directory. I have no idea what protocol here is, so here
simply is the patch I used.
On Solaris 11, <libelf.h> only works for _FILE_OFFSET_BITS == 32.
Otherwise, it dies with #error "large files are not supported by libelf".
diff --git a/dynload/dynload_syms_elf.c b/dynload/dynload_syms_elf.c
index 07056b1..949fd7e 100644
--- a/dynload/dynload_syms_elf.c
+++ b/dynload/dynload_syms_elf.c
@@ -37,7 +37,7 @@
#if defined(OS_OpenBSD)
# include <stdint.h>
# include <elf_abi.h>
-#elif defined(OS_SunOS)
+#elif defined(OS_SunOS) && (_FILE_OFFSET_BITS == 32)
# include <libelf.h>
#elif defined(OS_BeOS)
# include <elf32.h>
--
1.7.9.2
--
Andy Dougherty [email protected]