PKGBUILDs/extra/qt5-base/qt5-base-cflags.patch

47 lines
2.6 KiB
Diff
Raw Normal View History

2020-02-11 00:14:32 +00:00
diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf
2020-03-30 12:17:58 +00:00
index a493cd5984..41342f5020 100644
2020-02-11 00:14:32 +00:00
--- a/mkspecs/common/g++-unix.conf
+++ b/mkspecs/common/g++-unix.conf
2020-03-30 12:17:58 +00:00
@@ -10,5 +10,6 @@
2020-02-11 00:14:32 +00:00
include(g++-base.conf)
-QMAKE_LFLAGS_RELEASE += -Wl,-O1
2020-03-30 12:17:58 +00:00
+SYSTEM_LDFLAGS = $$(LDFLAGS)
+!isEmpty(SYSTEM_LDFLAGS) { eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS)) } else { QMAKE_LFLAGS_RELEASE += -Wl,-O1 }
2020-02-11 00:14:32 +00:00
QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
2020-03-30 12:17:58 +00:00
index 1f919d270a..7ef6046326 100644
2020-02-11 00:14:32 +00:00
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
2020-03-30 12:17:58 +00:00
@@ -40,9 +40,11 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
2020-02-11 00:14:32 +00:00
QMAKE_CFLAGS_DEPS += -M
QMAKE_CFLAGS_WARN_ON += -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
2020-03-30 12:17:58 +00:00
-QMAKE_CFLAGS_DEBUG += -g
+SYSTEM_CFLAGS = $$(CFLAGS)
+SYSTEM_DEBUG_CFLAGS = $$(DEBUG_CFLAGS)
2021-12-21 20:54:47 +00:00
+!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE += $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
+!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -g $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
2020-03-30 12:17:58 +00:00
+!isEmpty(SYSTEM_DEBUG_CFLAGS) { eval(QMAKE_CFLAGS_DEBUG += $$(DEBUG_CFLAGS)) } else { QMAKE_CFLAGS_DEBUG += -g }
2020-02-11 00:14:32 +00:00
QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC
QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC
2020-03-30 12:17:58 +00:00
QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC
@@ -59,9 +61,11 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+SYSTEM_CXXFLAGS = $$(CXXFLAGS)
+SYSTEM_DEBUG_CXXFLAGS = $$(DEBUG_CXXFLAGS)
2021-12-21 20:54:47 +00:00
+!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE += $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
+!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -g $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
2020-03-30 12:17:58 +00:00
+!isEmpty(SYSTEM_DEBUG_CXXFLAGS) { eval(QMAKE_CXXFLAGS_DEBUG += $$(DEBUG_CXXFLAGS)) } else { QMAKE_CXXFLAGS_DEBUG += -g }
QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP