summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-04-24 18:46:00 +0000
committer Eric Hameleers <alien@slackware.com>2019-04-24 18:46:00 +0000
commit2c02e9aa2f697c2eaefa58bac162b361b2f3de8e (patch)
treea6e7211b57f34de5c8c2c40afe08f5134f55ff35
parent7b1621d39079f4ada0dd5e70e163469defceaec1 (diff)
downloadasb-2c02e9aa2f697c2eaefa58bac162b361b2f3de8e.tar.gz
asb-2c02e9aa2f697c2eaefa58bac162b361b2f3de8e.tar.xz
chromium: several failed attempts at fixing the 32bit build
-rwxr-xr-xchromium/build/chromium.SlackBuild61
1 files changed, 48 insertions, 13 deletions
diff --git a/chromium/build/chromium.SlackBuild b/chromium/build/chromium.SlackBuild
index e7e5cbcd..e2766cd3 100755
--- a/chromium/build/chromium.SlackBuild
+++ b/chromium/build/chromium.SlackBuild
@@ -368,6 +368,15 @@
# 73.0.3683.75-1:
# 15/mar/2019 by Eric Hameleers <alien@slackware.com>
# * Update to M73.
+# 73.0.3683.75-2:
+# 17/mar/2019 by Eric Hameleers <alien@slackware.com>
+# * Fix 32bit build.
+# 73.0.3683.86-1:
+# 31/mar/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 73.0.3683.103-1:
+# 14/apr/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
#
# -----------------------------------------------------------------------------
@@ -381,10 +390,13 @@
SRCNAM=chromium
SRCEXT=${SRCEXT:-""} # could be "-dev" for development build
PRGNAM=${SRCNAM}${SRCEXT} # chromium or chromium-dev
-VERSION=${VERSION:-73.0.3683.75}
+VERSION=${VERSION:-73.0.3683.103}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
+# Cross-compiling 32bit binaries on 64bit Slackware; set to "YES":
+CROSS32=${CROSS32:-"NO"}
+
# Differentiate between stable and development releases:
if [ "x$SRCEXT" = "x-dev" ]; then
CRFLAGS="CHROMIUM_DEV_FLAGS"
@@ -502,15 +514,23 @@ fi
case "$ARCH" in
i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ # Fix for using lld while linking chromium in a 32bit chroot:
+ SLKLDFLAGS="-Wl,-z,notext"; LIBDIRSUFFIX=""
DSSE="1"
FFMPEG_ARCH="ia32"
;;
- x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ x86_64) # Ensure that 32bit libraries are found first if we cross-compile:
+ if [ "${CROSS32}" = "YES" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS="-L/usr/lib"; LIBDIRSUFFIX=""
+ FFMPEG_ARCH="ia32"
+ else
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ FFMPEG_ARCH="x64"
+ fi
#DSSE="0"
DSSE="1"
- FFMPEG_ARCH="x64"
;;
armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
@@ -725,6 +745,9 @@ export -n CXXFLAGS="$SLKCFLAGS"
export -n CFLAGS="$SLKCFLAGS -Wno-unused-local-typedefs"
export PATH="$TMP/tmp-$PRGNAM/privatebin:$PATH"
+# After building gn, run:
+# "./out/Release/gn args out/Release --list"
+# for a list of all variables.
_chromium_conf=(
"clang_use_chrome_plugins=${do_clang}"
'enable_hangout_services_extension=true'
@@ -756,6 +779,7 @@ _chromium_conf=(
'logging_like_official_build=true'
'proprietary_codecs=true'
'remove_webcore_debug_symbols=true'
+ 'symbol_level=0'
'treat_warnings_as_errors=false'
"usb_ids_path=\"/usr/share/hwdata/usb.ids\""
'use_allocator="none"'
@@ -765,11 +789,17 @@ _chromium_conf=(
'use_custom_libcxx=true'
'use_gconf=false'
'use_kerberos=false'
- 'use_lld=false'
+ 'use_lld=true'
"use_pulseaudio=${do_pa}"
'use_sysroot=false'
+ "extra_cxxflags=\"${CXXFLAGS}\""
+ "extra_ldflags=\"${LDFLAGS}\""
)
+if [ "${CROSS32}" = "YES" ]; then
+ _chromium_conf=("${_chromium_conf[@]}" 'target_cpu="x86"')
+fi
+
# Change this back when CRBUG 592268 is fixed (error during final link:
# undefined reference to `base::i18n::GetRawIcuMemory())
# See https://bugs.chromium.org/p/chromium/issues/detail?id=592268
@@ -778,7 +808,7 @@ _chromium_conf=(
gn_system_libraries=(
# 'bzip2'
# 'ffmpeg'
- 'flac'
+ # 'flac'
# 'freetype2'
# 'harfbuzz'
# 'icu'
@@ -845,6 +875,12 @@ if [ ${USE_NACL} -eq 1 ]; then
python2 build/download_nacl_toolchains.py --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract \
2>&1 | tee $OUTPUT/nacl_dl-${PRGNAM}.log
fi
+
+# --- Compile --- #
+
+# Final link uses lots of file descriptors.
+ulimit -n 2048
+
# Compile google's internal clang sources if needed
# (clang is required for building NaCl):
if [ ${USE_CLANG} -eq 1 -o ${USE_NACL} -eq 1 ]; then
@@ -909,12 +945,11 @@ echo "-- Compiling the lot."
if [ "$USE_CLANG" = "1" ]; then
# Use the clang that we build in-tree instead of using the system version:
- # clang_use_chrome_plugins=true fails with clang 3.5 - disable for now.
- #export CC="$MYCLANG_PATH/clang"
- #export CXX="$MYCLANG_PATH/clang++"
- #export LD="$MYCLANG_PATH/lld"
- unset CC
- unset CXX
+ export CC="$MYCLANG_PATH/clang"
+ export CXX="$MYCLANG_PATH/clang++"
+ export LD="$MYCLANG_PATH/lld"
+ #unset CC
+ #unset CXX
else
# Be careful not to override CC and CXX (may have been set by gcc5):
export CC=${CC:-"gcc"}