[PATCH] D61797: [crt] Use -std=c11 for crtbegin.o/crtend.o

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 12:22:51 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL360459: [crt] Use -std=c11 for crtbegin.o/crtend.o (authored by phosek, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D61797?vs=199050&id=199051#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D61797

Files:
  compiler-rt/trunk/cmake/config-ix.cmake
  compiler-rt/trunk/lib/crt/CMakeLists.txt


Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -54,6 +54,7 @@
 
 # CodeGen options.
 check_c_compiler_flag(-ffreestanding         COMPILER_RT_HAS_FFREESTANDING_FLAG)
+check_c_compiler_flag(-std=c11               COMPILER_RT_HAS_STD_C11_FLAG)
 check_cxx_compiler_flag(-fPIC                COMPILER_RT_HAS_FPIC_FLAG)
 check_cxx_compiler_flag(-fPIE                COMPILER_RT_HAS_FPIE_FLAG)
 check_cxx_compiler_flag(-fno-builtin         COMPILER_RT_HAS_FNO_BUILTIN_FLAG)
Index: compiler-rt/trunk/lib/crt/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/crt/CMakeLists.txt
+++ compiler-rt/trunk/lib/crt/CMakeLists.txt
@@ -71,6 +71,7 @@
 check_cxx_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY
   SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n")
 
+append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 CRT_CFLAGS)
 append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS)
 append_list_if(COMPILER_RT_HAS_WNO_PEDANTIC -Wno-pedantic CRT_CFLAGS)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61797.199051.patch
Type: text/x-patch
Size: 1287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190510/d2e6afd5/attachment.bin>


More information about the llvm-commits mailing list