Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

449. Flag glossary

The same switches recur on page after page of this book. This appendix explains each of them once, so that a package page only has to explain the switches peculiar to its own port: when a page passes one of these without comment, the meaning given here is the one it has.

The list holds the switches that ten or more of the tree’s recipes hand to a build system or add to the compiler flags, counted over every build.sh under ports/core/ and src/, and a few rarer ones that show a rule every recipe follows, such as naming a feature option instead of leaving it to detection. They are grouped by the build system that reads them. For each, the entry says what the switch does and, where the tree records a reason, why KDOS passes it.

Three kinds of option are left out:

The shapes these switches sit in are set out in Canonical build shapes.

configure (autotools)

These go to a configure script generated by autoconf, or written to accept the same options.

--prefix=/usr
Install under /usr. Every package of KDOS does, and the package lint refuses a package with anything under usr/local; see What the package lint refuses.
--sysconfdir=/etc
Read and install configuration in /etc. autoconf’s default under --prefix=/usr is /usr/etc, and the path is compiled into the program as well as used for the install, so a program built without it ignores the file the image ships in /etc. The lint refuses both a usr/etc path and an executable that names /usr/etc. In the chroot phases script/env/config.site makes the same correction when the recipe names nothing. The recipe names it anyway, because the site file is only the chroot’s default and a recipe built anywhere else does not read it. See autotools.
--localstatedir=/var
Keep run-time state under /var rather than autoconf’s /usr/var, which the lint refuses for the same reason as /usr/etc.
--libdir=/usr/lib
Install libraries in /usr/lib. /usr/lib64 in the built root is only a link to lib, and the lint refuses a package that installs through it.
--libexecdir=/usr/lib
Install the helper programs a package runs itself, rather than the ones a person types, under /usr/lib instead of autoconf’s /usr/libexec. Both directories exist in the built root.
--sbindir=/usr/sbin, --mandir=/usr/share/man
Programs for the administrator in /usr/sbin (/sbin is a link to it) and manual pages in /usr/share/man. Both are autoconf’s own defaults under --prefix=/usr, so for a configure generated by autoconf naming them changes nothing.
--disable-static
Build only the shared library, with no .a archive beside it. kpkg deletes libtool’s .la files after build.sh but no archive, so an archive the build installs is in the package. It is part of the canonical autotools shape.
--enable-shared
Build shared libraries. It is libtool’s default, so it changes something only in a configure whose own default is a static build.
--disable-nls
Build no message catalogues. KDOS ships English only, and kpkg removes every other catalogue from the package whether or not the switch is given, so it only saves build time; see Size and language policy. A program built with it needs no libintl, which makes it the first fix to try for an undefined reference to libintl_gettext; see Gettext on musl.
--enable-nls
Turn gettext support on explicitly. In libintl it is what builds the library at all. Elsewhere the catalogues it builds that are not English are removed by kpkg, so the image carries no translation either way.
--disable-rpath
Link no RPATH of /usr/lib into the programs. /usr/lib is on the loader’s default path, so the entry adds only a lookup, and the package lint warns about it; see What the package lint refuses.
--disable-werror
Do not turn compiler warnings into errors where upstream’s build would. No phase adds -Werror, and a warning that musl’s headers raise and glibc’s do not can stop an upstream -Werror build; see How KDOS differs and An upstream -Werror.
--disable-debug
Build the release configuration. A port never ships a debug build; see Every port.
--disable-tests, --disable-examples
Build neither the test suite nor the example programs. Neither is installed.
--disable-gtk-doc, --disable-docs, --disable-doc
Build no API reference. kpkg removes HTML and PDF only under /usr/share/doc, and gtk-doc installs its reference under /usr/share/gtk-doc/html, which kpkg keeps, so for a library documented with gtk-doc the switch is what keeps the reference out of the package. Manual pages are kept, so a project’s switch for those stays on. See Size and language policy and Manual pages.
--disable-python
Build no Python bindings for the library.
--with-zlib, --with-zstd, --with-openssl, --with-readline, --with-jpeg, --with-png
Build with that library, named rather than left to configure’s detection, so that what the package supports follows the recipe and not whatever happened to be installed when it built; see A graphical application.
--with-system-zlib
Link the zlib port instead of the copy of zlib that the source tree carries, as GCC, binutils and the Mozilla programs, among others, are built.
--enable-alsa, --enable-dbus
Build the ALSA sound output and the D-Bus integration, named rather than detected, as for --with-zlib. The Mozilla programs take the same switches as ac_add_options lines in their mozconfig.
--without-x
Build no X11 client code. The session is Wayland; a port that keeps an X11 path runs it under Xwayland.
--without-selinux, --without-systemd
Leave out SELinux labelling and systemd integration. Neither exists on KDOS; see No systemd and Features whose library has no port.
--without-xmlto, --without-fop, --without-xsltproc
The X.org libraries’ switches for generating their specifications as HTML, PDF and text with xmlto, Apache FOP and xsltproc. Without them the libraries build no such documents; kpkg would remove the HTML and PDF ones from /usr/share/doc in any case.

