ruby-changes:54634
From: naruse <ko1@a...>
Date: Fri, 18 Jan 2019 06:54:29 +0900 (JST)
Subject: [ruby-changes:54634] naruse:r66849 (ruby_2_6): merge revision(s) 66811, 66812, 66816: [Backport #15522]
naruse 2019-01-18 06:54:24 +0900 (Fri, 18 Jan 2019) New Revision: 66849 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66849 Log: merge revision(s) 66811,66812,66816: [Backport #15522] mjit_worker.c: untangle CC_LIBS nesting This should have no impact. The CC_LIBS was too hard to read for human. I don't remember whether the order of -lmsvcrt and -lgcc matters or not, but I kept that for the best safety. mjit_worker.c: pass -lgcc to GCC platforms using `-nodefaultlibs -nostdlib`. I assume libgcc is needed when we use -nostdlib, and it's linked on some platforms but not linked on some platforms (like aarch64, and possibly AIX as well) as said in https://wiki.osdev.org/Libgcc : > You can link with libgcc by passing -lgcc when linking your kernel with your compiler. You don't need to do this unless you pass the -nodefaultlibs option (implied by -nostdlib) Also note that -nostdlib is not strictly needed (rather implied -nodefaultlibs is problematic for Gentoo like Bug#15513, which will be approached later) but helpful for performance. So I want to keep it for now. [Bug #15522] I'm not trying to add `-nodefaultlibs -nostdlib` for AIX in this commit because AIX RubyCI is dead right now, but I'll try to add them again once RubyCI is fixed. mjit_worker.c: try passing -nostdlib to AIX r66812 might have allowed this. Testing. 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 66848) +++ ruby_2_6/version.h (revision 66849) @@ -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 17 +#define RUBY_PATCHLEVEL 18 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 1 Index: ruby_2_6/mjit_worker.c =================================================================== --- ruby_2_6/mjit_worker.c (revision 66848) +++ ruby_2_6/mjit_worker.c (revision 66849) @@ -260,7 +260,7 @@ static const char *const CC_DLDFLAGS_ARG https://github.com/ruby/ruby/blob/trunk/ruby_2_6/mjit_worker.c#L260 MJIT_DLDFLAGS #if defined __GNUC__ && !defined __clang__ "-nostartfiles", -# if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(_AIX) +# if !defined(_WIN32) && !defined(__CYGWIN__) "-nodefaultlibs", "-nostdlib", # endif #endif @@ -269,13 +269,13 @@ static const char *const CC_DLDFLAGS_ARG https://github.com/ruby/ruby/blob/trunk/ruby_2_6/mjit_worker.c#L269 static const char *const CC_LIBS[] = { #if defined(_WIN32) || defined(__CYGWIN__) - MJIT_LIBS -# if defined __GNUC__ && !defined __clang__ -# if defined(_WIN32) - "-lmsvcrt", -# endif - "-lgcc", + MJIT_LIBS // mswin, mingw, cygwin +#endif +#if defined __GNUC__ && !defined __clang__ +# if defined(_WIN32) + "-lmsvcrt", // mingw # endif + "-lgcc", // mingw, cygwin, and GCC platforms using `-nodefaultlibs -nostdlib` #endif NULL }; Index: ruby_2_6 =================================================================== --- ruby_2_6 (revision 66848) +++ ruby_2_6 (revision 66849) Property changes on: ruby_2_6 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r66811-66812,66816 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/