Package: ruby-mkrf / 0.2.3+dfsg-5

0700_fix_link_command_order.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Fix link command order so it works with ld --as-needed.
Author: Felix Geyer <debfx@ubuntu.com>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684198

--- ruby-mkrf-0.2.3+dfsg.orig/lib/mkrf/availability.rb
+++ ruby-mkrf-0.2.3+dfsg/lib/mkrf/availability.rb
@@ -279,9 +279,9 @@ module Mkrf
     def link_command
       # This current implementation just splats the library_paths in
       # unconditionally.  Is this problematic?
-      "#{@compiler} -o #{TEMP_EXECUTABLE} #{library_paths_compile_string}" +
-      " #{library_compile_string} #{includes_compile_string}" +
-      " #{TEMP_SOURCE_FILE}"
+      "#{@compiler} -o #{TEMP_EXECUTABLE}" +
+      " #{includes_compile_string} #{TEMP_SOURCE_FILE}" + 
+      " #{library_paths_compile_string} #{library_compile_string}"
     end
 
     # Creates a temporary source file with the string passed