aboutsummaryrefslogtreecommitdiff
path: root/binary_tarball/scripts
diff options
context:
space:
mode:
authorohfp <1813007-ohfp@users.noreply.gitlab.com>2020-03-29 01:27:47 +0100
committerohfp <1813007-ohfp@users.noreply.gitlab.com>2020-03-29 01:27:47 +0100
commit8df33c61bb94cb8f600fcd562550359fa6ef06c2 (patch)
tree3f92dec4f9b0c92a2c20bbbad6320bfcb699e85b /binary_tarball/scripts
parenthow hard can it be? (diff)
downloadlibrewolf-linux-8df33c61bb94cb8f600fcd562550359fa6ef06c2.tar.gz
librewolf-linux-8df33c61bb94cb8f600fcd562550359fa6ef06c2.tar.bz2
librewolf-linux-8df33c61bb94cb8f600fcd562550359fa6ef06c2.zip
various (hopefully) script fixes
Diffstat (limited to 'binary_tarball/scripts')
-rwxr-xr-xbinary_tarball/scripts/3_Configure_Source_Code.sh4
-rwxr-xr-xbinary_tarball/scripts/4_Build_Binary_Tarball.sh17
2 files changed, 15 insertions, 6 deletions
diff --git a/binary_tarball/scripts/3_Configure_Source_Code.sh b/binary_tarball/scripts/3_Configure_Source_Code.sh
index 9145243..39b0331 100755
--- a/binary_tarball/scripts/3_Configure_Source_Code.sh
+++ b/binary_tarball/scripts/3_Configure_Source_Code.sh
@@ -17,7 +17,7 @@ rm -rf common;
cd $srcdir
-cat >../mozconfig <<END
+cat >${CI_PROJECT_DIR}/mozconfig <<END
ac_add_options --enable-application=browser
# This supposedly speeds up compilation (We test through dogfooding anyway)
@@ -69,7 +69,7 @@ mk_add_options MOZ_TELEMETRY_REPORTING=0
END
if [[ $CARCH == 'aarch64' ]]; then
- cat >>../mozconfig <<END
+ cat >>${CI_PROJECT_DIR}/mozconfig <<END
# taken from manjaro build:
ac_add_options --enable-optimize="-g0 -O2"
export MOZ_DEBUG_FLAGS=" "
diff --git a/binary_tarball/scripts/4_Build_Binary_Tarball.sh b/binary_tarball/scripts/4_Build_Binary_Tarball.sh
index 892d4f7..16f77b6 100755
--- a/binary_tarball/scripts/4_Build_Binary_Tarball.sh
+++ b/binary_tarball/scripts/4_Build_Binary_Tarball.sh
@@ -6,10 +6,19 @@ srcdir=$1;
OUTPUT_TARBALL=$2;
CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../../)}
_SOURCE_CODE_BINARY_TARBALL_LOCATION="./obj*/dist/librewolf*.tar.bz2";
+_MOZBUILD=$srcdir/../mozbuild
+
+export CPPFLAGS="-D_FORTIFY_SOURCE=2"
+export CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
+export CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
+if [[ $CARCH == 'aarch64' ]]; then
+ LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+fi
+
# LTO needs more open files
ulimit -n 4096
@@ -35,13 +44,13 @@ echo "Building instrumented browser..."
if [[ $CARCH == 'aarch64' ]]; then
-cat >.mozconfig ../mozconfig - <<END
+cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END
ac_add_options --enable-profile-generate
END
else
-cat >.mozconfig ../mozconfig - <<END
+cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END
ac_add_options --enable-profile-generate=cross
END
@@ -75,7 +84,7 @@ echo "Building optimized browser..."
if [[ $CARCH == 'aarch64' ]]; then
-cat >.mozconfig ../mozconfig - <<END
+cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END
ac_add_options --enable-lto
ac_add_options --enable-profile-use
ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
@@ -86,7 +95,7 @@ END
else
-cat >.mozconfig ../mozconfig - <<END
+cat >.mozconfig ${CI_PROJECT_DIR}/mozconfig - <<END
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
bgstack15