File: add_fpic_amd64.patch

package info (click to toggle)
mruby 1.2.0%2B20161228%2Bgit30d5424a-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,792 kB
  • ctags: 4,125
  • sloc: ansic: 29,570; ruby: 13,100; yacc: 5,883; sh: 16; makefile: 12
file content (12 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
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'