Created
September 8, 2008 17:24
-
-
Save vic/9485 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From c8af791a04d309ad93f2aea9a311d992ae2eb724 Mon Sep 17 00:00:00 2001 | |
From: Victor Hugo Borja <[email protected]> | |
Date: Mon, 8 Sep 2008 12:28:38 -0500 | |
Subject: [PATCH] Link with -rdynamic so that dlopen for TestNativeFunction work. | |
--- | |
rakelib/vm.rake | 12 ++++++------ | |
1 files changed, 6 insertions(+), 6 deletions(-) | |
diff --git a/rakelib/vm.rake b/rakelib/vm.rake | |
index f2114aa..05b8773 100644 | |
--- a/rakelib/vm.rake | |
+++ b/rakelib/vm.rake | |
@@ -122,18 +122,18 @@ def compile(obj, src) | |
end | |
end | |
-def ld t | |
+def ld(task, *options) | |
$link_opts ||= `#{LLVM_CONFIG} --ldflags`.split(/\s+/).join(' ') | |
ld = ENV['LD'] || 'g++' | |
- o = t.prerequisites.find_all { |f| f =~ /o$/ }.join(' ') | |
+ o = task.prerequisites.find_all { |f| f =~ /o$/ }.join(' ') | |
l = ex_libs.join(' ') | |
if $verbose | |
- sh "#{ld} #{$link_opts} -o #{t.name} #{o} #{l}" | |
+ sh "#{ld} #{$link_opts} #{options.join(' ')} -o #{task.name} #{o} #{l}" | |
else | |
- puts "LD #{t.name}" | |
- sh "#{ld} #{$link_opts} -o #{t.name} #{o} #{l}", :verbose => false | |
+ puts "LD #{task.name}" | |
+ sh "#{ld} #{$link_opts} #{options.join(' ')} -o #{task.name} #{o} #{l}", :verbose => false | |
end | |
end | |
@@ -221,7 +221,7 @@ end | |
file 'vm/test/runner.o' => 'vm/test/runner.cpp' # no rule .o => .cpp | |
file 'vm/test/runner' => EXTERNALS + objs + %w[vm/test/runner.o] do |t| | |
- ld t | |
+ ld t, '-rdynamic' | |
end | |
# A simple JIT tester driver | |
-- | |
1.5.4.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment