From 2ba34cbee2b292583d1a36cfa7e06b726f525f82 Mon Sep 17 00:00:00 2001 From: belliash Date: Tue, 4 Aug 2020 14:55:39 +0200 Subject: [PATCH] Set some CFLAGS, to make binaries more portable and lower size. --- build-linux.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build-linux.sh b/build-linux.sh index 29b4e1a..368438d 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -7,6 +7,10 @@ PCHDIR="$(pwd)/patches" SRCDIR="$(pwd)/sources" WRKDIR="$(pwd)" +# Compiler Flags +CFLAGS="-march=x86-64 -mtune=generic -O2 -s -pipe" +CXXFLAGS="${CFLAGS}" + # Binutils Settings BINUTILSDIR="${SRCDIR}/binutils" BINUTILSTAG="binutils-2_35" @@ -328,6 +332,10 @@ fi mkdir -p ${BINDIR} mkdir -p ${SRCDIR} +# Export compiler flags +export CFLAGS +export CXXFLAGS + # Download Mingw-W64 mingw_fetch