aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile7
-rw-r--r--src/buildvm_x64.h2
-rw-r--r--src/buildvm_x64win.h2
-rw-r--r--src/buildvm_x86.dasc2
-rw-r--r--src/buildvm_x86.h2
-rw-r--r--src/lj_arch.h3
-rw-r--r--src/lj_def.h2
-rw-r--r--src/lj_gdbjit.c2
8 files changed, 15 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile
index e670953b..9f7bcfcc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -292,7 +292,9 @@ ifeq (iOS,$(TARGET_SYS))
292 TARGET_XSHLDFLAGS+= -install_name $(PREFIX)/lib/$(TARGET_DYLIBNAME) 292 TARGET_XSHLDFLAGS+= -install_name $(PREFIX)/lib/$(TARGET_DYLIBNAME)
293 endif 293 endif
294else 294else
295 TARGET_XLDFLAGS+= -Wl,-E 295 ifneq (SunOS,$(TARGET_SYS))
296 TARGET_XLDFLAGS+= -Wl,-E
297 endif
296 ifeq (Linux,$(TARGET_SYS)) 298 ifeq (Linux,$(TARGET_SYS))
297 TARGET_XLIBS+= -ldl 299 TARGET_XLIBS+= -ldl
298 endif 300 endif
@@ -420,6 +422,9 @@ endif
420ifeq (iOS,$(TARGET_SYS)) 422ifeq (iOS,$(TARGET_SYS))
421 LJVM_MODE= machasm 423 LJVM_MODE= machasm
422endif 424endif
425ifeq (SunOS,$(TARGET_SYS))
426 BUILDMODE= static
427endif
423 428
424ifeq (static,$(BUILDMODE)) 429ifeq (static,$(BUILDMODE))
425 TARGET_DYNCC= @: 430 TARGET_DYNCC= @:
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index 6fe46d9f..fcff6db3 100644
--- a/src/buildvm_x64.h
+++ b/src/buildvm_x64.h
@@ -3062,7 +3062,7 @@ static void emit_asm_debug(BuildCtx *ctx)
3062#endif 3062#endif
3063 "\t.align " SZPTR "\n" 3063 "\t.align " SZPTR "\n"
3064 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE); 3064 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
3065#ifdef __solaris__ 3065#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
3066 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); 3066 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
3067#else 3067#else
3068 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); 3068 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h
index fa196086..9e6c72bb 100644
--- a/src/buildvm_x64win.h
+++ b/src/buildvm_x64win.h
@@ -3060,7 +3060,7 @@ static void emit_asm_debug(BuildCtx *ctx)
3060#endif 3060#endif
3061 "\t.align " SZPTR "\n" 3061 "\t.align " SZPTR "\n"
3062 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE); 3062 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
3063#ifdef __solaris__ 3063#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
3064 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); 3064 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
3065#else 3065#else
3066 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); 3066 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index 14b47089..242f8d6d 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -6025,7 +6025,7 @@ static void emit_asm_debug(BuildCtx *ctx)
6025#endif 6025#endif
6026 "\t.align " SZPTR "\n" 6026 "\t.align " SZPTR "\n"
6027 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE); 6027 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
6028#ifdef __solaris__ 6028#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
6029 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); 6029 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
6030#else 6030#else
6031 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); 6031 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 831a00ab..289f4bb9 100644
--- a/src/buildvm_x86.h
+++ b/src/buildvm_x86.h
@@ -3219,7 +3219,7 @@ static void emit_asm_debug(BuildCtx *ctx)
3219#endif 3219#endif
3220 "\t.align " SZPTR "\n" 3220 "\t.align " SZPTR "\n"
3221 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE); 3221 ".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
3222#ifdef __solaris__ 3222#if (defined(__sun__) && defined(__svr4__)) || defined(__solaris_)
3223 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); 3223 fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
3224#else 3224#else
3225 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); 3225 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
diff --git a/src/lj_arch.h b/src/lj_arch.h
index 14448565..ff4628df 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -65,7 +65,8 @@
65#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ 65#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
66 defined(__NetBSD__) || defined(__OpenBSD__) 66 defined(__NetBSD__) || defined(__OpenBSD__)
67#define LUAJIT_OS LUAJIT_OS_BSD 67#define LUAJIT_OS LUAJIT_OS_BSD
68#elif defined(__solaris__) || defined(__CYGWIN__) 68#elif (defined(__sun__) && defined(__svr4__)) || defined(__solaris__) || \
69 defined(__CYGWIN__)
69#define LUAJIT_OS LUAJIT_OS_POSIX 70#define LUAJIT_OS LUAJIT_OS_POSIX
70#else 71#else
71#define LUAJIT_OS LUAJIT_OS_OTHER 72#define LUAJIT_OS LUAJIT_OS_OTHER
diff --git a/src/lj_def.h b/src/lj_def.h
index eeb55384..78d988ea 100644
--- a/src/lj_def.h
+++ b/src/lj_def.h
@@ -118,8 +118,10 @@ typedef uintptr_t BloomFilter;
118#define LJ_NOINLINE __attribute__((noinline)) 118#define LJ_NOINLINE __attribute__((noinline))
119 119
120#if defined(__ELF__) || defined(__MACH__) 120#if defined(__ELF__) || defined(__MACH__)
121#if !((defined(__sun__) && defined(__svr4__)) || defined(__solaris__))
121#define LJ_NOAPI extern __attribute__((visibility("hidden"))) 122#define LJ_NOAPI extern __attribute__((visibility("hidden")))
122#endif 123#endif
124#endif
123 125
124/* Note: it's only beneficial to use fastcall on x86 and then only for up to 126/* Note: it's only beneficial to use fastcall on x86 and then only for up to
125** two non-FP args. The amalgamated compile covers all LJ_FUNC cases. Only 127** two non-FP args. The amalgamated compile covers all LJ_FUNC cases. Only
diff --git a/src/lj_gdbjit.c b/src/lj_gdbjit.c
index fbaafc04..acbe429a 100644
--- a/src/lj_gdbjit.c
+++ b/src/lj_gdbjit.c
@@ -347,7 +347,7 @@ static const ELFheader elfhdr_template = {
347 .eosabi = 2, 347 .eosabi = 2,
348#elif defined(__OpenBSD__) 348#elif defined(__OpenBSD__)
349 .eosabi = 12, 349 .eosabi = 12,
350#elif defined(__solaris__) 350#elif (defined(__sun__) && defined(__svr4__)) || defined(__solaris__)
351 .eosabi = 6, 351 .eosabi = 6,
352#else 352#else
353 .eosabi = 0, 353 .eosabi = 0,