1 2 3 4 5 6 7 8 9 10 11 12
|
diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake
index fb14558..90da985 100644
--- a/tasks/toolchains/gcc.rake
+++ b/tasks/toolchains/gcc.rake
@@ -2,6 +2,7 @@ MRuby::Toolchain.new(:gcc) do |conf|
[conf.cc, conf.objc, conf.asm].each do |cc|
cc.command = ENV['CC'] || 'gcc'
cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings)]
+ cc.flags += %w(-fPIC) if ENV['DEB_TARGET_ARCH'] == 'amd64'
cc.defines = %w(DISABLE_GEMS)
cc.option_include_path = '-I%s'
cc.option_define = '-D%s'
|