--- texstudio.pro	2020-01-16 03:10:58.000000000 +0800
+++ texstudio.pro	2024-06-23 16:50:32.000000000 +0800
@@ -13,6 +13,8 @@
     CONFIG -= precompile_header
 }
 
+CONFIG -= debug
+
 # allow loading extra config by file for automatic compilations (OBS)
 exists(texstudio.pri):include(texstudio.pri)
 QT += network \
@@ -91,8 +93,7 @@
     config += unix
 
     # #universal tiger
-    CONFIG += link_prl \
-        x86_64
+    CONFIG += link_prl
 
     # QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
     # QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
@@ -398,6 +399,11 @@
     LIBS += -lz
 }
 
+macx { 
+    LIBS += -L@PREFIX@/lib \
+        -lz
+}
+
 freebsd-* {
     LIBS += -lexecinfo
 }
@@ -438,9 +444,9 @@
   QMAKE_CXXFLAGS_DEBUG -= -O -O1 -O2 -O3
   QMAKE_CXXFLAGS_DEBUG += -Wall -Wextra -Wmissing-include-dirs -Wunknown-pragmas -Wundef -Wpointer-arith -Winline -O0
   QMAKE_CXXFLAGS += -std=c++0x
-  !win32:!haiku: QMAKE_LFLAGS += -rdynamic # option not supported by mingw and haiku
+  !macx:!haiku: QMAKE_LFLAGS += -rdynamic # option not supported by macOS and haiku
   else {
-    QMAKE_CXXFLAGS += -gstabs -g
+    QMAKE_CXXFLAGS += -g
     QMAKE_LFLAGS -= -Wl,-s
     QMAKE_LFLAGS_RELEASE -= -Wl,-s
   }
