From 42531e182d2eb52d5f690f3670dacbf3fb23c3bc Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 12 Aug 2021 13:12:34 +0100 Subject: [PATCH] Require GCC 4.8 for DISTRHO_DEPRECATED Signed-off-by: falkTX --- .github/workflows/example-plugins.yml | 2 +- dgl/Makefile | 5 ++++- distrho/src/DistrhoDefines.h | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/example-plugins.yml b/.github/workflows/example-plugins.yml index 8c0c2d85..31acfd05 100644 --- a/.github/workflows/example-plugins.yml +++ b/.github/workflows/example-plugins.yml @@ -83,7 +83,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yq g++-multilib libasound2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 + sudo apt-get install -yq g++-multilib libasound2-dev:i386 libcairo2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 - name: Build linux x86 env: CFLAGS: -m32 diff --git a/dgl/Makefile b/dgl/Makefile index db7049c3..6eb1d192 100644 --- a/dgl/Makefile +++ b/dgl/Makefile @@ -14,7 +14,10 @@ BUILD_CXX_FLAGS += -Isrc/pugl-upstream/include LINK_FLAGS += $(DGL_LIBS) # TODO fix these after pugl-upstream is done -BUILD_CXX_FLAGS += -Wno-attributes -Wno-extra -Wno-missing-field-initializers -Wno-narrowing +BUILD_CXX_FLAGS += -Wno-attributes -Wno-extra -Wno-missing-field-initializers +ifneq ($(MACOS),true) +BUILD_CXX_FLAGS += -Wno-narrowing +endif # ifneq ($(MACOS_OLD),true) # needed by sofd right now, fix later diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h index d63a0c33..a80644f1 100644 --- a/distrho/src/DistrhoDefines.h +++ b/distrho/src/DistrhoDefines.h @@ -72,7 +72,7 @@ #endif /* Define DISTRHO_DEPRECATED */ -#if defined(__GNUC__) +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 480 # define DISTRHO_DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER) # define DISTRHO_DEPRECATED [[deprecated]] /* Note: __declspec(deprecated) it not applicable to enum members */ @@ -83,7 +83,7 @@ /* Define DISTRHO_DEPRECATED_BY */ #if defined(__clang__) && defined(DISTRHO_PROPER_CPP11_SUPPORT) # define DISTRHO_DEPRECATED_BY(other) __attribute__((deprecated("", other))) -#elif defined(__GNUC__) +#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 480 # define DISTRHO_DEPRECATED_BY(other) __attribute__((deprecated("Use " other))) #else # define DISTRHO_DEPRECATED_BY(other) DISTRHO_DEPRECATED