make.conf fragility

Some ports fail to build due to make.conf fragility.
Even simple and unharmfull ones like,
CFLAGS+= -no-lto
CXXFLAGS+= -no-lto
LDFLAGS+= -no-lto
 
make.conf isn't "fragile".

Fiddling with compiler/linker flags is fragile and will always be.

What problem are you really trying to solve? Seeing "lto" here: The ports framework currently doesn't enable LTO, some ports do, but AFAIK all of them provide an option for it.
 
Indeed it's not make it's the ports themselves.
They expect sometimes none compile or link flags , or bail out with a build-error.
And it's only a few ports like 1%. All the rest build fine.
 
Trying seriously again: Fiddling with compiler/linker flags is almost always wrong, don't do it.

So, I'll repeat my question: What's the goal of that idea? Any specific ports you had problems with? Why do you think these flags would help?
 
zirias@ I think you already know the answer to your question. The goal is to rice builds via Gentoo Linux metaphor.

Which in turn answers the following:

Why do you think these flags would help?

Usually with badassery and street cred? 😛
 
zirias@ I think you already know the answer to your question. The goal is to rice builds via Gentoo Linux metaphor.
I didn't link this specific site, partially because it just derails the topic, partially because some attempt to disable LTO hardly qualifies as "ricing" 😂.

Still, waiting for an answer what actual problem should be solved here....
 
Well... I also see "ricing" in general as a way to implementing improvement but wouldn't reward much gain or any benefit, regardless if it's performance-focused or not. Also, my "derailment" is on point with your "fiddling with compiler/linker flags" argument. I don't appreciate your bashing reply either way.

But whatever, my apologies for "partially" derailing this...
 
I don't appreciate your bashing reply either way.
Uhm. Really don't know what to say here, except maybe you might consider questioning your interpretation of my response? Maybe my english language skills can't be trusted, I don't know 🤷‍♂️. I can put it directly if that's preferred ... it sure reminded me of the "Gentoo ricer" as well (so ... had some fun here including reading your post), I just think the hints were enough as there still might be a real problem hidden ;)

edit: looking like a rage quit now and I'm really sorry about that. Still, I don't really understand it 😕...
 
Some ports fail to build due to make.conf fragility.
Even simple and unharmfull ones like,
CFLAGS+= -no-lto
CXXFLAGS+= -no-lto
LDFLAGS+= -no-lto
Y'know, a lesson that I derive from comments like that is that global flags should be used with great care.

For example, I always enable the DOCS flag, but I wouldn't do that in /etc/make.conf. Reasoning is that some ports download documentation from the project's home site (a lot of Python modules do that), and some interpret the DOCS to mean that make should invoke the doxygen command to look through the source code and generate documentation from in-line comments. And if devel/doxygen is not installed/compiled, then that whole port just doesn't build, and needs to have the DOCS flag turned off. I've had that happen to me - one time devel/doxygen just didn't build for some reason, and that affected port compilation down the line.
 
For example, I always enable the DOCS flag
JFTR, DOCS is enabled by default in the ports framework... :-/
some interpret the DOCS to mean that make should invoke the doxygen command
There isn't a really clear guideline about this. IMHO, when "doxygen" is about the only documentation available at all, DOCS should enable it. But there are contrary opinions as well because it's a pretty heavy dependency...
 
SirDice warned me it is a bad idea, but these are the flags i currently use.
Code:
CFLAGS+= -O2 -pipe  -fvisibility=default -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions -fno-lto -fpie -fpic -fstack-protector
CXXFLAGS+= -O2 -pipe  -fvisibility=default -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions -fno-lto -fpie -fpic -fstack-protector
LDFLAGS+= -fno-lto -fpie -fpic
 
Previously i had "-fomit-frame-pointer" but i dropped it because the frame-pointer can allow profiling.
Also some linux distro's have now '-fno-omit-frame-pointer" as default...
 
Ufff ....
  • -O2: Default in most upstreams. Setting it here might overrule upstream, leading to both enabling optimizations on code that doesn't expect it and disabling other upstream defaults like e.g. -O3 or -Os.
  • -pipe: Tries using pipes between stages instead of temp files. Often added anyways, close to no impact at all.
  • -fvisibility=default: Surprise, this is the compiler default. Some libs might want to hide symbols by default, only exposing those explicitly marked, adding this flag here could break that.
  • -D_FORTIFY_SOURCE=2: A glibc feature, utterly pointless here.
  • -D_GLIBCXX_ASSERTIONS: A feature of gcc's libstdc++, almost as pointless.
  • -fexceptions: Compiler default. And C++ code compiled without exceptions has a reason to do so.
  • -fno-lto: Compiler default. Might break in funny ways with upstream code actually enabling LTO.
  • -fpie: Compiler default.
  • -fpic: Only makes sense for libraries, their build systems will set it.
  • -fstack-protector: Default in FreeBSD ports (actually, they even use the "strong" variant by default), with a mechanism for individual ports that are incompatible with it to disable it. Setting it here, you just break these ports.
