rules.mk: respect the empty CONFIG_HOST_FLAGS_OPT
Currently, the empty CONFIG_HOST_FLAGS_OPT will be overridden by
"-O2". Fix this issue by checking if its parent menuconfig symbol
CONFIG_OPTIMIZE_HOST_TOOLS was defined.
Fixes: e3bec5692c50 ("rules.mk: set default host tools GCC optimization level to -O2")
Reported-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18815
Signed-off-by: Robert Marko <robimarko@gmail.com>