summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-19 07:26:59 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-19 07:26:59 +0000
commita5de8d1ccb98c3d1ea50159f5937b3429ff91c42 (patch)
tree5e2b7b7ac27b974758e5d2b17a5b5aa510f15f60 /mjit_worker.c
parent31c862a775c8ca05c4f2f8001d32690e9e7f8e28 (diff)
mjit_worker.c: do not use GCC_NOSTDLIB_FLAGS for OpenBSD
OpenBSD's GCC compiler has local extensions that break when `-nostartfiles -nodefaultlibs -nostdlib` is used. From: Jeremy Evans <merch-redmine@jeremyevans.net> [Bug #15548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index a8a99c8..5f52d40 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -247,9 +247,9 @@ static char *libruby_pathflag;
# define MJIT_CFLAGS_PIPE 0
#endif
-// Use `-nodefaultlibs -nostdlib` for GCC where possible, which does not work on mingw, cygwin and AIX.
+// Use `-nodefaultlibs -nostdlib` for GCC where possible, which does not work on mingw, cygwin, AIX, and OpenBSD.
// This seems to improve MJIT performance on GCC.
-#if defined __GNUC__ && !defined __clang__ && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(_AIX)
+#if defined __GNUC__ && !defined __clang__ && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(_AIX) && !defined(__OpenBSD__)
# define GCC_NOSTDLIB_FLAGS "-nodefaultlibs", "-nostdlib",
#else
# define GCC_NOSTDLIB_FLAGS /* empty */
@@ -266,7 +266,7 @@ static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
static const char *const CC_DLDFLAGS_ARGS[] = {
MJIT_DLDFLAGS
-#if defined __GNUC__ && !defined __clang__
+#if defined __GNUC__ && !defined __clang__ && !defined(__OpenBSD__)
"-nostartfiles",
#endif
GCC_NOSTDLIB_FLAGS NULL