From 163c717dec73df7a907821cfb092a2ab6c62286a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 23 Aug 2016 00:35:28 +0200 Subject: cmake/mingw-w64: switch to -std=c11 for pure C mode --- cmake/mingw-w64.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake index 96669e2a..5589aa2f 100644 --- a/cmake/mingw-w64.cmake +++ b/cmake/mingw-w64.cmake @@ -42,8 +42,9 @@ set(lto "-flto -fuse-linker-plugin -flto-compression-level=9 -flto-partition=non set(bloat "-fno-exceptions -fno-rtti") set(sections "-ffunction-sections -fdata-sections") -set(_CFLAGS "-fvisibility=hidden -pipe") -set(_CXXFLAGS "${bloat} ${_CFLAGS} -std=c++11") +set(ccflags-common "-fvisibility=hidden -pipe") +set(_CXXFLAGS "${bloat} ${ccflags-common} -std=c++11") +set(_CFLAGS "${ccflags-common} -std=c11") set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto} ${sections}") set(_CFLAGS_DEBUG "-g -O0 -fstack-protector-strong") set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}") -- cgit v1.2.3