From 927f26c3512bbf5e17701eba6fd1de5bc7c0effa Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Thu, 9 Jun 2016 11:33:51 +0200 Subject: BSD mkspec cleanup for FreeBSD, NetBSD and OpenBSD to common namespace BSD OS mkspecs share mainly the same configurations except very few differences. Merge into a common/bsd/bsd.conf file to be used across all BSD OSes in their respective qmake.conf and add a qplatformdefs.h that contain the common defines to be re-used in the BSD mkspecs. The change includes the usage of also on NetBSD through the common qplatformdefs.h, which is intended for using NetBSD's version defines. Change-Id: Ibb0ac9e4c8bb5aff7d0febdcab1a4b9600a61117 Reviewed-by: Thiago Macieira --- mkspecs/common/bsd/bsd.conf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 mkspecs/common/bsd/bsd.conf (limited to 'mkspecs/common/bsd/bsd.conf') diff --git a/mkspecs/common/bsd/bsd.conf b/mkspecs/common/bsd/bsd.conf new file mode 100644 index 0000000000..a56a8203dd --- /dev/null +++ b/mkspecs/common/bsd/bsd.conf @@ -0,0 +1,26 @@ +# +# common qmake configuration for *BSD +# + +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM += bsd + +include(../unix.conf) + +QMAKE_CFLAGS_THREAD = -pthread + +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD + +QMAKE_LFLAGS_THREAD = -pthread + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_EXECINFO = -lexecinfo +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_NM = nm -P +QMAKE_RANLIB = -- cgit v1.2.3 From 712e43784930ca2bc562833cfec53ddc462516e7 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Tue, 14 Jun 2016 13:58:13 +0200 Subject: Common bsd.conf: add strip command support Add the strip commands for installation commonly used also on BSD systems. Change-Id: I4113ffa559a737ef92afb7c90ab5e1bff902b1bb Reviewed-by: Oswald Buddenhagen --- mkspecs/common/bsd/bsd.conf | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mkspecs/common/bsd/bsd.conf') diff --git a/mkspecs/common/bsd/bsd.conf b/mkspecs/common/bsd/bsd.conf index a56a8203dd..5af6ba66b7 100644 --- a/mkspecs/common/bsd/bsd.conf +++ b/mkspecs/common/bsd/bsd.conf @@ -24,3 +24,6 @@ QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy QMAKE_NM = nm -P QMAKE_RANLIB = + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded -- cgit v1.2.3 From 792947da7e366c30ce1ecf0a365de6cf113fc35e Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Wed, 15 Jun 2016 18:19:39 +0200 Subject: Common BSD: Add --gc-sections ld flags As common bsd's are using the -ffunction-sections flags from mkspecs/common/gcc-base.conf, also use the --gc-sections ld flags like Linux as all are using GNU ld as their linker and all are capable of using it. The last remaining problems with --gc-sections removing the .name sections providing the OS tags for distinction of the execution layer were solved with NetBSD 6.0 and OpenBSD 5.4, see http://gnats.netbsd.org/40401 and http://www.openbsd.org/plus54.html so this option can safely be used now to reduce the size of moc and rcc tools. Change-Id: I74ccd4f6bc607f6d82d32fc864875f26b26bf167 Reviewed-by: Thiago Macieira --- mkspecs/common/bsd/bsd.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'mkspecs/common/bsd/bsd.conf') diff --git a/mkspecs/common/bsd/bsd.conf b/mkspecs/common/bsd/bsd.conf index 5af6ba66b7..390dfc58d2 100644 --- a/mkspecs/common/bsd/bsd.conf +++ b/mkspecs/common/bsd/bsd.conf @@ -12,6 +12,7 @@ QMAKE_CFLAGS_THREAD = -pthread QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_LFLAGS_THREAD = -pthread +QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections QMAKE_LIBS = QMAKE_LIBS_DYNLOAD = -- cgit v1.2.3