Compare commits

..

4 Commits

Author SHA1 Message Date
Leo Yuriev
9bbc62f5a0 mdbx: refine internal warnings control. 2018-03-14 15:16:49 +03:00
Leo Yuriev
8c96b1e73b mdbx: fix missing MDBX_DEVEL=0. 2018-03-14 15:07:16 +03:00
Leo Yuriev
436b4870e8 mdbx: -O3 by default for Elbrus. 2018-03-14 15:04:07 +03:00
Leo Yuriev
483c4abb3f mdbx: remove Elbrus's alignment_reduction_ignored workaround. 2018-03-14 14:57:46 +03:00
2 changed files with 26 additions and 26 deletions

View File

@@ -23,17 +23,14 @@ suffix ?=
CC ?= gcc CC ?= gcc
CXX ?= g++ CXX ?= g++
XCFLAGS ?= -DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1 ifeq ($(shell (export LC_ALL=C; ($(CC) --version 2>&1; $(CC) -v 2>&1) | grep -q -i 'e2k' && echo yes)),yes)
CFLAGS ?= -O3 -g3 -Wall -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden
else
CFLAGS ?= -O2 -g3 -Wall -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden CFLAGS ?= -O2 -g3 -Wall -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden
CFLAGS += -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS)
# temporary workaround for lcc's bug
TARGET_ARCH_e2k = $(shell (export LC_ALL=C; ($(CC) --version 2>&1; $(CC) -v 2>&1) | grep -q -i 'e2k' && echo yes || echo no))
ifeq ($(TARGET_ARCH_e2k),yes)
TARGET_ARCH := e2k
CFLAGS += -mtune=native -Wno-alignment-reduction-ignored
endif endif
XCFLAGS ?= -DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1
CFLAGS += -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS)
CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS)) CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS))
TESTDB ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db TESTDB ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db
TESTLOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.log TESTLOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.log

View File

@@ -25,7 +25,7 @@
/* Features under development */ /* Features under development */
#ifndef MDBX_DEVEL #ifndef MDBX_DEVEL
# define MDBX_DEVEL 1 # define MDBX_DEVEL 0
#endif #endif
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
@@ -89,25 +89,28 @@
#endif /* __SANITIZE_THREAD__ */ #endif /* __SANITIZE_THREAD__ */
#if __has_warning("-Wconstant-logical-operand") #if __has_warning("-Wconstant-logical-operand")
#if defined(__clang__) # if defined(__clang__)
#pragma clang diagnostic ignored "-Wconstant-logical-operand" # pragma clang diagnostic ignored "-Wconstant-logical-operand"
#elif defined(__GNUC__) # elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wconstant-logical-operand" # pragma GCC diagnostic ignored "-Wconstant-logical-operand"
#else # else
#pragma warning disable "constant-logical-operand" # pragma warning disable "constant-logical-operand"
#endif # endif
#endif /* -Wconstant-logical-operand */ #endif /* -Wconstant-logical-operand */
#if __has_warning("-Walignment-reduction-ignored") || defined(__e2k__) || defined(__ICC) #if defined(__LCC__) && (__LCC__ <= 121)
#if defined(__ICC) /* bug #2798 */
#pragma warning(disable: 3453 1366) # pragma diag_suppress alignment_reduction_ignored
#elif defined(__clang__) #elif defined(__ICC)
#pragma clang diagnostic ignored "-Walignment-reduction-ignored" # pragma warning(disable: 3453 1366)
#elif defined(__GNUC__) #elif __has_warning("-Walignment-reduction-ignored")
#pragma GCC diagnostic ignored "-Walignment-reduction-ignored" # if defined(__clang__)
#else # pragma clang diagnostic ignored "-Walignment-reduction-ignored"
#pragma warning disable "alignment-reduction-ignored" # elif defined(__GNUC__)
#endif # pragma GCC diagnostic ignored "-Walignment-reduction-ignored"
# else
# pragma warning disable "alignment-reduction-ignored"
# endif
#endif /* -Wno-constant-logical-operand */ #endif /* -Wno-constant-logical-operand */
#include "./osal.h" #include "./osal.h"