util/crossgcc/buildgcc: Use one line per configure option

To improve the readability and visibility of the configure options, move
each of them to a separate line.

Change-Id: Ifc39e4d0849d220d85e1d9ce92fc008fec610694
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69941
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
Felix Singer 2022-11-23 10:12:26 +01:00
parent 3e7438b001
commit f8157af3aa
1 changed files with 74 additions and 38 deletions

View File

@ -624,9 +624,11 @@ build_GMP() {
# shellcheck disable=SC2086 # shellcheck disable=SC2086
CC="$(hostcc host)" CXX="$(hostcxx host)" \ CC="$(hostcc host)" CXX="$(hostcxx host)" \
../${GMP_DIR}/configure --disable-shared --enable-fat \ ../${GMP_DIR}/configure \
--prefix="$TARGETDIR" $OPTIONS \ --disable-shared \
|| touch .failed --enable-fat \
--prefix="$TARGETDIR" \
$OPTIONS || touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
$MAKE $JOBS || touch .failed $MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed $MAKE install DESTDIR=$DESTDIR || touch .failed
@ -639,10 +641,12 @@ build_GMP() {
build_MPFR() { build_MPFR() {
test "$UNAME" = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL" test "$UNAME" = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL"
CC="$(hostcc host)" CXX="$(hostcxx host)" \ CC="$(hostcc host)" CXX="$(hostcxx host)" \
../${MPFR_DIR}/configure --disable-shared --prefix="$TARGETDIR" \ ../${MPFR_DIR}/configure \
--disable-shared \
--prefix="$TARGETDIR" \
--infodir="$TARGETDIR/info" \ --infodir="$TARGETDIR/info" \
--with-gmp="$DESTDIR$TARGETDIR" CFLAGS="$HOSTCFLAGS" || \ --with-gmp="$DESTDIR$TARGETDIR" \
touch .failed CFLAGS="$HOSTCFLAGS" || touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
$MAKE $JOBS || touch .failed $MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed $MAKE install DESTDIR=$DESTDIR || touch .failed
@ -657,10 +661,13 @@ build_MPFR() {
build_MPC() { build_MPC() {
CC="$(hostcc host)" CXX="$(hostcxx host)" \ CC="$(hostcc host)" CXX="$(hostcxx host)" \
../${MPC_DIR}/configure --disable-shared --prefix="$TARGETDIR" \ ../${MPC_DIR}/configure \
--infodir="$TARGETDIR/info" --with-mpfr="$DESTDIR$TARGETDIR" \ --disable-shared \
--with-gmp="$DESTDIR$TARGETDIR" CFLAGS="$HOSTCFLAGS" || \ --prefix="$TARGETDIR" \
touch .failed --infodir="$TARGETDIR/info" \
--with-mpfr="$DESTDIR$TARGETDIR" \
--with-gmp="$DESTDIR$TARGETDIR" \
CFLAGS="$HOSTCFLAGS" || touch .failed
# work around build problem of libmpfr.la # work around build problem of libmpfr.la
if [ "$DESTDIR" != "" ]; then if [ "$DESTDIR" != "" ]; then
@ -685,14 +692,18 @@ build_BINUTILS() {
fi fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
CC="$(hostcc target)" CXX="$(hostcxx target)" \ CC="$(hostcc target)" CXX="$(hostcxx target)" \
../binutils-${BINUTILS_VERSION}/configure --prefix="$TARGETDIR" \ ../binutils-${BINUTILS_VERSION}/configure \
--target=${TARGETARCH} --enable-targets=${TARGETARCH}${ADDITIONALTARGET} \ --prefix="$TARGETDIR" \
--disable-werror --disable-nls --enable-lto \ --target=${TARGETARCH} \
--enable-gold --enable-multilib \ --enable-targets=${TARGETARCH}${ADDITIONALTARGET} \
--disable-werror \
--disable-nls \
--enable-lto \
--enable-gold \
--enable-multilib \
${BINUTILS_OPTIONS} \ ${BINUTILS_OPTIONS} \
CFLAGS="$HOSTCFLAGS" \ CFLAGS="$HOSTCFLAGS" \
CXXFLAGS="$HOSTCFLAGS" \ CXXFLAGS="$HOSTCFLAGS" || touch .failed
|| touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
$MAKE $JOBS || touch .failed $MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed $MAKE install DESTDIR=$DESTDIR || touch .failed
@ -708,14 +719,21 @@ bootstrap_GCC() {
CXXFLAGS_FOR_BUILD="$HOSTCFLAGS" \ CXXFLAGS_FOR_BUILD="$HOSTCFLAGS" \
CXXFLAGS_FOR_TARGET="$HOSTCFLAGS -fPIC" \ CXXFLAGS_FOR_TARGET="$HOSTCFLAGS -fPIC" \
../gcc-${GCC_VERSION}/configure \ ../gcc-${GCC_VERSION}/configure \
--prefix="$TARGETDIR" --libexecdir="$TARGETDIR/lib" \ --prefix="$TARGETDIR" \
--libexecdir="$TARGETDIR/lib" \
--enable-bootstrap \ --enable-bootstrap \
--disable-werror --disable-nls \ --disable-werror \
--disable-shared --disable-multilib \ --disable-nls \
--disable-libssp --disable-libquadmath --disable-libcc1 \ --disable-shared \
--disable-multilib \
--disable-libssp \
--disable-libquadmath \
--disable-libcc1 \
--disable-libsanitizer \ --disable-libsanitizer \
${GCC_OPTIONS} --enable-languages="${LANGUAGES}" \ ${GCC_OPTIONS} \
--with-gmp="$DESTDIR$TARGETDIR" --with-mpfr="$DESTDIR$TARGETDIR" \ --enable-languages="${LANGUAGES}" \
--with-gmp="$DESTDIR$TARGETDIR" \
--with-mpfr="$DESTDIR$TARGETDIR" \
--with-mpc="$DESTDIR$TARGETDIR" \ --with-mpc="$DESTDIR$TARGETDIR" \
--with-pkgversion="coreboot bootstrap v$CROSSGCC_VERSION" \ --with-pkgversion="coreboot bootstrap v$CROSSGCC_VERSION" \
&& \ && \
@ -750,19 +768,35 @@ build_cross_GCC() {
CXXFLAGS="$HOSTCFLAGS $CLANGCXXFLAGS" \ CXXFLAGS="$HOSTCFLAGS $CLANGCXXFLAGS" \
CXXFLAGS_FOR_BUILD="$HOSTCFLAGS $CLANGCXXFLAGS" \ CXXFLAGS_FOR_BUILD="$HOSTCFLAGS $CLANGCXXFLAGS" \
../gcc-${GCC_VERSION}/configure \ ../gcc-${GCC_VERSION}/configure \
--prefix="$TARGETDIR" --libexecdir="$TARGETDIR/lib" \ --prefix="$TARGETDIR" \
--target=${TARGETARCH} --disable-werror --disable-shared \ --libexecdir="$TARGETDIR/lib" \
--enable-lto --enable-plugins --enable-gold --enable-ld=default \ --target=${TARGETARCH} \
--disable-libssp --disable-bootstrap --disable-nls \ --disable-werror \
--disable-libquadmath --without-headers \ --disable-shared \
--enable-lto \
--enable-plugins \
--enable-gold \
--enable-ld=default \
--disable-libssp \
--disable-bootstrap \
--disable-nls \
--disable-libquadmath \
--without-headers \
--disable-threads \ --disable-threads \
--enable-interwork --enable-multilib --enable-targets=all \ --enable-interwork \
--disable-libatomic --disable-libcc1 --disable-decimal-float \ --enable-multilib \
${GCC_OPTIONS} --enable-languages="${LANGUAGES}" \ --enable-targets=all \
--disable-libatomic \
--disable-libcc1 \
--disable-decimal-float \
${GCC_OPTIONS} \
--enable-languages="${LANGUAGES}" \
--with-system-zlib \ --with-system-zlib \
--with-gmp="$DESTDIR$TARGETDIR" --with-mpfr="$DESTDIR$TARGETDIR" \ --with-gmp="$DESTDIR$TARGETDIR" \
--with-mpfr="$DESTDIR$TARGETDIR" \
--with-mpc="$DESTDIR$TARGETDIR" \ --with-mpc="$DESTDIR$TARGETDIR" \
--with-gnu-as --with-gnu-ld \ --with-gnu-as \
--with-gnu-ld \
--with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION" \ --with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION" \
&& \ && \
mkdir -p gcc/$TARGETARCH && \ mkdir -p gcc/$TARGETARCH && \
@ -810,10 +844,12 @@ build_LLVM() {
ln -nsf "$CRT_DIR" ../compiler-rt ln -nsf "$CRT_DIR" ../compiler-rt
ln -nsf "$LLVMCMAKE_DIR" ../cmake ln -nsf "$LLVMCMAKE_DIR" ../cmake
$CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$DESTDIR$TARGETDIR" \ $CMAKE -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX="$DESTDIR$TARGETDIR" \
-DCLANG_VENDOR="coreboot toolchain v$CROSSGCC_VERSION - " \ -DCLANG_VENDOR="coreboot toolchain v$CROSSGCC_VERSION - " \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt" \ -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt" \
-DLLVM_INCLUDE_BENCHMARKS="OFF" -DCMAKE_BUILD_TYPE=Release \ -DLLVM_INCLUDE_BENCHMARKS="OFF" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD="AArch64;ARM;PowerPC;RISCV;X86" \ -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;PowerPC;RISCV;X86" \
../llvm || touch .failed ../llvm || touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
@ -835,8 +871,8 @@ build_LLVM() {
build_CMAKE() { build_CMAKE() {
CC="$(hostcc host)" CXX="$(hostcxx host)" CFLAGS="$HOSTCFLAGS" \ CC="$(hostcc host)" CXX="$(hostcxx host)" CFLAGS="$HOSTCFLAGS" \
../${CMAKE_DIR}/configure --prefix="$TARGETDIR" \ ../${CMAKE_DIR}/configure \
|| touch .failed --prefix="$TARGETDIR" || touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
$MAKE $JOBS || touch .failed $MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed $MAKE install DESTDIR=$DESTDIR || touch .failed
@ -844,8 +880,8 @@ build_CMAKE() {
build_NASM() { build_NASM() {
CC="$(hostcc host)" CXX="$(hostcxx host)" CFLAGS="$HOSTCFLAGS" CC="$(hostcc host)" CXX="$(hostcxx host)" CFLAGS="$HOSTCFLAGS"
../${NASM_DIR}/configure --prefix="$TARGETDIR" \ ../${NASM_DIR}/configure \
|| touch .failed --prefix="$TARGETDIR" || touch .failed
# shellcheck disable=SC2086 # shellcheck disable=SC2086
$MAKE $JOBS || touch .failed $MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed $MAKE install DESTDIR=$DESTDIR || touch .failed