Ok, didn't find any single entry that makes any sense here. The only one that does something without potentially causing trouble is -pipe, and the benefit of that is very questionable.

Again: What are you really trying to achieve with this?

Edit: A word of explanations about all the things that "could" break: In practice they will break somewhere. In theory, a perfect build system would construct CFLAGS and friends by first placing its overridable defaults, then the user-supplied CFLAGS and finally the flags that shouldn't be overridable to avoid breakage. In practice, almost no upstream build system is "perfect" and there's always a way to break the build with some CFLAGS setting.

Takeaway is: Do not set global CFLAGS (and friends). There might be rare situations where you need some custom CFLAGS for a specific port as a workaround for some specific problem, then set them only for this port (this is almost never needed).
 
Yeah, this really bears repeating:

Y'know, a lesson that I derive from comments like that is that global flags should be used with great care.

If flags for a specific port need tweaking (and you know what you're doing), then there's no problem if you do that for that specific port. But there's no such thing as 'one-size-fits-all'. I think that /etc/make.conf was intended for tweaking how make works to begin with... not "Default flags to be set with every port", but more like ability to actually find and read the Makefile, ability to invoke compilers and other utilities that get specified in the Makefile... or the ability to resolve a system variable and translate it into a flag to be passed on... Just a very different scope than per-port flags. 😩
 
Some feedback. [ Must say SirDice was right from the beginning.]
I will remove my "stupid" CFLAGS,CXXFLAGS,LDFLAGS lines.
Why. It breakes more than i can bare. My system became even no longer bootable. It breaks stuff in strange ways.
It breaks stuff in dependent ports...
In short make.conf is good in setting port options, but setting "general" compiler or linker flags seems to be a very bad idea.
 
Alain De Vos don't feel bad about it, it's obviously a learning experience here (and that's why I took the time to give an assessment on every single flag you had....). The one you could probably keep without risking any breakage is -pipe, but then, there's really little to gain....

Once presented some powerful system to automatically build software on your own machine (and yes, that's what FreeBSD's ports is, and probably also Gentoo's portage although I never tried it), I certainly see the temptation to fiddle with stuff "just because". Nothing wrong with that, just one thing to keep in mind: Fiddling with stuff you don't fully understand can easily cause problems.

I hope I could help to understand why global CFLAGS will cause problems sooner or later.

Maybe now it is time to post this (ages old) article for some giggles: https://www.shlomifish.org/humour/by-others/funroll-loops/Gentoo-is-Rice.html

Disclaimer: This isn't meant for bashing Gentoo here, also not for bashing its users, just a kind of funny collection of "stupid" things some Gentoo users did and/or wrote. Still it's poking fun of other people, so only read it if you're prepared not to take it too seriously ;)
 
This is my current make.conf with removal of CFLAGS,CXXFLAGS&LDFLAGS,
Code:
BATCH=yes
CPUTYPE?=alderlake
DISABLE_LICENSES=yes
MAKE_JOBS_NUMBER=12
MAKE_JOBS_UNSAFE=yes
MTREE_FOLLOWS_SYMLINKS= -L
NO_CHECKSUM=yes
OPENSSLBASE=/usr/local
WITHOUT_CCACHE_BUILD=yes
WITHOUT_MANCOMPRESS=yes

DEFAULT_VERSIONS+= mysql=10.6m
DEFAULT_VERSIONS+= ssl=openssl
DEFAULT_VERSIONS+= java=11

MAKEOPTS="-j12"
NINJAOPTS="-j12"

OPTIONS_SET+=WASM
OPTIONS_SET+=BE_WASM
OPTIONS_SET+=16BIT_PIXEL
OPTIONS_SET+=7ZIP
OPTIONS_SET+=A4
OPTIONS_SET+=A52
OPTIONS_SET+=AAC
OPTIONS_SET+=AALIB
OPTIONS_SET+=AES 
OPTIONS_SET+=ALSA
OPTIONS_SET+=AMDGPU
OPTIONS_SET+=AMIDI
OPTIONS_SET+=AMR_NB
OPTIONS_SET+=AMR_WB
OPTIONS_SET+=AMRNB
OPTIONS_SET+=AMRWB
OPTIONS_SET+=AOM
OPTIONS_SET+=APNG
OPTIONS_SET+=ARCHIVE
OPTIONS_SET+=ARIBB24
OPTIONS_SET+=ASM
OPTIONS_SET+=ASPELL
OPTIONS_SET+=ASS
OPTIONS_SET+=AVCODEC
OPTIONS_SET+=AVX
OPTIONS_SET+=BASU
OPTIONS_SET+=BE_STANDARD
OPTIONS_SET+=BLAS
OPTIONS_SET+=BLASLAPACK
OPTIONS_SET+=BLURAY
OPTIONS_SET+=BOOTSTRAP
OPTIONS_SET+=BROTLI
OPTIONS_SET+=BS2B
OPTIONS_SET+=BZIP2
OPTIONS_SET+=CACA
OPTIONS_SET+=CAIRO
OPTIONS_SET+=CAJA
OPTIONS_SET+=CBLAS
OPTIONS_SET+=CDDA
OPTIONS_SET+=CDDB
OPTIONS_SET+=CDIO
OPTIONS_SET+=CDPARANOIA
OPTIONS_SET+=CHROMECAST
OPTIONS_SET+=CLI
OPTIONS_SET+=CODEC2
OPTIONS_SET+=COMPFACE
OPTIONS_SET+=CRACKLIB
OPTIONS_SET+=CRYPTO
OPTIONS_SET+=CUE
OPTIONS_SET+=CUPS
OPTIONS_SET+=CURL
OPTIONS_SET+=CURSES
OPTIONS_SET+=DAV1D
OPTIONS_SET+=DBENGINE
OPTIONS_SET+=DC1394
OPTIONS_SET+=DCA
OPTIONS_SET+=DEMO
OPTIONS_SET+=DEMOS
OPTIONS_SET+=DIRECTFB
OPTIONS_SET+=DJVU
OPTIONS_SET+=DOCS
OPTIONS_SET+=DRM
OPTIONS_SET+=DV
OPTIONS_SET+=DVDCSS
OPTIONS_SET+=DVDNAV
OPTIONS_SET+=DVDREAD
OPTIONS_SET+=EFL
OPTIONS_SET+=EGL
OPTIONS_SET+=EIGEN
OPTIONS_SET+=ENCA
OPTIONS_SET+=ENCHANT
OPTIONS_SET+=EPUB
OPTIONS_SET+=EXAMPLES
OPTIONS_SET+=EXPAT
OPTIONS_SET+=EXTRADOCS
OPTIONS_SET+=FAAC
OPTIONS_SET+=FAAD
OPTIONS_SET+=FDK_AAC
OPTIONS_SET+=FFMPEG
OPTIONS_SET+=FFMPEGTHUMBNAILER
OPTIONS_SET+=FFTW
OPTIONS_SET+=FLAC
OPTIONS_SET+=FLITE
OPTIONS_SET+=FLTK
OPTIONS_SET+=FLUID
OPTIONS_SET+=FONTCONFIG
OPTIONS_SET+=FPX
OPTIONS_SET+=FREEIPMI
OPTIONS_SET+=FREERDP
OPTIONS_SET+=FREETYPE
OPTIONS_SET+=FREI0R
OPTIONS_SET+=FRIBIDI
OPTIONS_SET+=GDBM
OPTIONS_SET+=GIF
OPTIONS_SET+=GLESV2
OPTIONS_SET+=GME
OPTIONS_SET+=GMP
OPTIONS_SET+=GOOM
OPTIONS_SET+=GOPLUGIN
OPTIONS_SET+=GPL3
OPTIONS_SET+=GRAPHICSMAGICK
OPTIONS_SET+=GRAPHITE
OPTIONS_SET+=GRAPHVIZ
OPTIONS_SET+=GS_ijs
OPTIONS_SET+=GSLIB
OPTIONS_SET+=GSM
OPTIONS_SET+=GSPELL
OPTIONS_SET+=GSSAPI_NONE
OPTIONS_SET+=GTK
OPTIONS_SET+=GTK3
OPTIONS_SET+=GTKSPELL
OPTIONS_SET+=GUI
OPTIONS_SET+=GZIP
OPTIONS_SET+=HAN
OPTIONS_SET+=HCACHE_KYOTOCABINET
OPTIONS_SET+=HCACHE_TOKYOCABINET
OPTIONS_SET+=HDRI
OPTIONS_SET+=HIGHLIGHT
OPTIONS_SET+=HIGHLIGHTING
OPTIONS_SET+=HINTING_FULL
OPTIONS_SET+=HSPELL
OPTIONS_SET+=HTMLDOCS
OPTIONS_SET+=HTMLHELP
OPTIONS_SET+=HTTP_REDIS
OPTIONS_SET+=HUNSPELL
OPTIONS_SET+=ICONV
OPTIONS_SET+=IJS
OPTIONS_SET+=ILBC
OPTIONS_SET+=IMAGEMAGICK
OPTIONS_SET+=IMAGEMAGICK7
OPTIONS_SET+=INFLUXDB
OPTIONS_SET+=INSULTS
OPTIONS_SET+=IPC
OPTIONS_SET+=IPV6
OPTIONS_SET+=ISO9660
OPTIONS_SET+=ISPELL
OPTIONS_SET+=JASPER
OPTIONS_SET+=JBIG
OPTIONS_SET+=JPEG
OPTIONS_SET+=JPEG2000
OPTIONS_SET+=JSON
OPTIONS_SET+=JXL
OPTIONS_SET+=KATE
OPTIONS_SET+=KERBEROS
OPTIONS_SET+=KERBEROS5
OPTIONS_SET+=KVAZAAR
OPTIONS_SET+=KYOTOCABINET
OPTIONS_SET+=LADSPA
OPTIONS_SET+=LAME
OPTIONS_SET+=LAPACK
OPTIONS_SET+=LARGE_RSA
OPTIONS_SET+=LCMS2
OPTIONS_SET+=LENSFUN
OPTIONS_SET+=LIBBLURAY
OPTIONS_SET+=LIBMNG
OPTIONS_SET+=LIBPLACEBO
OPTIONS_SET+=LIBRSVG2
OPTIONS_SET+=LIBRTMP
OPTIONS_SET+=LIBSSH2
OPTIONS_SET+=LIBVISUAL
OPTIONS_SET+=LIBXML2
OPTIONS_SET+=LIBYAML
OPTIONS_SET+=LIVEMEDIA
OPTIONS_SET+=LQR
OPTIONS_SET+=LSOF
OPTIONS_SET+=LV2
OPTIONS_SET+=LZ4
OPTIONS_SET+=LZMA
OPTIONS_SET+=LZO
OPTIONS_SET+=LZO2
OPTIONS_SET+=MAD
OPTIONS_SET+=MAGICK
OPTIONS_SET+=MAIL_IMAP
OPTIONS_SET+=MAIL_SMTP
OPTIONS_SET+=MAIL_SSL
OPTIONS_SET+=MAILDIR
OPTIONS_SET+=MAN3
OPTIONS_SET+=MANPAGES
OPTIONS_SET+=MATROSKA
OPTIONS_SET+=MAXIMA
OPTIONS_SET+=MDB6
OPTIONS_SET+=MENCODER
OPTIONS_SET+=MJPEGTOOLS
OPTIONS_SET+=MKFONTSCALE
OPTIONS_SET+=MMX
OPTIONS_SET+=MODPLUG
OPTIONS_SET+=MODULES
OPTIONS_SET+=MONGO
OPTIONS_SET+=MONGODB
OPTIONS_SET+=MONGOSTAT
OPTIONS_SET+=MONGOTOP
OPTIONS_SET+=MOUNT
OPTIONS_SET+=MP3LAME
OPTIONS_SET+=MP3OGG
OPTIONS_SET+=MPC
OPTIONS_SET+=MPEG2
OPTIONS_SET+=MPG123
OPTIONS_SET+=MPG321
OPTIONS_SET+=MPLAYER
OPTIONS_SET+=MPV
OPTIONS_SET+=MTP
OPTIONS_SET+=MULTILIB
OPTIONS_SET+=MUPDF
OPTIONS_SET+=MUSEPACK
OPTIONS_SET+=MYSOFA
OPTIONS_SET+=MYSQL
OPTIONS_SET+=MYSQL_JDBC
OPTIONS_SET+=NCURSES
OPTIONS_SET+=NDBM
OPTIONS_SET+=NEON
OPTIONS_SET+=NETWORK
OPTIONS_SET+=NEWSYSLOG
OPTIONS_SET+=NGINX
OPTIONS_SET+=NONFREE
OPTIONS_SET+=NORMALIZE
OPTIONS_SET+=NOTIFY
OPTIONS_SET+=NOTIFYD
OPTIONS_SET+=NUMPY
OPTIONS_SET+=NVENC
OPTIONS_SET+=NVIDIA
OPTIONS_SET+=OCAML 
OPTIONS_SET+=OCTAVE
OPTIONS_SET+=ODBC
OPTIONS_SET+=OGG
OPTIONS_SET+=OGG 
OPTIONS_SET+=OPENAL
OPTIONS_SET+=OPENBLAS
OPTIONS_SET+=OPENCL
OPTIONS_SET+=OPENCV
OPTIONS_SET+=OPENEXR
OPTIONS_SET+=OPENGL
OPTIONS_SET+=OPENH264
OPTIONS_SET+=OPENJPEG
OPTIONS_SET+=OPENSSL
OPTIONS_SET+=OPTIMIZED_CFLAGS
OPTIONS_SET+=OPUS
OPTIONS_SET+=OSS
OPTIONS_SET+=OSS4
OPTIONS_SET+=PANGO
OPTIONS_SET+=PCRE
OPTIONS_SET+=PCRE1
OPTIONS_SET+=PCRE2
OPTIONS_SET+=PDF
OPTIONS_SET+=PGO
OPTIONS_SET+=PGSQL
OPTIONS_SET+=PGSQL_JDBC
OPTIONS_SET+=PIE
OPTIONS_SET+=PIXBUF
OPTIONS_SET+=PLATFORM_X11
OPTIONS_SET+=PLOTUTILS
OPTIONS_SET+=PLUGINS
OPTIONS_SET+=PNG
OPTIONS_SET+=POPCNT 
OPTIONS_SET+=POPPLER
OPTIONS_SET+=PORTAUDIO
OPTIONS_SET+=POSTGRES
OPTIONS_SET+=POSTPROC
OPTIONS_SET+=PROFILE
OPTIONS_SET+=PROFILER
OPTIONS_SET+=PROFILING
OPTIONS_SET+=PROMETHEUS
OPTIONS_SET+=PSGHOSTSCRIPT
OPTIONS_SET+=PSHYBRID
OPTIONS_SET+=PSMUPDF
OPTIONS_SET+=PSPELL
OPTIONS_SET+=PSPOPPLER
OPTIONS_SET+=PYGLET
OPTIONS_SET+=PYGMENTS
OPTIONS_SET+=PYTHON
OPTIONS_SET+=QT5
OPTIONS_SET+=QTWEBENGINE
OPTIONS_SET+=R
OPTIONS_SET+=RABBITMQ
OPTIONS_SET+=RAQM
OPTIONS_SET+=RAV1E
OPTIONS_SET+=RAW
OPTIONS_SET+=RCC
OPTIONS_SET+=RE2
OPTIONS_SET+=REALRTSP
OPTIONS_SET+=REDIS
OPTIONS_SET+=REDIS2
OPTIONS_SET+=REGEX
OPTIONS_SET+=RELRO
OPTIONS_SET+=RIST
OPTIONS_SET+=RTCPU
OPTIONS_SET+=RTMP
OPTIONS_SET+=RTMPDUMP
OPTIONS_SET+=RUBY
OPTIONS_SET+=RXVT_SCROLLBAR
OPTIONS_SET+=SAMPLERATE
OPTIONS_SET+=SCILAB
OPTIONS_SET+=SCIPY
OPTIONS_SET+=SDL
OPTIONS_SET+=SETXKBMAP
OPTIONS_SET+=SHARED
OPTIONS_SET+=SHOUTCAST
OPTIONS_SET+=SID
OPTIONS_SET+=SIDPLAY
OPTIONS_SET+=SIMD
OPTIONS_SET+=SIXEL
OPTIONS_SET+=SKINS
OPTIONS_SET+=SLANG
OPTIONS_SET+=SNAPPY
OPTIONS_SET+=SNDFILE
OPTIONS_SET+=SNDIO
OPTIONS_SET+=SNMP
OPTIONS_SET+=SOCKS
OPTIONS_SET+=SOURCE
OPTIONS_SET+=SOURCE_HIGHLIGHT
OPTIONS_SET+=SOURCES
OPTIONS_SET+=SOXR
OPTIONS_SET+=SPARSE
OPTIONS_SET+=SPEEDPITCH
OPTIONS_SET+=SPEEX
OPTIONS_SET+=SPELL
OPTIONS_SET+=SPELL_CHECK
OPTIONS_SET+=SPELLCHECK
OPTIONS_SET+=SPHINX
OPTIONS_SET+=SQL
OPTIONS_SET+=SQLITE
OPTIONS_SET+=SQLITE3
OPTIONS_SET+=SRT
OPTIONS_SET+=SSE
OPTIONS_SET+=SSE2
OPTIONS_SET+=SSE3
OPTIONS_SET+=SSE4_1
OPTIONS_SET+=SSE4_2
OPTIONS_SET+=SSE41
OPTIONS_SET+=SSE42
OPTIONS_SET+=SSH
OPTIONS_SET+=SSL
OPTIONS_SET+=SSL3
OPTIONS_SET+=SSSE3
OPTIONS_SET+=SSWF
OPTIONS_SET+=STANDARD_BOOTSTRAP
OPTIONS_SET+=STREAM
OPTIONS_SET+=SUITESPARSE
OPTIONS_SET+=SVG
OPTIONS_SET+=SVGALIB
OPTIONS_SET+=SVTAV1
OPTIONS_SET+=SWSCALE
OPTIONS_SET+=SYNTAX 
OPTIONS_SET+=SYSTRAY
OPTIONS_SET+=TABLE_REDIS
OPTIONS_SET+=TAGLIB
OPTIONS_SET+=TCL
OPTIONS_SET+=TCLMAN
OPTIONS_SET+=TCLTK
OPTIONS_SET+=TESSERACT
OPTIONS_SET+=TFTP
OPTIONS_SET+=THEMES
OPTIONS_SET+=THEORA
OPTIONS_SET+=THUMBNAILER
OPTIONS_SET+=TIFF
OPTIONS_SET+=TK
OPTIONS_SET+=TKINTER
OPTIONS_SET+=TKMAN
OPTIONS_SET+=TKMIB
OPTIONS_SET+=TOKYOCABINET
OPTIONS_SET+=TOKYOCABINET_BTREE
OPTIONS_SET+=TOKYOCABINET_MHASH
OPTIONS_SET+=TOML
OPTIONS_SET+=TOOLAME
OPTIONS_SET+=TOOLBAR
OPTIONS_SET+=TREMOR
OPTIONS_SET+=TWOLAME
OPTIONS_SET+=UCHARDET
OPTIONS_SET+=UDEV
OPTIONS_SET+=UNIXODBC
OPTIONS_SET+=UNZIP
OPTIONS_SET+=UPNP
OPTIONS_SET+=URLS
OPTIONS_SET+=UTILS
OPTIONS_SET+=UVMETER
OPTIONS_SET+=V4L
OPTIONS_SET+=V4L2
OPTIONS_SET+=VCD
OPTIONS_SET+=VIDSTAB
OPTIONS_SET+=VLC
OPTIONS_SET+=VMAF
OPTIONS_SET+=VNC
OPTIONS_SET+=VO_AMRWBENC
OPTIONS_SET+=VORBIS
OPTIONS_SET+=VPX
OPTIONS_SET+=WAVE
OPTIONS_SET+=WAVPACK
OPTIONS_SET+=WEATHER
OPTIONS_SET+=WEBCAM
OPTIONS_SET+=WEBCAMD
OPTIONS_SET+=WEBENGINE
OPTIONS_SET+=WEBP
OPTIONS_SET+=WMCTRL
OPTIONS_SET+=WMF
OPTIONS_SET+=X11
OPTIONS_SET+=X11DGA
OPTIONS_SET+=X11VM
OPTIONS_SET+=X264
OPTIONS_SET+=X265
OPTIONS_SET+=XATTR
OPTIONS_SET+=XAUTH
OPTIONS_SET+=XCALC
OPTIONS_SET+=XCB
OPTIONS_SET+=XCLOCK
OPTIONS_SET+=XDOTOOL
OPTIONS_SET+=XDPYINFO
OPTIONS_SET+=XDRIINFO
OPTIONS_SET+=XFCE
OPTIONS_SET+=XFCE4
OPTIONS_SET+=XFT
OPTIONS_SET+=XINE
OPTIONS_SET+=XINERAMA
OPTIONS_SET+=XML
OPTIONS_SET+=XRANDR
OPTIONS_SET+=XSANE
OPTIONS_SET+=XVID
OPTIONS_SET+=XVIDEO
OPTIONS_SET+=XVMC
OPTIONS_SET+=YAML
OPTIONS_SET+=YELP
OPTIONS_SET+=YTDLP
OPTIONS_SET+=ZEMBEREK
OPTIONS_SET+=ZIMG
OPTIONS_SET+=ZIP
OPTIONS_SET+=ZLIB
OPTIONS_SET+=ZMQ
OPTIONS_SET+=ZSH
OPTIONS_SET+=ZSTANDARD
OPTIONS_SET+=ZSTD
OPTIONS_SET+=ZVBI

OPTIONS_UNSET+=PLATFORM_WAYLAND
OPTIONS_UNSET+=WAYLAND
OPTIONS_UNSET+=QTWEBKIT
OPTIONS_UNSET+=HARFBUZZ
OPTIONS_UNSET+=AVAHI
OPTIONS_UNSET+=BDB
OPTIONS_UNSET+=DBUS
OPTIONS_UNSET+=DC1394
OPTIONS_UNSET+=DEBUG
OPTIONS_UNSET+=DTRACE
OPTIONS_UNSET+=ESPEAK
OPTIONS_UNSET+=FLANG
OPTIONS_UNSET+=GCRYPT
OPTIONS_UNSET+=GLSLANG
OPTIONS_UNSET+=GOLD
OPTIONS_UNSET+=GSSAPI_BASE
OPTIONS_UNSET+=GSSAPI_HEIMDAL
OPTIONS_UNSET+=GSSAPI_MIT
OPTIONS_UNSET+=GVFS
OPTIONS_UNSET+=GVFS_METADATA
OPTIONS_UNSET+=HEIF
OPTIONS_UNSET+=IMAGEMAGICK6
OPTIONS_UNSET+=JACK
OPTIONS_UNSET+=LCMS2
OPTIONS_UNSET+=LDAP
OPTIONS_UNSET+=LDAPS
OPTIONS_UNSET+=LENSFUN
OPTIONS_UNSET+=LETTER
OPTIONS_UNSET+=LIGHTDM
OPTIONS_UNSET+=LIRC
OPTIONS_UNSET+=LTO
OPTIONS_UNSET+=LTO_BOOTSTRAP
OPTIONS_UNSET+=LUAJIT
OPTIONS_UNSET+=MBEDTLS
OPTIONS_UNSET+=MDNSRESPONDER
OPTIONS_UNSET+=MFX
OPTIONS_UNSET+=MUJS
OPTIONS_UNSET+=NAS
OPTIONS_UNSET+=NFS
OPTIONS_UNSET+=NLS
OPTIONS_UNSET+=NTLM
OPTIONS_UNSET+=OGGSPOTS
OPTIONS_UNSET+=OPENMP
OPTIONS_UNSET+=OPENMPT
OPTIONS_UNSET+=PIPEWIRE
OPTIONS_UNSET+=POCKETSPHINX
OPTIONS_UNSET+=PULSE
OPTIONS_UNSET+=PULSEAUDIO
OPTIONS_UNSET+=RUBBERBAND
OPTIONS_UNSET+=RUNROOT
OPTIONS_UNSET+=SAGE
OPTIONS_UNSET+=SMB
OPTIONS_UNSET+=SOUNDTOUCH
OPTIONS_UNSET+=SPEECH
OPTIONS_UNSET+=SPEECH_RECOGNITION
OPTIONS_UNSET+=SPEECHD
OPTIONS_UNSET+=SUDO
OPTIONS_UNSET+=SVTHEVC
OPTIONS_UNSET+=SVTVP9
OPTIONS_UNSET+=TEXT2SPEECH
OPTIONS_UNSET+=VAAPI
OPTIONS_UNSET+=VAPOURSYNTH
OPTIONS_UNSET+=VDPAU
OPTIONS_UNSET+=VULKAN
OPTIONS_UNSET+=YTDL
OPTIONS_UNSET+=ZBAR
OPTIONS_UNSET+=ZEITGEIST
 
There's still quite some weirdness, but let's start with this:

CPUTYPE?=alderlake – well, nothing really wrong here (except I don't get why ?=, do you expect it to be overridden from somewhere?). But then, it certainly means packages built with that setting won't work on any other CPU. And the performance gain is most likely not even measurable for most software (there are exceptions of course).

This one really raises an eyebrow:
Code:
MAKE_JOBS_NUMBER=12
MAKE_JOBS_UNSAFE=yes
MAKEOPTS="-j12"
NINJAOPTS="-j12"
You know MAKE_JOBS_UNSAFE is there to disable parallel building? So, you're contradicting yourself, and even worse, you add make flags that are already controlled by the ports framework. Remove all of that! Are you building with poudriere? In that case, control whether you want parallel building or not (this can even be done per port/package) in poudriere.conf.

Then, these just look like a generally bad idea:
Code:
NO_CHECKSUM=yes
WITHOUT_MANCOMPRESS=yes
You want checksums, otherwise you might build from some tampered upstream distfile. And you want compressed manpages, anything else is just a waste of space.

About a few others, I just don't know what should be the point :-/

Edit: BTW, not talking about globally set port options here, I think these are fine in general. But then, your list seems pretty huge. Looks like many of them only apply to a single port? Then better just set them for that single port! Setting options globally only makes sense for options that are indeed understood by many ports. Just for comparison, here's the make.conf I currently use:
Code:
DEFAULT_VERSIONS+= ssl=libressl samba=4.16

OPTIONS_UNSET+= GSSAPI_BASE GSSAPI_NONE HEIMDAL ALSA JACK PULSE PULSEAUDIO
OPTIONS_SET+= GSSAPI_MIT SNDIO PORTAUDIO

devel_android-tools-adb_UNSET+= MDNSRESPONDER
devel_e2fsprogs-libss_SET+= KRBSUPP_MIT
devel_e2fsprogs-libss_UNSET+= KRBSUPP_BASE
devel_electron7_SET+= ALSA
editors_libreoffice_SET+= JAVA KDE5 SYSTRAY WEBDAV
editors_libreoffice_UNSET+= GTK2 GTK3
emulators_i386-wine_SET+= GECKO MONO CUPS LIBXSLT MPG123
emulators_wine_SET+= GECKO MONO CUPS LIBXSLT MPG123
ftp_curl_UNSET+= TLS_SRP
games_eduke32_SET+= HRP OFFENSIVE FULL
graphics_darktable_UNSET+= FLICKR GEO LUA
graphics_gimp-app_SET+= GHOSTSCRIPT
graphics_gtkam_SET+= GIMP
graphics_gtkam_UNSET+= GNOME
graphics_sane-backends_UNSET+= AVAHI GPHOTO
irc_bitlbee_SET+= LIBPURPLE OTR
irc_bitlbee_UNSET+= SKYPE MSN TWITTER JABBER OSCAR
irc_irssi_SET+= OTR PROXY
java_openjdk8_SET+= ALSA
mail_exim_UNSET+= CONTENT_SCAN DKIM DNSSEC EMBEDDED_PERL AUTH_CRAM_MD5 AUTH_PLAINTEXT AUTH_SPA PASSWD MAILDIR MAILSTORE MBX
multimedia_audacious-plugins_SET+= AMIDI LAME MODPLUG OPENGL SID
multimedia_makemkv_SET+= FDK_AAC
multimedia_mplayer_SET+= BLURAY XVMC
multimedia_qt5-multimedia_SET+= ALSA
net-im_pidgin_SET+= SASL
net_freeradius3_SET+= WINBIND MITKRB_PORT
#net_freerdp_SET+= BROKENFOCUS FAAC FAAD FFMPEG GSM OPENH264
net_freerdp_SET+= FAAC FAAD FFMPEG GSM OPENH264
news_tin_SET+= SLRNFACE
print_cups-filters_UNSET+= AVAHI
print_cups_UNSET+= AVAHI
security_i2pd_SET+= AESNI
#security_openssh-portable_SET+= KERB_GSSAPI MIT
security_stunnel_SET+= LIBRESSL_PATCH
security_sudo_UNSET+= GSSAPI_MIT
security_uacme_UNSET+= DOCS EXAMPLES UALPN
sysutils_apcupsd_SET+= CGI
sysutils_apcupsd_UNSET+= APCDUMB_DRV APCSMART_DRV PCNET_DRV SNMP_DRV
www_elinks_SET+= ICONV IDN
www_firefox_UNSET+= ALSA JACK
www_nginx_UNSET+= PCRE_ONE
www_nginx_SET+= PCRE_TWO
x11-servers_xorg-server_UNSET+= SUID
x11-wm_fvwm3_SET+= GO ICONS SVG
x11-wm_lxqt-panel_SET+= ALSA
x11_xscreensaver_UNSET+= SETUID

.if ${.CURDIR:M*/www/node*}
OPTIONS_SET+=   BUNDLED_SSL
.endif

.if ${.CURDIR:M*/net/samba4*}
OPTIONS_SET+=   CUPS BIND916
OPTIONS_UNSET+= GSSAPI_BUILTIN DEBUG
.endif

.if ${.CURDIR:M*/devel/valgrind}
CFLAGS+=        -DELF_NOTE_GNU=\\\"GNU\\\"
.endif
 
Back
Top