Skip to content
Permalink
Browse files

cmake: no-address-of-packed-member is not supported in older compilers

Add a version check to allow building with older GCC versions that did
not support this option.

Fixes #16607

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jun 4, 2019
1 parent ca49d6a commit deb7ff524a73216c9907b8b6ef61efc27341b789
Showing with 6 additions and 1 deletion.
  1. +6 −1 cmake/compiler/gcc/target_warnings.cmake
@@ -9,10 +9,15 @@ macro(toolchain_cc_warning_base)
-Wformat
-Wformat-security
-Wno-format-zero-length
-Wno-main
)

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9.1.0")
zephyr_compile_options(
# FIXME: Remove once #16587 is fixed
-Wno-address-of-packed-member
-Wno-main
)
endif()

zephyr_cc_option(-Wno-pointer-sign)

0 comments on commit deb7ff5

Please sign in to comment.
You can’t perform that action at this time.