meson

--prefix=/usr
Install under /usr, as for configure.
--libdir=lib
Install libraries in /usr/lib. meson picks its default from the machine it runs on: lib64 wherever /usr/lib64 is a real directory, which the lint refuses, and lib where it is a link, as in the chroot. Naming it keeps the package the same whatever root builds it. See meson.
--sysconfdir=/etc, --libexecdir=/usr/lib
Configuration in /etc and helper programs under /usr/lib, as for configure.
--buildtype=release
Build optimised and without debug information. meson’s default buildtype, debug, compiles -g -O0, and kpkg strips no debug information, so the package would ship unoptimised code and its DWARF; testing/preflight.sh fails a meson setup that names no buildtype. It does not define NDEBUG, so a meson port keeps its assert() checks.
--wrap-mode=nodownload
Never download a subproject. A subproject whose source the recipe does not carry fails the setup with its name, instead of meson trying to clone it with no network. The tree’s meson wrapper adds it to every setup that chooses no wrap mode, so a recipe that names it states what would happen anyway.
-C build, --no-rebuild
On meson compile and meson install: work in the build directory build, and on install, install what the compile step built without running ninja again first.
-Dtests=false, -Dtests=disabled
The project’s own option for its test suite, off. The two spellings are the two types a meson option can have: a boolean takes true or false, a feature takes enabled, disabled or auto, and meson stops at setup on a value of the wrong kind. The option file in the tarball says which a project uses, and testing/preflight.sh checks every -D against it.
-Ddocs=false, -Ddocs=disabled, -Dgtk_doc=false, -Dbuild-documentation=false
Build no HTML or API reference. kpkg would remove such HTML from /usr/share/doc in any case, but not a gtk-doc reference under /usr/share/gtk-doc/html, as for --disable-gtk-doc.
-Dman=true, -Dman-pages=enabled
Build and install the manual pages. A port installs every manual page upstream ships or can generate; see Manual pages.
-Dexamples=false
Build no example programs.
-Dintrospection=enabled, -Dintrospection=true
Generate GObject introspection data, the .gir and .typelib files through which Python, JavaScript and other languages call a GLib-based library.
-Dvapi=true
Generate the .vapi file that lets Vala programs use the library.
-Djpeg=enabled
Build JPEG support and stop at setup if the library is missing, where auto would build without it in silence. A meson recipe sets each feature option explicitly in the same way; see A graphical application.
-Dsystemd=disabled, -Dsystemd=false
The project’s own option for its systemd support, off; which spelling depends on whether the project declares it a feature or a boolean, as for -Dtests. KDOS has no systemd; see No systemd.
-Ddefault_library=shared
Build every library the project defines as a shared library, over a project’s own default of a static or a combined build.
-Dmaintainer-mode=false, -Dwarnings=min, -Dbuild-deprecated-api=true
The options of the C++ libraries built with mm-common, glibmm, cairomm, pangomm, gtkmm and libsigc++ among them: run none of the maintainer’s steps (in glibmm, regenerating the sources from their .hg and .ccg templates), keep the compiler warnings at the project’s minimum level, and build the deprecated parts of the API, which programs written against an older release still call. The last two are upstream’s own defaults, named in the recipe.

CMake

