pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/qt5-qtbase qt5-qtbase: Abstract linker flags in qm...
details: https://anonhg.NetBSD.org/pkgsrc/rev/038f08762bbb
branches: trunk
changeset: 388505:038f08762bbb
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Nov 21 18:12:17 2022 +0000
description:
qt5-qtbase: Abstract linker flags in qmake.conf.
Avoids shipping hardcoded linker flags on SunOS that are unsupported.
diffstat:
x11/qt5-qtbase/Makefile | 11 ++++++++++-
x11/qt5-qtbase/Makefile.common | 6 +-----
x11/qt5-qtbase/files/qmake.conf | 3 ++-
3 files changed, 13 insertions(+), 7 deletions(-)
diffs (73 lines):
diff -r b2dc6f243b2c -r 038f08762bbb x11/qt5-qtbase/Makefile
--- a/x11/qt5-qtbase/Makefile Mon Nov 21 17:58:11 2022 +0000
+++ b/x11/qt5-qtbase/Makefile Mon Nov 21 18:12:17 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.122 2022/10/30 13:38:28 adam Exp $
+# $NetBSD: Makefile,v 1.123 2022/11/21 18:12:17 jperkin Exp $
DISTNAME= qtbase-everywhere-opensource-src-${QTVERSION}
PKGNAME= qt5-qtbase-${QTVERSION}
@@ -64,7 +64,12 @@
.include "../../mk/compiler.mk"
+QMAKE_LFLAGS_GCSECTIONS?= -Wl,--gc-sections
+QMAKE_LFLAGS_RELEASE?= -Wl,-O1
+
.if ${OPSYS} == "SunOS"
+QMAKE_LFLAGS_GCSECTIONS= -Wl,-z,ignore
+QMAKE_LFLAGS_RELEASE=
. if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang)
. if ${ABI:U} == "64"
CONFIGURE_ARGS+= -platform solaris-g++-64
@@ -89,6 +94,8 @@
CONFIGURE_ARGS+= -platform freebsd-g++
LDFLAGS+= -lexecinfo
.elif ${OPSYS} == "Darwin"
+QMAKE_LFLAGS_GCSECTIONS= -Wl,-dead_strip
+QMAKE_LFLAGS_RELEASE=
CONFIGURE_ARGS+= -platform macx-clang
CONFIGURE_ARGS+= -no-framework
# pkgsrc has a patch to avoid using SDK, but the configure
@@ -204,6 +211,8 @@
-e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \
-e 's:@QMAKE_RANLIB@:${RANLIB}:g' \
-e 's:@QMAKE_EXTRA@:${QMAKE_EXTRA:Q}:g' \
+ -e 's:@QMAKE_LFLAGS_GCSECTIONS@:${QMAKE_LFLAGS_GCSECTIONS:Q}:g' \
+ -e 's:@QMAKE_LFLAGS_RELEASE@:${QMAKE_LFLAGS_RELEASE:Q}:g' \
${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf
for dir in ${WRKSRC}/mkspecs/*; do \
cp ${WRKSRC}/qmake.conf $${dir}; \
diff -r b2dc6f243b2c -r 038f08762bbb x11/qt5-qtbase/Makefile.common
--- a/x11/qt5-qtbase/Makefile.common Mon Nov 21 17:58:11 2022 +0000
+++ b/x11/qt5-qtbase/Makefile.common Mon Nov 21 18:12:17 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.49 2022/04/18 11:18:15 adam Exp $
+# $NetBSD: Makefile.common,v 1.50 2022/11/21 18:12:17 jperkin Exp $
# used by x11/qt5-mysql/Makefile
# used by x11/qt5-odbc/Makefile
# used by x11/qt5-psql/Makefile
@@ -56,10 +56,6 @@
# for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined.
BUILDLINK_TRANSFORM+= rm:-Wundef
-# SunOS ld doesn't support -rpath-link
-BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${PREFIX}/qt5/lib
-BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${WRKSRC}/lib
-
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
PLIST_VARS+= notdarwin
.if ${OPSYS} != "Darwin"
diff -r b2dc6f243b2c -r 038f08762bbb x11/qt5-qtbase/files/qmake.conf
--- a/x11/qt5-qtbase/files/qmake.conf Mon Nov 21 17:58:11 2022 +0000
+++ b/x11/qt5-qtbase/files/qmake.conf Mon Nov 21 18:12:17 2022 +0000
@@ -31,7 +31,8 @@
QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
QMAKE_LFLAGS = @LDFLAGS@
-QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+QMAKE_LFLAGS_GCSECTIONS = @QMAKE_LFLAGS_GCSECTIONS@
+QMAKE_LFLAGS_RELEASE = @QMAKE_LFLAGS_RELEASE@
QMAKE_LFLAGS_RPATHLINK =
QMAKE_LFLAGS_THREAD = @PTHREAD_LDFLAGS@
Home |
Main Index |
Thread Index |
Old Index