1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
From f9a6d7a48da109b8cf4afc1b2facb123fb8b014c Mon Sep 17 00:00:00 2001
From: Ileana Dumitrescu <ileanadumi95@protonmail.com>
Date: Mon, 25 Apr 2022 15:42:49 +0300
Subject: [PATCH] fix ftbfs for riscv
Bug-Debian: https://bugs.debian.org/1010157
Forwarded: not-needed
---
ext/extconf.rb | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ext/extconf.rb b/ext/extconf.rb
index 12eb097..0594167 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -39,7 +39,15 @@ unless File.exist?("#{CWD}/dst/#{libdir}/libmsgpackc.a")
ENV['CC'] = '/usr/bin/gcc-4.2'
end
puts " -- env CFLAGS=#{ENV['CFLAGS'].inspect} LDFLAGS=#{ENV['LDFLAGS'].inspect} CC=#{ENV['CC'].inspect}"
- sys("./configure --disable-dependency-tracking --disable-shared --with-pic --prefix=#{CWD}/dst/ --libdir=#{CWD}/dst/#{libdir}")
+ hoststr = `dpkg-architecture -qDEB_HOST_GNU_TYPE`.chomp
+ buildstr = `dpkg-architecture -qDEB_BUILD_GNU_TYPE`.chomp
+ if hoststr == "riscv64-linux-gnu"
+ hoststr = "riscv64-unknown-linux-gnu"
+ end
+ if buildstr == "riscv64-linux-gnu"
+ buildstr = "riscv64-unknown-linux-gnu"
+ end
+ sys("./configure --disable-dependency-tracking --disable-shared --with-pic --prefix=#{CWD}/dst/ --host=#{hoststr} --build=#{buildstr} --libdir=#{CWD}/dst/#{libdir}")
sys("make install")
end
end
--
2.35.2
|