-DCMAKE_INSTALL_PREFIX=/usr
Install under /usr.
-DCMAKE_BUILD_TYPE=Release
Build optimised and without debug information. Release appends -O3 -DNDEBUG after the exported flags, so a CMake port builds at -O3 with assertions off. The phase exports CMAKE_BUILD_TYPE=Release already, for a project whose recipe names none; the recipe names it so the command line says so. See cmake.
-DCMAKE_INSTALL_LIBDIR=lib
Install libraries in /usr/lib. The tree’s CMake already defaults to lib through a patch to its GNUInstallDirs, but a project that sets its own default ignores that, and usr/lib64 is refused by the lint.
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
Configure a project whose cmake_minimum_required names a version older than 3.5, which the tree’s CMake otherwise refuses, without patching the project.
-G Ninja, -S, -B, --build, --install
Generate a Ninja build rather than makefiles, from the source directory after -S into the build directory after -B; then cmake --build builds it and DESTDIR=$PKG cmake --install installs it. Ninja takes the job count from the tree’s ninja wrapper, and cmake --build from CMAKE_BUILD_PARALLEL_LEVEL.
-Wno-dev
Silence CMake’s warnings addressed to a project’s own developers. Other warnings, the one for a misspelt option among them, still print.
-DBUILD_SHARED_LIBS=ON, -DBUILD_STATIC_LIBS=OFF
Build shared libraries. BUILD_SHARED_LIBS is CMake’s own variable, and when it is unset a plain add_library builds a static one. BUILD_STATIC_LIBS is a project’s own option, on by default in capstone among others, for a static library alongside.
-DBUILD_TESTING=OFF
CTest’s own switch, which a project that includes CTest reads to decide whether to build its tests. -DBUILD_TESTS=OFF, -DENABLE_TESTS=OFF and -DENABLE_TESTING=OFF are projects’ own names for the same choice; ccache’s ENABLE_TESTING, for one, defaults to on.
-DBUILD_EXAMPLES=OFF, -DQT_BUILD_TESTS=OFF, -DQT_BUILD_EXAMPLES=OFF
Build no examples, and for a Qt module neither its tests nor its examples.
-DLLVM_INCLUDE_TESTS=OFF
Generate no test targets. It is LLVM’s own option, passed by the ports built from the LLVM source tree: llvm, clang, lldb, compiler-rt, libunwind, openmp and libclc, and llvm21, clang21 and lld21, the second version beside them.
-DCMAKE_SKIP_INSTALL_RPATH=ON
Install the programs without an RPATH. For a program whose libraries are in /usr/lib, the entry CMake would write is the loader’s default path, which the lint warns about; see What the package lint refuses.
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG", -DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG"
Replace Release’s own -O3 -DNDEBUG with the exported flags. A recipe that sets these keeps -DNDEBUG in them, so the build keeps Release’s assertions off at the tree’s level of optimisation.
-DKDE_INSTALL_LIBDIR=lib, -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
Install a KDE project’s libraries in /usr/lib, and its plugins and QML modules in Qt’s own directories. ECM’s KDEInstallDirs would pick lib64 by itself, apart from the tree’s GNUInstallDirs default. See A graphical application.
-DKF_SKIP_PO_PROCESSING=ON
Skip building a KDE project’s translations, which kpkg would remove from the package anyway.
-DCMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON
Stop the configure if KDocTools, which builds a KDE application’s handbook, is not found, where the project treats it as optional. A recipe pins each optional dependency this way, with CMAKE_DISABLE_FIND_PACKAGE_<Name> for the ones it must not pick up; see A graphical application.
-DBUILD_DOC=ON
Build the project’s documentation. In ark it is the option’s own default, named in the recipe.
-DBUILD_DESIGNERPLUGIN=OFF
Build no plugin for Qt Designer, which a KDE Frameworks library such as kcompletion otherwise builds for its widgets.
-DWITH_X11=ON
Build a KDE library’s X11 integration, the default in kcrash. Each toolkit is built with its X11 backend as well as Wayland, so a program with only an X11 path runs under Xwayland.
-DUSE_CCACHE=OFF
Turn off a project’s own use of ccache. The tree has its own arrangement for CMake projects, through CMake’s compiler-launcher variables, set in script/env/chroot.env; see The compiler cache.

