Robert Marko 4454361e54 tools/elfutils: pass -O2 in HOST_CXXFLAGS
Trying to compile elfutils on Fedora 40 with GCC 14.1.1 will fail with:
/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/bin/g++ -std=c++11 -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/share/locale"'  -DDEBUGPRED=0 -DSRCDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -DOBJDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -I. -I..  -I../libgnu -I../libgnu -I. -I. -I../lib -I.. -I./../libelf -I./../libebl -I./../libdw -I./../libdwelf -I./../libdwfl -I./../libasm -I../debuginfod -I/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/include  -std=c++11 -Wall -Wshadow -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Werror -Wunused -Wextra -Wstack-usage=262144   -D_FORTIFY_SOURCE=3  -c -o srcfiles.o srcfiles.cxx
In file included from /usr/include/c++/14/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/14/x86_64-redhat-linux/bits/c++config.h:2521,
                 from /usr/include/c++/14/cstdlib:41,
                 from ../libgnu/gettext.h:56,
                 from ../libgnu/eu-config.h:62,
                 from ../config.h:2378,
                 from srcfiles.cxx:31:
/usr/include/features.h:414:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
  414 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
cc1plus: all warnings being treated as errors

So, lets do as the error says and pass -O2 in HOST_CXXFLAGS like we already
do by default in HOST_CFLAGS.

Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-31 16:01:43 +02:00
..
2023-09-19 20:21:33 +02:00
2024-04-06 11:24:18 +02:00
2024-04-06 11:24:18 +02:00
2023-12-08 16:28:40 +01:00
2022-10-22 22:50:37 +02:00
2024-04-03 18:56:58 +02:00
2024-04-06 11:24:18 +02:00
2024-04-25 21:33:51 +02:00
2024-01-25 16:06:49 +01:00
2024-05-23 11:49:03 +02:00
2024-04-27 23:37:57 +02:00
2024-04-27 12:08:11 +02:00
2024-04-06 11:24:18 +02:00
2024-04-06 11:24:18 +02:00
2024-05-23 11:49:03 +02:00
2024-04-06 11:24:18 +02:00
2023-09-19 20:21:33 +02:00
2024-05-23 11:49:02 +02:00
2024-05-23 11:49:03 +02:00
2024-05-23 11:49:03 +02:00
2024-04-06 11:24:18 +02:00
2024-03-29 23:42:22 +01:00
2024-05-29 10:43:50 +02:00
2022-03-01 00:08:08 +01:00
2024-05-09 10:45:29 +02:00
2024-04-06 11:24:18 +02:00
2023-04-08 15:51:32 +02:00
2023-01-24 23:13:25 +01:00
2024-05-23 11:49:03 +02:00
2020-09-02 16:29:22 +02:00
2023-04-29 17:37:45 +02:00
2022-02-25 14:12:39 +01:00
2024-04-06 11:24:18 +02:00
2024-04-06 11:24:18 +02:00
2021-09-20 15:21:17 +02:00
2024-04-06 11:24:18 +02:00
2023-09-19 20:21:33 +02:00
2024-04-27 12:07:37 +02:00
2024-04-06 11:24:18 +02:00