[vlc-commits] [Git][videolan/vlc][master] configure.ac: move -mbranch-protection to CPPFLAGS

François Cartegnie (@fcartegnie) gitlab at videolan.org
Sun Dec 24 09:33:51 UTC 2023



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
bee45df7 by Alexandre Janniaux at 2023-12-24T09:07:25+00:00
configure.ac: move -mbranch-protection to CPPFLAGS

In automake, as opposed to usual make rules, CPPFLAGS are the flags only
forwarded to the compiler whereas CFLAGS and CXXFLAGS are forwarded both
to the compiler and to the linker commands.

Since AX_CHECK_COMPILE_FLAG is used, the linker is not tested and the
argument is actually not used by the linker, leading to the following
warning every time a target is linked:

    clang-14: warning: argument unused during compilation: '-mbranch-protection=standard' [-Wunused-command-line-argument]

- - - - -


1 changed file:

- configure.ac


Changes:

=====================================
configure.ac
=====================================
@@ -1762,8 +1762,7 @@ AC_ARG_ENABLE([branch-protection],
 ])
 AS_IF([test "${enable_branch_protection}" != "no"], [
   AX_CHECK_COMPILE_FLAG([-mbranch-protection=standard], [
-    AX_APPEND_FLAG([-mbranch-protection=standard], [CFLAGS])
-    AX_APPEND_FLAG([-mbranch-protection=standard], [CXXFLAGS])
+    AX_APPEND_FLAG([-mbranch-protection=standard], [CPPFLAGS])
   ])
 ])
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bee45df73b5222b6e9b4c08d2ede2154f0e21dfe

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bee45df73b5222b6e9b4c08d2ede2154f0e21dfe
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list