maintainer-feedback requested: [Bug 287626] devel/qt6-tools overrides CFLAGS

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jun 18 11:16:43 BST 2025


Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-kde (group)
<kde at FreeBSD.org> for maintainer-feedback:
Bug 287626: devel/qt6-tools overrides CFLAGS
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287626



--- Description ---
Here's how compiler being called:
[ 99% 732/733] ccache /usr/local/libexec/ccache/c++ -DNETWORK_DIAG
-DQT_CORE_LIB -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB
-DQT_NETWORK_LIB -DQT_NO_AS_CONST=1 -DQT_NO_CONTEXTLESS_CONNECT=1 -DQT_NO_DEBUG
-DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1
-DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QSNPRINTF -DQT_OPENGL_LIB
-DQT_WIDGETS_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST
-I/wrkdirs/usr/ports/devel/qt6-tools/work/.build/src/qtdiag/qtdiag_autogen/incl
ude
-I/wrkdirs/usr/ports/devel/qt6-tools/work/qttools-everywhere-src-6.9.1/src/qtdi
ag
-I/wrkdirs/usr/ports/devel/qt6-tools/work/.build/src/qtdiag -isystem
/usr/local/include/qt6/QtCore -isystem /usr/local/include/qt6 -isystem
/usr/local/lib/qt6/mkspecs/freebsd-clang -isystem
/usr/local/include/qt6/QtCore/6.9.1 -isystem
/usr/local/include/qt6/QtCore/6.9.1/QtCore -isystem
/usr/local/include/qt6/QtOpenGL -isystem /usr/local/include/qt6/QtGui -isystem
/usr/local/include -isystem /usr/local/include/qt6/QtGui/6.9.1 -isystem
/usr/local/include/qt6/QtGui/6.9.1/QtGui -isystem
/usr/local/include/qt6/QtWidgets -isystem /usr/local/include/qt6/QtNetwork -O3
-pipe -march=skylake -fstack-protector-strong -fno-strict-aliasing -pipe
-march=skylake -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG -O2
-std=gnu++17 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wall
-Wextra -fPIC -pthread -fcf-protection=full -ftrivial-auto-var-init=pattern
-fstack-protector-strong -fno-exceptions -MD -MT
src/qtdiag/CMakeFiles/qtdiag.dir/qtdiag.cpp.o -MF
src/qtdiag/CMakeFiles/qtdiag.dir/qtdiag.cpp.o.d -o
src/qtdiag/CMakeFiles/qtdiag.dir/qtdiag.cpp.o -c
/wrkdirs/usr/ports/devel/qt6-tools/work/qttools-everywhere-src-6.9.1/src/qtdiag
/qtdiag.cpp

make.conf cut:
CPUTYPE?=skylake
CFLAGS=-O3 -pipe

Actual invocation: <...> -O3 -pipe -march=skylake <...> -O2 -std=gnu++17 <...>
Thus, latter '-O2' overrides my CFLAGS.

According to section 13.9 of Porter's Handbook [0], port MUST respect CFLAGS,
especially optimization level:
> The port must respect CFLAGS. What we mean by this is that the port must not
set the value of this variable absolutely, overriding the existing value.
> Remove optimization flags from the third party Makefiles. The system CFLAGS
contains system-wide optimization flags.

[0]: https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags


More information about the kde-freebsd mailing list