0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 04:02:15 +02:00

Updated linux build system to GCC-5.

This commit is contained in:
James Yonan 2016-03-19 02:02:10 -06:00
parent 40e6e1440c
commit 6b1c45f37b
4 changed files with 18 additions and 5 deletions

View File

@ -37,6 +37,7 @@ RANLIB=ranlib
# special hack because OpenSSL build system doesn't use rc options for ar
[ "$AR" = "gcc-ar" ] && AR="gcc-ar rc"
[ "$AR" = "gcc-ar-5" ] && AR="gcc-ar-5 rc"
OPENSSL=$OPENSSL_VERSION
DIST=$(pwd)/openssl/openssl-$PLATFORM

View File

@ -6,6 +6,12 @@ enable_testing()
if(CMAKE_COMPILER_IS_GNUCC)
# JY Added
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} $ENV{LIB_FPIC} $ENV{LIB_OPT_LEVEL} $ENV{PLATFORM_FLAGS} $ENV{OTHER_COMPILER_FLAGS} -Wall -W -Wdeclaration-after-statement")
if (NOT "$ENV{GCC_CMD}" STREQUAL "")
set(CMAKE_C_COMPILER "$ENV{GCC_CMD}")
endif()
if (NOT "$ENV{GPP_CMD}" STREQUAL "")
set(CMAKE_CXX_COMPILER "$ENV{GPP_CMD}")
endif()
if (NOT "$ENV{AR_CMD}" STREQUAL "")
set(CMAKE_AR "$ENV{AR_CMD}")
endif()

View File

@ -3,9 +3,11 @@ export JAVA_DIR=/usr/lib/jvm/java-7-openjdk-amd64
export PLATFORM=linux
export DEBUG_BUILD=0
LTO_FLAGS="-flto=4 -Wl,--no-as-needed" # add to OTHER_COMPILER_FLAGS for LTO
export OTHER_COMPILER_FLAGS="-Wno-unused-local-typedefs -Wno-unused-variable -Wno-shift-count-overflow -pthread"
export CXX_COMPILER_FLAGS="-std=c++11"
export OTHER_COMPILER_FLAGS="$LTO_FLAGS -Wno-unused-local-typedefs -Wno-unused-variable -Wno-shift-count-overflow -pthread"
export CXX_COMPILER_FLAGS="-std=c++14"
export LIB_OPT_LEVEL="-O3"
export LIB_FPIC="-fPIC"
export AR_CMD=gcc-ar
export RANLIB_CMD=gcc-ranlib
export GPP_CMD=g++-5
export GCC_CMD=gcc-5
export AR_CMD=gcc-ar-5
export RANLIB_CMD=gcc-ranlib-5

View File

@ -3,6 +3,10 @@ export JAVA_DIR=/usr/lib/jvm/java-7-openjdk-amd64
export PLATFORM=linux
export DEBUG_BUILD=1
export OTHER_COMPILER_FLAGS="-g -Wno-unused-local-typedefs -Wno-unused-variable -Wno-shift-count-overflow -pthread"
export CXX_COMPILER_FLAGS="-std=c++11"
export CXX_COMPILER_FLAGS="-std=c++14"
export LIB_OPT_LEVEL="-O0"
export LIB_FPIC="-fPIC"
export GPP_CMD=g++-5
export GCC_CMD=gcc-5
export AR_CMD=gcc-ar-5
export RANLIB_CMD=gcc-ranlib-5