From ffabbfb048e0457424ccc6811f4edcd3d45298f5 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 9 Mar 2015 18:07:45 +0100 Subject: [PATCH] * debian/rules: Do not hard-code the path to the LTO plugin. --- debian/rules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 7dfff456d..fc1a77152 100755 --- a/debian/rules +++ b/debian/rules @@ -21,7 +21,9 @@ include /usr/share/dpkg/default.mk %: dh $@ --parallel --with=python3 -LTOPLUG = /usr/lib/gcc/x86_64-linux-gnu/4.9/liblto_plugin.so +# Find the LTO plugin, which we need to pass to ar, nm, and ranlib. +LTOPLUG := $(shell gcc -v 2>&1 | \ + sed -n 's:COLLECT_LTO_WRAPPER=\(/.*/\)[^/]*:\1:p')liblto_plugin.so # ARFLAGS is for Automake # AR_FLAGS is for Libtool