cargo

--release
Build cargo’s release profile. Every cargo build takes it; the phase also exports CARGO_PROFILE_RELEASE_DEBUG=0, so no crate’s release profile turns debug information back on.
--frozen, --offline
Build exactly what Cargo.lock names, and never touch the network. Every crate comes from the vendor bundle the recipe unpacks; see rust.
RUSTFLAGS="-C target-feature=-crt-static"
Link the program dynamically against musl. The musl target links statically unless told otherwise, and a crate that binds a system library then fails to link, or carries a private copy of the library that no update of its port reaches. testing/preflight.sh fails a cargo recipe without it.
--features
Turn on cargo features beyond the crate’s defaults, as rust-analyzer’s jemalloc.

go

-mod=vendor
Build from the module vendor/ tree the recipe unpacks, never from the module proxy.
-ldflags "-s -w"
Link with no symbol table and no DWARF. The Go linker otherwise writes both, and kpkg does not strip them; testing/preflight.sh fails a go build without both flags. See go.
-X <package>.<variable>=<value>
Set a string variable in the program at link time, which the recipes use to stamp the version a program reports. It goes inside the same -ldflags string as -s -w, because a second -ldflags replaces the first.

pip

--no-index, --find-links=vendor
Never consult the Python package index, and look for distributions only in the vendor directory the recipe unpacked its bundle into.
--no-deps
Install only the distributions named. Their dependencies are ports of their own, or members of the bundle installed by name; see The three Python keys.
--no-build-isolation
Build with the build backends already installed, as ports, instead of installing them into a temporary environment first. A recipe without it, such as python3-jinja2’s, carries its backend in the vendor bundle, and pip installs it from there.
--ignore-installed
Write the package into $PKG without looking for an installed copy. Without it, pip finds the copy in the build root whenever a port is rebuilt over its installed version, and uninstalls it from the live tree before writing the new one. testing/preflight.sh refuses a pip install --root without it.
--root=$PKG, --prefix=/usr
Install into the staging tree, under /usr within it.

The compiler and linker flags

These are added to the exported CFLAGS, CXXFLAGS or LDFLAGS, never put in their place.

-Wno-error
Cancel a -Werror earlier on the compile line, so a warning stays a warning. See --disable-werror above.
${CFLAGS/-O2/-O3}
Not a switch but a substitution: raise the exported -O2 to -O3 for a port whose own default is -O3 and spends its time in a hot path. meson needs this form, because it puts the exported flags after its own -O3. See Every port.
-g0
Cancel a -g that a build puts ahead of the exported flags. No port ships debug information; see What kpkg does around build.sh.
-Wl,--strip-debug
Drop debug information at the link, for a build that compiles it in where no flag reaches: a makefile that appends its own -g, or a linked archive that carries it.
${CFLAGS/-std=gnu11/}
A substitution again: the exported CFLAGS without its -std=gnu11, which is valid only for C. A build that hands CFLAGS to its C++ compiler, or that names its own C standard, takes it this way, and one that still needs GNU C11 for its C files moves the standard into CC instead; see C flags handed to the C++ compiler.
-D_GNU_SOURCE
Make the C library’s headers declare the GNU extensions. musl declares a GNU extension such as exp10 only under this macro, and no -std= option defines it; see A source written for C23. Every KDOS root daemon compiles with it, as do several of KDOS’s other programs.
-D_LARGEFILE64_SOURCE
Expose the *64 names, such as stat64 and off64_t, which musl defines only as macros for the plain names and only under this macro. See A glibc-only call on musl.
-include <header>
Compile every file as though it began with an #include of that header, most often cstdint, time.h or sys/types.h. It is for a source that uses a declaration without including the header that declares it, and compiles only where another header brings that one in on the way; see A glibc-only call on musl.

make

-j1
Run one job at a time, overriding the -j$KDOS_JOBS in MAKEFLAGS for that one invocation. Most often it is the install of a project whose install rules race under a parallel make, and the compile keeps its parallelism; a project whose build itself races runs that serially too. See A parallel install race.

See also