Skip to content

Commit 2dc1021

Browse files
committed
_build.sh: minor cleanup 3
1 parent 14565b4 commit 2dc1021

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

_build.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -644,18 +644,6 @@ build_single_target() {
644644
export _CMAKE_GLOBAL='-DCMAKE_BUILD_TYPE=Release'
645645
export _CMAKE_CXX_GLOBAL=''
646646

647-
if [ "${_OS}" = 'linux' ]; then
648-
# Override defaults such as: 'lib/aarch64-linux-gnu'
649-
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"
650-
651-
_CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -D_FORTIFY_SOURCE=2"
652-
653-
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -fPIC"
654-
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -fPIC"
655-
656-
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -Wl,-z,relro,-z,now"
657-
fi
658-
659647
# Suppress CMake warnings meant for upstream developers
660648
_CMAKE_GLOBAL="-Wno-dev ${_CMAKE_GLOBAL}"
661649

@@ -684,6 +672,16 @@ build_single_target() {
684672
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -specs=${_GCCSPECS}"
685673
fi
686674
fi
675+
elif [ "${_OS}" = 'linux' ]; then
676+
# Override defaults such as: 'lib/aarch64-linux-gnu'
677+
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"
678+
679+
_CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -D_FORTIFY_SOURCE=2"
680+
681+
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -fPIC"
682+
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -fPIC"
683+
684+
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -Wl,-z,relro,-z,now"
687685
fi
688686

689687
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_MESSAGE=NEVER"

0 commit comments

Comments
 (0)