[前][次][番号順一覧][スレッド一覧]

ruby-changes:51535

From: normal <ko1@a...>
Date: Mon, 25 Jun 2018 11:52:35 +0900 (JST)
Subject: [ruby-changes:51535] normal:r63745 (trunk): mjit.c: set PIC flags on clang for FreeBSD and glibc

normal	2018-06-25 11:52:29 +0900 (Mon, 25 Jun 2018)

  New Revision: 63745

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63745

  Log:
    mjit.c: set PIC flags on clang for FreeBSD and glibc
    
    This seems required on FreeBSD 11.1 (clang 4.0.0) and
    Debian stretch (clang 3.8.1) for shared libraries.
    
    Note: Not checking __linux__ because there are statically-linked
    Linux distros (I don't know if they can support MJIT).  But
    glibc doesn't support static linking, so we guard on that.
    
    Maybe other platforms will need this, too.

  Modified files:
    trunk/mjit.c
Index: mjit.c
===================================================================
--- mjit.c	(revision 63744)
+++ mjit.c	(revision 63745)
@@ -616,7 +616,9 @@ free_list(struct rb_mjit_unit_list *list https://github.com/ruby/ruby/blob/trunk/mjit.c#L616
 static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
 static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
 
-#if defined __GNUC__ && !defined __clang__
+#if defined(__GNUC__) && \
+     (!defined(__clang__) || \
+      (defined(__clang__) && (defined(__FreeBSD__) || defined(__GLIBC__))))
 #define GCC_PIC_FLAGS "-Wfatal-errors", "-fPIC", "-shared", "-w", \
     "-pipe",
 #else

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]