Commit 42c2712b authored by gejun's avatar gejun

Drop support for gcc before 4.8

parent 8d94754e
......@@ -14,11 +14,6 @@ LIBPATHS = $(addprefix -L, $(LIBS))
SRCEXTS = .c .cc .cpp .proto
HDREXTS = .h .hpp
# strict-aliasing in gcc4.4 in buggy
ifeq ($(shell echo $$(($(GCC_VERSION)/ 100))), 404)
CXXFLAGS+=-Wno-strict-aliasing
CFLAGS+=-Wno-strict-aliasing
endif
#required by base/crc32.cc to boost performance for 10x
ifeq ($(shell test $(GCC_VERSION) -ge 40400; echo $$?),0)
CXXFLAGS+=-msse4 -msse4.2
......
......@@ -28,10 +28,10 @@ git clone this repo. cd into the repo and run: sh config_brpc.sh --headers=../..
download deps: third-64/tcmalloc@tcmalloc_1-7-0-200_PD_BL
Rerun config_brpc.sh
# Supported toolchains:
GCC: 3.4-7.1
# Supported deps:
GCC: 4.8-7.1
glibc: 2.12-2.25
protobuf: 2.4-3.2
gflags: 2.0-2.21
openssl: 0.98-1.1
openssl: 0.97-1.1
tcmalloc: 1.7-2.5
......@@ -13,8 +13,6 @@ if [ $? != 0 ] ; then >&2 $ECHO "Terminating..."; exit 1 ; fi
eval set -- "$TEMP"
# Convert to abspath always so that generated mk is include-able from everywhere
CC=gcc
CXX=g++
while true; do
case "$1" in
--headers ) HDRS_IN="$(readlink -f $2)"; shift 2 ;;
......@@ -25,8 +23,23 @@ while true; do
* ) break ;;
esac
done
if [ -z "$CC" ]; then
if [ ! -z "$CXX" ]; then
>&2 $ECHO "--cc and --cxx must be both set or unset"
exit 1
fi
CC=gcc
CXX=g++
elif [ -z "$CXX" ]; then
>&2 $ECHO "--cc and --cxx must be both set or unset"
exit 1
fi
GCC_VERSION=$($CXX tools/print_gcc_version.cc -o print_gcc_version && ./print_gcc_version && rm ./print_gcc_version)
if [ $GCC_VERSION -gt 0 ] && [ $GCC_VERSION -lt 40800 ]; then
>&2 $ECHO "GCC is too old, please install a newer version supporting C++11"
exit 1
fi
if [ -z "$HDRS_IN" ] || [ -z "$LIBS_IN" ]; then
>&2 $ECHO "config_brpc: --headers=HDRPATHS --libs=LIBPATHS must be specified"
......
......@@ -7,11 +7,6 @@ CPPFLAGS+=-DUNIT_TEST -Dprivate=public -Dprotected=public -DBVAR_NOT_LINK_DEFAUL
CXXFLAGS=$(CPPFLAGS) -g -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer -std=c++0x
CFLAGS=$(CPPFLAGS) -g -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-unused-parameter -fno-omit-frame-pointer
# strict-aliasing in gcc4.4 in buggy
ifeq ($(shell echo $$(($(GCC_VERSION)/ 100))), 404)
CXXFLAGS+=-Wno-strict-aliasing
CFLAGS+=-Wno-strict-aliasing
endif
#required by base/crc32.cc to boost performance for 10x
ifeq ($(shell test $(GCC_VERSION) -ge 40400; echo $$?),0)
CXXFLAGS+=-msse4 -msse4.2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment