Skip to content

Commit a552200

Browse files
committed
_build.sh: minor cleanup 3
1 parent ad86f57 commit a552200

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
@@ -652,18 +652,6 @@ build_single_target() {
652652
export _CMAKE_GLOBAL='-DCMAKE_BUILD_TYPE=Release'
653653
export _CMAKE_CXX_GLOBAL=''
654654

655-
if [ "${_OS}" = 'linux' ]; then
656-
# Override defaults such as: 'lib/aarch64-linux-gnu'
657-
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"
658-
659-
_CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -D_FORTIFY_SOURCE=2"
660-
661-
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -fPIC"
662-
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -fPIC"
663-
664-
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -Wl,-z,relro,-z,now"
665-
fi
666-
667655
# Suppress CMake warnings meant for upstream developers
668656
_CMAKE_GLOBAL="-Wno-dev ${_CMAKE_GLOBAL}"
669657

@@ -692,6 +680,16 @@ build_single_target() {
692680
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -specs=${_GCCSPECS}"
693681
fi
694682
fi
683+
elif [ "${_OS}" = 'linux' ]; then
684+
# Override defaults such as: 'lib/aarch64-linux-gnu'
685+
_CMAKE_GLOBAL="${_CMAKE_GLOBAL} -DCMAKE_INSTALL_LIBDIR=lib"
686+
687+
_CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -D_FORTIFY_SOURCE=2"
688+
689+
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -fPIC"
690+
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -fPIC"
691+
692+
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -Wl,-z,relro,-z,now"
695693
fi
696694

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

0 commit comments

Comments
 (0)