More fixes for the Solaris/x86 build. Thanks to Will Metcalf.

This commit is contained in:
Mike Pall 2011-06-14 16:44:20 +02:00
parent 9cf2cd2a11
commit 3d1563524f
8 changed files with 15 additions and 7 deletions

View File

@ -292,7 +292,9 @@ ifeq (iOS,$(TARGET_SYS))
TARGET_XSHLDFLAGS+= -install_name $(PREFIX)/lib/$(TARGET_DYLIBNAME)
endif
else
TARGET_XLDFLAGS+= -Wl,-E
ifneq (SunOS,$(TARGET_SYS))
TARGET_XLDFLAGS+= -Wl,-E
endif
ifeq (Linux,$(TARGET_SYS))
TARGET_XLIBS+= -ldl
endif
@ -420,6 +422,9 @@ endif
ifeq (iOS,$(TARGET_SYS))
LJVM_MODE= machasm
endif
ifeq (SunOS,$(TARGET_SYS))
BUILDMODE= static
endif
ifeq (static,$(BUILDMODE))
TARGET_DYNCC= @:

View File

@ -3062,7 +3062,7 @@ static void emit_asm_debug(BuildCtx *ctx)
#endif
"\t.align " SZPTR "\n"
".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
#ifdef __solaris__
#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
#else
fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");

View File

@ -3060,7 +3060,7 @@ static void emit_asm_debug(BuildCtx *ctx)
#endif
"\t.align " SZPTR "\n"
".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
#ifdef __solaris__
#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
#else
fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");

View File

@ -6025,7 +6025,7 @@ static void emit_asm_debug(BuildCtx *ctx)
#endif
"\t.align " SZPTR "\n"
".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
#ifdef __solaris__
#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
#else
fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");

View File

@ -3219,7 +3219,7 @@ static void emit_asm_debug(BuildCtx *ctx)
#endif
"\t.align " SZPTR "\n"
".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
#ifdef __solaris__
#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
#else
fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");

View File

@ -65,7 +65,8 @@
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
defined(__NetBSD__) || defined(__OpenBSD__)
#define LUAJIT_OS LUAJIT_OS_BSD
#elif defined(__solaris__) || defined(__CYGWIN__)
#elif (defined(__sun__) && defined(__svr4__)) || defined(__solaris__) || \
defined(__CYGWIN__)
#define LUAJIT_OS LUAJIT_OS_POSIX
#else
#define LUAJIT_OS LUAJIT_OS_OTHER

View File

@ -118,8 +118,10 @@ typedef uintptr_t BloomFilter;
#define LJ_NOINLINE __attribute__((noinline))
#if defined(__ELF__) || defined(__MACH__)
#if !((defined(__sun__) && defined(__svr4__)) || defined(__solaris__))
#define LJ_NOAPI extern __attribute__((visibility("hidden")))
#endif
#endif
/* Note: it's only beneficial to use fastcall on x86 and then only for up to
** two non-FP args. The amalgamated compile covers all LJ_FUNC cases. Only

View File

@ -347,7 +347,7 @@ static const ELFheader elfhdr_template = {
.eosabi = 2,
#elif defined(__OpenBSD__)
.eosabi = 12,
#elif defined(__solaris__)
#elif (defined(__sun__) && defined(__svr4__)) || defined(__solaris__)
.eosabi = 6,
#else
.eosabi = 0,