[neon/qt/qtcreator/Neon/release] debian: build using clang on mips archs
Pino Toscano
null at kde.org
Mon Jan 16 22:09:48 GMT 2023
Git commit bb73f011c85b670c8dea8640dbc526a92062fd4d by Pino Toscano.
Committed on 27/11/2022 at 08:35.
Pushed by carlosdem into branch 'Neon/release'.
build using clang on mips archs
workaround a gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102602
M +5 -0 debian/changelog
M +10 -1 debian/rules
https://invent.kde.org/neon/qt/qtcreator/commit/bb73f011c85b670c8dea8640dbc526a92062fd4d
diff --git a/debian/changelog b/debian/changelog
index 7b92f7c..9f1414a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ qtcreator (9.0.0-2) UNRELEASED; urgency=medium
[ Pino Toscano ]
* Merge changes from 8.0.2-1.
+ * Build using clang on mips64el, and mipsel, to workaround a GCC bug:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102602
+ - point CC & CXX to clang
+ - restore explicit as-needed linking, as it seems needed when using clang
+ - disable the build with precompiled headers (PCH), as it is not working
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sat, 26 Nov 2022 08:53:12 +0100
diff --git a/debian/rules b/debian/rules
index 41e27d4..01a9c8b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,14 @@ upstream_version_of_pkg = $(shell dpkg-query -f '$${Version}' -W $(1) | sed -e '
archs_with_dwz_low_mem = armel armhf mipsel
dwz_low_mem = 3000000
+archs_using_clang = mips64el mipsel
+ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(archs_using_clang)))
+export CC=clang
+export CXX=clang++
+export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
+EXTRA_CMAKE_ARGS += -DBUILD_WITH_PCH=OFF
+endif
+
%:
dh $@ --builddirectory=builddir
@@ -29,7 +37,8 @@ override_dh_auto_configure:
-DWITH_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DCLANGTOOLING_LINK_CLANG_DYLIB=ON \
- -DWITH_DOCS=$(if $(filter qtcreator-doc, $(shell dh_listpackages)),ON,OFF)
+ -DWITH_DOCS=$(if $(filter qtcreator-doc, $(shell dh_listpackages)),ON,OFF) \
+ $(EXTRA_CMAKE_ARGS)
execute_after_dh_auto_build-indep:
dh_auto_build -- docs
More information about the Neon-commits
mailing list