diff --git a/package/libcpprestsdk/libcpprestsdk.mk b/package/libcpprestsdk/libcpprestsdk.mk index e8dddeddd7..10b5934d05 100644 --- a/package/libcpprestsdk/libcpprestsdk.mk +++ b/package/libcpprestsdk/libcpprestsdk.mk @@ -18,8 +18,10 @@ LIBCPPRESTSDK_CONF_OPTS += \ -DBoost_USE_STATIC_RUNTIME=ON endif +LIBCPPRESTSDK_CXXFLAGS = $(TARGET_CXXFLAGS) + ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) -LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" +LIBCPPRESTSDK_CXXFLAGS += -latomic endif ifeq ($(BR2_PACKAGE_BROTLI),y) @@ -36,4 +38,10 @@ else LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=ON endif +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +LIBCPPRESTSDK_CXXFLAGS += -O0 +endif + +LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(LIBCPPRESTSDK_CXXFLAGS)" + $(eval $(cmake-package))