mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17479 from gschorcht/cxxexflags_cpp+14
makefiles: use C++14 standard by default for C++ compilations
This commit is contained in:
commit
8549ff2f7d
1
cpu/esp32/vendor/esp-idf/nvs_flash/Makefile
vendored
1
cpu/esp32/vendor/esp-idf/nvs_flash/Makefile
vendored
@ -3,7 +3,6 @@ MODULE=esp_idf_nvs_flash
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
CFLAGS += -DESP_PLATFORM
|
||||
CXXFLAGS += -std=c++11
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/nvs_flash/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/spi_flash/include
|
||||
|
@ -3,6 +3,5 @@ MODULE=esp_idf_nvs_flash
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
CFLAGS += -DESP_PLATFORM -DNVS_CRC_HEADER_FILE=\"crc.h\"
|
||||
CXXFLAGS += -std=c++11
|
||||
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/nvs_flash/include
|
||||
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/util/include
|
||||
|
@ -45,6 +45,12 @@ OPTIONAL_CFLAGS += -Wold-style-definition
|
||||
CXXUWFLAGS += -std=%
|
||||
CXXUWFLAGS += -Wstrict-prototypes -Wold-style-definition
|
||||
|
||||
ifeq ($(filter -std=%,$(CXXEXFLAGS)),)
|
||||
ifeq ($(shell $(CC) -std=c++14 -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
|
||||
CXXEXFLAGS += -std=c++14
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(LTO),1)
|
||||
$(warning Building with Link-Time-Optimizations is currently an experimental feature. Expect broken binaries.)
|
||||
LTOFLAGS = -flto
|
||||
|
@ -1,3 +1 @@
|
||||
INCLUDES += -I$(PKGDIRBASE)/arduino_api/api
|
||||
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
@ -7,8 +7,5 @@ ifneq (0,$(shell which flatc > /dev/null 2>&1 ; echo $$?))
|
||||
$(call target-export-variables,all,FLATC)
|
||||
endif
|
||||
|
||||
# This module requires cpp11 support
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
||||
# This package is a header only package, so there's nothing to build
|
||||
PSEUDOMODULES += flatbuffers
|
||||
|
@ -1,3 +1 @@
|
||||
INCLUDES += -I$(PKGDIRBASE)/talking_leds/src
|
||||
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
@ -11,7 +11,3 @@ ifeq (llvm,$(TOOLCHAIN))
|
||||
CXXEXFLAGS += -Wno-unused-variable
|
||||
CXXEXFLAGS += -Wno-shift-count-negative
|
||||
endif
|
||||
|
||||
ifneq (native,$(BOARD))
|
||||
CXXEXFLAGS += -std=c++11
|
||||
endif
|
||||
|
@ -20,10 +20,5 @@ endif
|
||||
# include the Arduino headers
|
||||
INCLUDES += -I$(RIOTBASE)/sys/arduino/include
|
||||
|
||||
# Arduino provices C++11, which is not enabled by default in Ubuntu's avr-gcc
|
||||
# package, which is __horrible__ out of date. However, we cannot simply ignore
|
||||
# all Ubuntu users and instead simply manually enable C++11 support
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
||||
PSEUDOMODULES += arduino_pwm
|
||||
PSEUDOMODULES += arduino_serial_stdio
|
||||
|
@ -1,4 +1 @@
|
||||
# This module requires cpp 11
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -119,4 +119,18 @@ void operator delete[](void* ptr, const std::nothrow_t&) noexcept {
|
||||
std::free(ptr);
|
||||
}
|
||||
|
||||
/* end of tinynew.cpp */
|
||||
|
||||
/* additional delete operators required by C++14 */
|
||||
|
||||
void operator delete (void* ptr, std::size_t,
|
||||
const std::nothrow_t&) noexcept {
|
||||
std::free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[] (void* ptr, std::size_t,
|
||||
const std::nothrow_t&) noexcept {
|
||||
std::free(ptr);
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
@ -1,3 +1 @@
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
CXXFLAGS += -std=c++11
|
||||
|
@ -14,6 +14,8 @@
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -35,6 +37,14 @@ void operator delete(void *ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void operator delete(void *ptr, size_t) noexcept {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void *ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void operator delete [](void *ptr, size_t) noexcept {
|
||||
free(ptr);
|
||||
}
|
||||
|
@ -1,9 +1,5 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
# If you want to add some extra flags when compile c++ files, add these flags
|
||||
# to CXXEXFLAGS variable
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
||||
# nucleo-f303k8 doesn't have enough RAM to run the test so we reduce the stack
|
||||
# size for every thread
|
||||
ifneq (,$(filter nucleo-f303k8 nucleo-f334r8,$(BOARD)))
|
||||
|
@ -1,9 +1,5 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
# If you want to add some extra flags when compile c++ files, add these flags
|
||||
# to CXXEXFLAGS variable
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
||||
USEMODULE += cpp11-compat
|
||||
USEMODULE += xtimer
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
# If you want to add some extra flags when compile c++ files, add these flags
|
||||
# to CXXEXFLAGS variable
|
||||
CXXEXFLAGS += -std=c++11
|
||||
|
||||
USEMODULE += cpp11-compat
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += timex
|
||||
|
Loading…
Reference in New Issue
Block a user