Qt5 without -O3 optimizations

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Qt5 without -O3 optimizations

Rafael Sadowski
If qmake ports use QMAKE_CFLAGS_OPTIMIZE_FULL and/or the macro
"optimize_full" they will always build with -O3.

I saw this in x11/qt5/{qtmultimedia,qtlocation}.

OK so zap -O3 from our qmake-qt5?

RS

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtbase/Makefile,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile
--- Makefile 30 Nov 2018 15:24:09 -0000 1.24
+++ Makefile 4 Jan 2019 23:55:14 -0000
@@ -17,7 +17,7 @@ PKGNAME-psql = qt5-postgresql-${VERSION
 PKGNAME-sqlite2 = qt5-sqlite2-${VERSION}
 PKGNAME-tds = qt5-tds-${VERSION}
 
-REVISION-main = 1
+REVISION-main = 2
 
 PKG_ARCH-global = *
 PKG_ARCH-examples = *
Index: patches/patch-mkspecs_common_gcc-base_conf
===================================================================
RCS file: patches/patch-mkspecs_common_gcc-base_conf
diff -N patches/patch-mkspecs_common_gcc-base_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-mkspecs_common_gcc-base_conf 4 Jan 2019 23:55:14 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: mkspecs/common/gcc-base.conf
+--- mkspecs/common/gcc-base.conf.orig
++++ mkspecs/common/gcc-base.conf
+@@ -32,7 +32,7 @@
+ #
+
+ QMAKE_CFLAGS_OPTIMIZE      = -O2
+-QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
++QMAKE_CFLAGS_OPTIMIZE_FULL = -O2
+ QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og
+ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
+

Reply | Threaded
Open this post in threaded view
|

Re: Qt5 without -O3 optimizations

Stuart Henderson
On 2019/01/05 10:23, Rafael Sadowski wrote:
> If qmake ports use QMAKE_CFLAGS_OPTIMIZE_FULL and/or the macro
> "optimize_full" they will always build with -O3.
>
> I saw this in x11/qt5/{qtmultimedia,qtlocation}.
>
> OK so zap -O3 from our qmake-qt5?

It shouldn't force -O2 either, but use whatever is in CFLAGS.

Reply | Threaded
Open this post in threaded view
|

Re: Qt5 without -O3 optimizations

Rafael Sadowski
On Sat Jan 05, 2019 at 11:58:40AM +0000, Stuart Henderson wrote:
> On 2019/01/05 10:23, Rafael Sadowski wrote:
> > If qmake ports use QMAKE_CFLAGS_OPTIMIZE_FULL and/or the macro
> > "optimize_full" they will always build with -O3.
> >
> > I saw this in x11/qt5/{qtmultimedia,qtlocation}.
> >
> > OK so zap -O3 from our qmake-qt5?
>
> It shouldn't force -O2 either, but use whatever is in CFLAGS.

Good point but I would like to use CXXFLAGS instead CFLAGS.

RS

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtbase/Makefile,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile
--- Makefile 30 Nov 2018 15:24:09 -0000 1.24
+++ Makefile 5 Jan 2019 13:17:34 -0000
@@ -17,7 +17,7 @@ PKGNAME-psql = qt5-postgresql-${VERSION
 PKGNAME-sqlite2 = qt5-sqlite2-${VERSION}
 PKGNAME-tds = qt5-tds-${VERSION}
 
-REVISION-main = 1
+REVISION-main = 2
 
 PKG_ARCH-global = *
 PKG_ARCH-examples = *
Index: patches/patch-mkspecs_common_gcc-base_conf
===================================================================
RCS file: patches/patch-mkspecs_common_gcc-base_conf
diff -N patches/patch-mkspecs_common_gcc-base_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-mkspecs_common_gcc-base_conf 5 Jan 2019 13:17:34 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: mkspecs/common/gcc-base.conf
+--- mkspecs/common/gcc-base.conf.orig
++++ mkspecs/common/gcc-base.conf
+@@ -31,8 +31,8 @@
+ # you can use the manual test in tests/manual/mkspecs.
+ #
+
+-QMAKE_CFLAGS_OPTIMIZE      = -O2
+-QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
++QMAKE_CFLAGS_OPTIMIZE      = $$(CXXFLAGS)
++QMAKE_CFLAGS_OPTIMIZE_FULL = $$(CXXFLAGS)
+ QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og
+ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
+

Reply | Threaded
Open this post in threaded view
|

Re: Qt5 without -O3 optimizations

Stuart Henderson
On 2019/01/11 21:58, Rafael Sadowski wrote:

> On Sat Jan 05, 2019 at 11:58:40AM +0000, Stuart Henderson wrote:
> > On 2019/01/05 10:23, Rafael Sadowski wrote:
> > > If qmake ports use QMAKE_CFLAGS_OPTIMIZE_FULL and/or the macro
> > > "optimize_full" they will always build with -O3.
> > >
> > > I saw this in x11/qt5/{qtmultimedia,qtlocation}.
> > >
> > > OK so zap -O3 from our qmake-qt5?
> >
> > It shouldn't force -O2 either, but use whatever is in CFLAGS.
>
> Good point but I would like to use CXXFLAGS instead CFLAGS.

Assuming they don't have a separate CXXFLAGS then yes go for it.

> RS
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/qt5/qtbase/Makefile,v
> retrieving revision 1.24
> diff -u -p -u -p -r1.24 Makefile
> --- Makefile 30 Nov 2018 15:24:09 -0000 1.24
> +++ Makefile 5 Jan 2019 13:17:34 -0000
> @@ -17,7 +17,7 @@ PKGNAME-psql = qt5-postgresql-${VERSION
>  PKGNAME-sqlite2 = qt5-sqlite2-${VERSION}
>  PKGNAME-tds = qt5-tds-${VERSION}
>  
> -REVISION-main = 1
> +REVISION-main = 2
>  
>  PKG_ARCH-global = *
>  PKG_ARCH-examples = *
> Index: patches/patch-mkspecs_common_gcc-base_conf
> ===================================================================
> RCS file: patches/patch-mkspecs_common_gcc-base_conf
> diff -N patches/patch-mkspecs_common_gcc-base_conf
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-mkspecs_common_gcc-base_conf 5 Jan 2019 13:17:34 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +Index: mkspecs/common/gcc-base.conf
> +--- mkspecs/common/gcc-base.conf.orig
> ++++ mkspecs/common/gcc-base.conf
> +@@ -31,8 +31,8 @@
> + # you can use the manual test in tests/manual/mkspecs.
> + #
> +
> +-QMAKE_CFLAGS_OPTIMIZE      = -O2
> +-QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
> ++QMAKE_CFLAGS_OPTIMIZE      = $$(CXXFLAGS)
> ++QMAKE_CFLAGS_OPTIMIZE_FULL = $$(CXXFLAGS)
> + QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og
> + QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
> +