From: Jon Trulson Date: Thu, 28 Jun 2018 22:55:04 +0000 (-0600) Subject: Merge branch 'master' into cde-next X-Git-Tag: 2.3.0a~278^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a4a5413cd5ad322578bd9efd70f173fc347ee62b;p=oweals%2Fcde.git Merge branch 'master' into cde-next --- a4a5413cd5ad322578bd9efd70f173fc347ee62b diff --cc cde/config/cf/FreeBSD.cf index 7a2bb7b5,88d224fb..34528bb1 --- a/cde/config/cf/FreeBSD.cf +++ b/cde/config/cf/FreeBSD.cf @@@ -179,14 -176,31 +176,31 @@@ USE_GCC = UseGc #endif #endif - /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */ + /* Suppress warnings dependant from compiler versions */ #ifndef DefaultGcc2i386Opt - #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5) - #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \ - -Wno-unused-result - #endif + # if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__) + # if (__clang_major__ > 3) || \ + (__clang_major__ == 3 && __clang_minor__ >= 4) + # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \ - -Wno-unused-result -Wno-deprecated-register ++ -Wno-unused-result + # else + # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \ + -Wno-unused-result + # endif + # elif defined(__GNUC__) && defined(__GNUC_MINOR__) + # if (__GNUC__ > 4) || \ + (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) + # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \ + -Wno-unused-result -Wno-deprecated + # else + # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings + # endif + # else + # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing + # endif #endif + #ifndef OptimizedCDebugFlags # if defined(i386Architecture) || defined(AMD64Architecture) # define OptimizedCDebugFlags DefaultGcc2i386Opt diff --cc cde/config/cf/OpenBSD.cf index 82514188,9402e199..c9e30dce --- a/cde/config/cf/OpenBSD.cf +++ b/cde/config/cf/OpenBSD.cf @@@ -1050,8 -1048,13 +1048,13 @@@ CXXDEPENDINCLUDE != CcCmd -v -x c++ /de # endif #endif + /* Suppress warnings dependant from compiler versions */ #if !defined(GccWarningOptions) - # define GccWarningOptions -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch -Wno-unused-result + # if (defined __clang__) -# define GccWarningOptions -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch -Wno-unused-result -Wno-deprecated-register ++# define GccWarningOptions -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch -Wno-unused-result + # else + # define GccWarningOptions -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch + # endif #endif #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)