diff options
author | Giovanni Panozzo <giovanni@panozzo.it> | 2020-07-29 23:47:43 +0300 |
---|---|---|
committer | Giovanni Panozzo <giovanni@panozzo.it> | 2020-07-29 23:47:43 +0300 |
commit | 9d7ae584a1abac1a95435e83898e30cdd0d1a1ab (patch) | |
tree | 9db8a809f2df9e7d39ffccc025da9720d137c917 | |
parent | e566799a780e78636dbb5c35a164bca14659052d (diff) |
Use DEB_TARGET_ARCH to identify armhf target
-rwxr-xr-x | debian/rules | 5 |
1 files 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 |