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

ruby-changes:54635

From: naruse <ko1@a...>
Date: Fri, 18 Jan 2019 06:55:15 +0900 (JST)
Subject: [ruby-changes:54635] naruse:r66850 (ruby_2_6): merge revision(s) 66817: [Backport #15513]

naruse	2019-01-18 06:55:11 +0900 (Fri, 18 Jan 2019)

  New Revision: 66850

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

  Log:
    merge revision(s) 66817: [Backport #15513]
    
    mjit_worker.c: pass -nostdlib when making pch as well
    
    [Bug #15513]

  Modified directories:
    branches/ruby_2_6/
  Modified files:
    branches/ruby_2_6/mjit_worker.c
    branches/ruby_2_6/version.h
Index: ruby_2_6/version.h
===================================================================
--- ruby_2_6/version.h	(revision 66849)
+++ ruby_2_6/version.h	(revision 66850)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_6/version.h#L1
 #define RUBY_VERSION "2.6.0"
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 18
+#define RUBY_PATCHLEVEL 19
 
 #define RUBY_RELEASE_YEAR 2019
 #define RUBY_RELEASE_MONTH 1
Index: ruby_2_6/mjit_worker.c
===================================================================
--- ruby_2_6/mjit_worker.c	(revision 66849)
+++ ruby_2_6/mjit_worker.c	(revision 66850)
@@ -247,6 +247,14 @@ static char *libruby_pathflag; https://github.com/ruby/ruby/blob/trunk/ruby_2_6/mjit_worker.c#L247
 # define MJIT_CFLAGS_PIPE 0
 #endif
 
+// Use `-nodefaultlibs -nostdlib` for GCC where possible, which does not work on mingw and cygwin.
+// This seems to improve MJIT performance on GCC.
+#if defined __GNUC__ && !defined __clang__ && !defined(_WIN32) && !defined(__CYGWIN__)
+# define GCC_NOSTDLIB_FLAGS "-nodefaultlibs", "-nostdlib",
+#else
+# define GCC_NOSTDLIB_FLAGS /* empty */
+#endif
+
 static const char *const CC_COMMON_ARGS[] = {
     MJIT_CC_COMMON MJIT_CFLAGS GCC_PIC_FLAGS
     NULL
@@ -260,11 +268,8 @@ static const char *const CC_DLDFLAGS_ARG https://github.com/ruby/ruby/blob/trunk/ruby_2_6/mjit_worker.c#L268
     MJIT_DLDFLAGS
 #if defined __GNUC__ && !defined __clang__
     "-nostartfiles",
-# if !defined(_WIN32) && !defined(__CYGWIN__)
-    "-nodefaultlibs", "-nostdlib",
-# endif
 #endif
-    NULL
+    GCC_NOSTDLIB_FLAGS NULL
 };
 
 static const char *const CC_LIBS[] = {
@@ -735,6 +740,9 @@ make_pch(void) https://github.com/ruby/ruby/blob/trunk/ruby_2_6/mjit_worker.c#L740
 # ifdef __clang__
         "-emit-pch",
 # endif
+        // -nodefaultlibs is a linker flag, but it may affect cc1 behavior on Gentoo, which should NOT be changed on pch:
+        // https://gitweb.gentoo.org/proj/gcc-patches.git/tree/7.3.0/gentoo/13_all_default-ssp-fix.patch
+        GCC_NOSTDLIB_FLAGS
         "-o", NULL, NULL,
         NULL,
     };
Index: ruby_2_6
===================================================================
--- ruby_2_6	(revision 66849)
+++ ruby_2_6	(revision 66850)

Property changes on: ruby_2_6
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r66817

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

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