Skip to content

Commit

Permalink
_build.sh: minor cleanup 3
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Aug 30, 2023
1 parent e0e3bbb commit a56f575
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -644,18 +644,6 @@ build_single_target() {
export _CMAKE_GLOBAL='-DCMAKE_BUILD_TYPE=Release'
export _CMAKE_CXX_GLOBAL=''

if [ "${_OS}" = 'linux' ]; then
# Override defaults such as: 'lib/aarch64-linux-gnu'
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"

_CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -D_FORTIFY_SOURCE=2"

_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -fPIC"
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -fPIC"

_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -Wl,-z,relro,-z,now"
fi

# Suppress CMake warnings meant for upstream developers
_CMAKE_GLOBAL="-Wno-dev ${_CMAKE_GLOBAL}"

Expand Down Expand Up @@ -684,6 +672,16 @@ build_single_target() {
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -specs=${_GCCSPECS}"
fi
fi
elif [ "${_OS}" = 'linux' ]; then
# Override defaults such as: 'lib/aarch64-linux-gnu'
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"

_CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -D_FORTIFY_SOURCE=2"

_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -fPIC"
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -fPIC"

_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -Wl,-z,relro,-z,now"
fi

_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_MESSAGE=NEVER"
Expand Down

0 comments on commit a56f575

Please sign in to comment.