From 57ca0d6e1bda8ca6487797118bbdc0be27a1e43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Mon, 13 Feb 2023 16:24:52 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BC=D0=B0=D0=BA?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D0=BE=D0=B2=20`=5F=5Fcold`/`=5F=5Fhot`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit В том числе для устранения проблемы `error: inlining failed in call to ‘always_inline FOO(...)’: target specific option mismatch` при сборке посредством GCC >10.x для SH4. --- src/base.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/base.h b/src/base.h index 09aa7ff3..7831b2cd 100644 --- a/src/base.h +++ b/src/base.h @@ -572,17 +572,13 @@ __extern_C key_t ftok(const char *, int); #ifndef __hot #if defined(__OPTIMIZE__) -#if defined(__e2k__) -#define __hot __attribute__((__hot__)) __optimize(3) -#elif defined(__clang__) && !__has_attribute(__hot_) && \ +#if defined(__clang__) && !__has_attribute(__hot__) && \ __has_attribute(__section__) && \ (defined(__linux__) || defined(__gnu_linux__)) /* just put frequently used functions in separate section */ #define __hot __attribute__((__section__("text.hot"))) __optimize("O3") -#elif defined(__LCC__) -#define __hot __attribute__((__hot__, __optimize__("Ofast,O4"))) #elif defined(__GNUC__) || __has_attribute(__hot__) -#define __hot __attribute__((__hot__)) __optimize("O3") +#define __hot __attribute__((__hot__)) #else #define __hot __optimize("O3") #endif @@ -593,17 +589,13 @@ __extern_C key_t ftok(const char *, int); #ifndef __cold #if defined(__OPTIMIZE__) -#if defined(__e2k__) -#define __cold __attribute__((__cold__)) __optimize(1) -#elif defined(__clang__) && !__has_attribute(cold) && \ +#if defined(__clang__) && !__has_attribute(__cold__) && \ __has_attribute(__section__) && \ (defined(__linux__) || defined(__gnu_linux__)) /* just put infrequently used functions in separate section */ #define __cold __attribute__((__section__("text.unlikely"))) __optimize("Os") -#elif defined(__LCC__) -#define __hot __attribute__((__cold__, __optimize__("Osize"))) -#elif defined(__GNUC__) || __has_attribute(cold) -#define __cold __attribute__((__cold__)) __optimize("Os") +#elif defined(__GNUC__) || __has_attribute(__cold__) +#define __cold __attribute__((__cold__)) #else #define __cold __optimize("Os") #endif