[PATCH] D55477: [openmp] [cmake] Use -std=gnu++11 to fix alloca() on NetBSD

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 11 07:44:33 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL348854: [cmake] Use -std=gnu++11 to fix alloca() on NetBSD (authored by mgorny, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D55477?vs=177395&id=177709#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55477/new/

https://reviews.llvm.org/D55477

Files:
  openmp/trunk/cmake/HandleOpenMPOptions.cmake
  openmp/trunk/cmake/config-ix.cmake


Index: openmp/trunk/cmake/HandleOpenMPOptions.cmake
===================================================================
--- openmp/trunk/cmake/HandleOpenMPOptions.cmake
+++ openmp/trunk/cmake/HandleOpenMPOptions.cmake
@@ -13,4 +13,7 @@
   append_if(OPENMP_HAVE_WERROR_FLAG "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 endif()
 
-append_if(OPENMP_HAVE_STD_CPP11_FLAG "-std=c++11" CMAKE_CXX_FLAGS)
\ No newline at end of file
+append_if(OPENMP_HAVE_STD_GNUPP11_FLAG "-std=gnu++11" CMAKE_CXX_FLAGS)
+if (NOT OPENMP_HAVE_STD_GNUPP11_FLAG)
+  append_if(OPENMP_HAVE_STD_CPP11_FLAG "-std=c++11" CMAKE_CXX_FLAGS)
+endif()
Index: openmp/trunk/cmake/config-ix.cmake
===================================================================
--- openmp/trunk/cmake/config-ix.cmake
+++ openmp/trunk/cmake/config-ix.cmake
@@ -3,4 +3,5 @@
 
 check_c_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG)
 
-check_cxx_compiler_flag(-std=c++11 OPENMP_HAVE_STD_CPP11_FLAG)
\ No newline at end of file
+check_cxx_compiler_flag(-std=gnu++11 OPENMP_HAVE_STD_GNUPP11_FLAG)
+check_cxx_compiler_flag(-std=c++11 OPENMP_HAVE_STD_CPP11_FLAG)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55477.177709.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181211/952c3ecb/attachment.bin>


More information about the llvm-commits mailing list