1
0
Fork 0
forked from mirror/openwrt
openwrt/include
Hauke Mehrtens 7bf8d568f6 build: pass CPPFLAGS to cmake build
The TARGET_CPPFLAGS contain the include paths used by OpenWrt. This also
contains the including of the fortify sources headers. If they are not
provided, the applications will not use fortify sources headers when
compiled against musl. Add them to cmake builds too. cmake does not
support a special CPPFLGS option [0], just add them to CFLAGS and
CXXFLAGS like we also do it for meson and normal make.
This should fix fortify sources support for cmake builds.

I found this explanation for the flags:
 * CFLAGS: C flags, passed during compile AND link
 * CXXFLAGS: C++ flags, passed during compile AND link
 * CPPFLAGS: pre-processor flags, passed ONLY during compile
 * LDFLAGS: linker flags, passed ONLY during link

[0]: https://gitlab.kitware.com/cmake/cmake/-/issues/12928

Link: https://github.com/openwrt/openwrt/pull/22042
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 01:29:57 +01:00
..
site
autotools.mk
bpf.mk
cmake.mk build: pass CPPFLAGS to cmake build 2026-02-17 01:29:57 +01:00
debug.mk
default-packages.mk
depends.mk
device_table.txt
download.mk treewide: drop CVS support 2026-02-13 15:40:13 +01:00
feeds.mk build: fix ipkg-remove: add support for removing apk files 2025-07-15 20:48:45 +02:00
hardened-ld-pie.specs
hardening.mk toolchain: gcc: add fanalyzer config option 2025-11-23 09:33:15 +01:00
host-build.mk
image-commands.mk filogic: add support for Netgear EAX17 2025-11-24 00:57:19 +01:00
image.mk image: support generating per device targz rootfs 2026-02-09 16:43:29 +01:00
kernel-build.mk
kernel-defaults.mk kernel: move .quilt_used to quilt.mk 2025-11-27 20:26:37 +01:00
kernel-version.mk
kernel.mk build: purge DESCRIPTION 2026-01-24 11:03:40 +01:00
logo.png
logo.svg
meson.mk
netfilter.mk netfilter: remove nf-conntrack6 2026-01-21 22:42:20 +01:00
nls.mk
openssl-module.mk openssl: add MODULES_DIR MACRO for provider 2025-11-11 23:58:54 +01:00
optee-os.mk
package-bin.mk
package-defaults.mk build: handle --root feeds script feature 2025-10-20 13:50:15 +02:00
package-dumpinfo.mk
package-pack.mk treewide: drop CVS support 2026-02-13 15:40:13 +01:00
package-seccomp.mk
package.mk build: purge DESCRIPTION 2026-01-24 11:03:40 +01:00
prereq-build.mk prereq-build: add Python 3.13 support 2025-11-12 12:11:15 +01:00
prereq.mk prereq: use staging_dir's compiler 2025-10-20 00:55:06 +02:00
quilt.mk kernel: move .quilt_used to quilt.mk 2025-11-27 20:26:37 +01:00
rootfs.mk treewide: drop CVS support 2026-02-13 15:40:13 +01:00
scan.awk
scan.mk
shell.sh
subdir.mk
target.mk build: purge DESCRIPTION 2026-01-24 11:03:40 +01:00
toolchain-build.mk
toplevel.mk build: depend on tools/zstd for download 2025-12-10 19:04:44 +01:00
trusted-firmware-a.mk
u-boot.mk treewide: update u-boot URL 2026-01-02 18:07:02 +01:00
uclibc++.mk
unpack.mk
verbose.mk
version.mk