File: add_fpic_amd64.patch

package info (click to toggle)
mruby 3.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,804 kB
  • sloc: ansic: 44,061; ruby: 21,569; yacc: 7,013; cpp: 516; sh: 30; makefile: 19
file content (12 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (3)
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 51bda6517..fc20fef2f 100644
--- a/tasks/toolchains/gcc.rake
+++ b/tasks/toolchains/gcc.rake
@@ -13,6 +13,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params|
       compiler.command = ENV['CC'] || default_command
       compiler.flags = [c_mandatory_flags, ENV['CFLAGS'] || [compiler_flags, cxx_invalid_flags, %w(-Wwrite-strings)]]
     end
+    compiler.flags += %w(-fPIC) if ENV['DEB_TARGET_ARCH'] == 'amd64'
     compiler.option_include_path = %q[-I"%s"]
     compiler.option_define = '-D%s'
     compiler.compile_options = "-MMD -c #{compile_opt}"