From 9d7ae584a1abac1a95435e83898e30cdd0d1a1ab Mon Sep 17 00:00:00 2001 From: Giovanni Panozzo Date: Wed, 29 Jul 2020 20:47:43 +0000 Subject: Use DEB_TARGET_ARCH to identify armhf target --- debian/rules | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index f254b13..3174d2d 100755 --- a/debian/rules +++ b/debian/rules @@ -62,8 +62,9 @@ DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_INSTALL_INCLUDEDIR=include/$(shell dpkg-archit # Add FFmpeg and GSM support to Ubuntu DEB_CMAKE_EXTRA_FLAGS += -DWITH_FFMPEG=ON -DWITH_GSM=ON -# gcc on ubuntu 18.04 armhf is bugged when using -O2. Replace with -O1 -ifneq (,$(filter armhf,$(DEB_HOST_ARCH))) +# gcc on ubuntu 18.04 targeting at armhf is bugged when using -O2. Replace with -O1 +DEB_TARGET_ARCH?=$(shell dpkg-architecture -qDEB_TARGET_ARCH) +ifneq (,$(filter armhf,$(DEB_TARGET_ARCH))) DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_C_FLAGS="-O1 -g" endif -- cgit v1.2.3