use -g1 for mips, mipsel to avoid OOM. Closes: #915506
authorAlastair McKinstry <mckinstry@debian.org>
Tue, 4 Dec 2018 15:54:01 +0000 (15:54 +0000)
committerAlastair McKinstry <mckinstry@debian.org>
Tue, 4 Dec 2018 15:58:39 +0000 (15:58 +0000)
debian/changelog
debian/rules

index 3b03a7903773c04effc11fd7b36b0f243c893f5d..e6d02f4249b734dd0b8f09d3ade5baf01f32eebe 100644 (file)
@@ -1,3 +1,9 @@
+mathgl (2.4.2.1-3) unstable; urgency=medium
+
+  *  use -g1 for mips, mipsel to avoid OOM. Closes: #915506
+
+ -- Alastair McKinstry <mckinstry@debian.org>  Tue, 04 Dec 2018 14:44:18 +0000
+
 mathgl (2.4.2.1-2) unstable; urgency=medium
 
   * Add qtwebengine5-dev to Build-Depends due to the output of cmake
index 3ceb32f61d7ef234428033af2132e006ab190aac..e8d07d48a4b2cc399e87c51df8a8a92e499bb0a8 100755 (executable)
 export DH_VERBOSE=1
 export DH_OPTIONS=-v
 
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+# On low-memory archs, use -g1 to avoid OOM
+LOWMEM_ARCH:= mips mipsel
+ifneq ($(filter $(LOMEM_ARCH), $(DEB_HOST_ARCH)),)
+CXXFLAGS:= $(shell dpkg-buildflags --get CXXFLAGS | sed 's/-g/-g1/')
+export CXXFLAGS
+endif
+
 %:
        dh $@ --buildsystem=cmake --with python2,python3
 
 override_dh_python2:
        dh_numpy
-       
+
 override_dh_python3:
        dh_numpy3