build: let HOST_CXXFLAGS default to HOST_CFLAGS
authorMichael Pratt <mcpratt@pm.me>
Thu, 20 Jun 2024 05:10:21 +0000 (01:10 -0400)
committerRobert Marko <robimarko@gmail.com>
Mon, 8 Jul 2024 06:49:43 +0000 (08:49 +0200)
commitb07099a6fdf05937446c486c8ef78e4cca081724
tree89a91b4a79f8b0a7b7747488a76ecc65d485c868
parent9c833bc1c42cefc6294571d22c2f2e0ba344884c
build: let HOST_CXXFLAGS default to HOST_CFLAGS

Usage of g++ should mimic the usage of gcc,
otherwise, part of a binary or library may have
optimizations and part of it may not,
unbeknownst to the users or developers working on a build.
This can lead to some features like, for example, FORTIFY_SOURCE,
to have less of an effect or even cause a build error on some hosts.

Therefore, let HOST_CXXFLAGS default to HOST_CFLAGS.

Fixes: 87d489f67 ("build: add HOST_CXXFLAGS for host build")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
rules.mk