buildgcc: Drop libelf/elfutils
Looks like we were unnecessarily dragging this around for some time now. GCC's installation manual doesn't mention libelf as a requirement and a build of crossgcc-i386 doesn't show any sign of it being used. This also fixes a lot issues on non-GNU distributions that were intro- duced by switching to the elfutils version of libelf. Change-Id: Iff308a9bed9ae3842557d251b75d1faadfafe0da Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22773 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
72d1089fac
commit
afda56e1ad
|
@ -71,7 +71,7 @@ build-nds32le:
|
||||||
|
|
||||||
clean_tempfiles:
|
clean_tempfiles:
|
||||||
rm -rf build-*
|
rm -rf build-*
|
||||||
rm -rf binutils-* gcc-* gmp-* libelf-* mpc-* mpfr-*
|
rm -rf binutils-* gcc-* gmp-* mpc-* mpfr-*
|
||||||
rm -rf llvm-* clang-tools-* cfe-* compiler-rt-*
|
rm -rf llvm-* clang-tools-* cfe-* compiler-rt-*
|
||||||
rm -rf acpica-*
|
rm -rf acpica-*
|
||||||
rm -rf gdb-*
|
rm -rf gdb-*
|
||||||
|
|
|
@ -38,7 +38,6 @@ THREADS=1
|
||||||
GMP_VERSION=6.1.2
|
GMP_VERSION=6.1.2
|
||||||
MPFR_VERSION=3.1.5
|
MPFR_VERSION=3.1.5
|
||||||
MPC_VERSION=1.0.3
|
MPC_VERSION=1.0.3
|
||||||
LIBELF_VERSION=0.170
|
|
||||||
GCC_VERSION=6.3.0
|
GCC_VERSION=6.3.0
|
||||||
GCC_AUTOCONF_VERSION=2.69
|
GCC_AUTOCONF_VERSION=2.69
|
||||||
BINUTILS_VERSION=2.29.1
|
BINUTILS_VERSION=2.29.1
|
||||||
|
@ -58,7 +57,6 @@ CMAKE_VERSION=3.9.0-rc3
|
||||||
GMP_ARCHIVE="https://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.xz"
|
GMP_ARCHIVE="https://ftpmirror.gnu.org/gmp/gmp-${GMP_VERSION}.tar.xz"
|
||||||
MPFR_ARCHIVE="https://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.xz"
|
MPFR_ARCHIVE="https://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.xz"
|
||||||
MPC_ARCHIVE="https://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz"
|
MPC_ARCHIVE="https://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz"
|
||||||
LIBELF_ARCHIVE="https://sourceware.org/elfutils/ftp/${LIBELF_VERSION}/elfutils-${LIBELF_VERSION}.tar.bz2"
|
|
||||||
GCC_ARCHIVE="https://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2"
|
GCC_ARCHIVE="https://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2"
|
||||||
BINUTILS_ARCHIVE="https://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz"
|
BINUTILS_ARCHIVE="https://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz"
|
||||||
GDB_ARCHIVE="https://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz"
|
GDB_ARCHIVE="https://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.xz"
|
||||||
|
@ -73,7 +71,7 @@ CTE_ARCHIVE="https://releases.llvm.org/${CLANG_VERSION}/clang-tools-extra-${CLAN
|
||||||
MAKE_ARCHIVE="https://ftpmirror.gnu.org/make/make-${MAKE_VERSION}.tar.bz2"
|
MAKE_ARCHIVE="https://ftpmirror.gnu.org/make/make-${MAKE_VERSION}.tar.bz2"
|
||||||
CMAKE_ARCHIVE="https://cmake.org/files/v3.9/cmake-${CMAKE_VERSION}.tar.gz"
|
CMAKE_ARCHIVE="https://cmake.org/files/v3.9/cmake-${CMAKE_VERSION}.tar.gz"
|
||||||
|
|
||||||
ALL_ARCHIVES="$GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $LIBELF_ARCHIVE \
|
ALL_ARCHIVES="$GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE \
|
||||||
$GCC_ARCHIVE $BINUTILS_ARCHIVE $GDB_ARCHIVE $IASL_ARCHIVE \
|
$GCC_ARCHIVE $BINUTILS_ARCHIVE $GDB_ARCHIVE $IASL_ARCHIVE \
|
||||||
$PYTHON_ARCHIVE $EXPAT_ARCHIVE $LLVM_ARCHIVE $CFE_ARCHIVE \
|
$PYTHON_ARCHIVE $EXPAT_ARCHIVE $LLVM_ARCHIVE $CFE_ARCHIVE \
|
||||||
$CRT_ARCHIVE $CTE_ARCHIVE $MAKE_ARCHIVE $CMAKE_ARCHIVE"
|
$CRT_ARCHIVE $CTE_ARCHIVE $MAKE_ARCHIVE $CMAKE_ARCHIVE"
|
||||||
|
@ -82,7 +80,6 @@ ALL_ARCHIVES="$GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $LIBELF_ARCHIVE \
|
||||||
GMP_DIR="gmp-${GMP_VERSION}"
|
GMP_DIR="gmp-${GMP_VERSION}"
|
||||||
MPFR_DIR="mpfr-${MPFR_VERSION}"
|
MPFR_DIR="mpfr-${MPFR_VERSION}"
|
||||||
MPC_DIR="mpc-${MPC_VERSION}"
|
MPC_DIR="mpc-${MPC_VERSION}"
|
||||||
LIBELF_DIR="elfutils-${LIBELF_VERSION}"
|
|
||||||
GCC_DIR="gcc-${GCC_VERSION}"
|
GCC_DIR="gcc-${GCC_VERSION}"
|
||||||
BINUTILS_DIR="binutils-${BINUTILS_VERSION}"
|
BINUTILS_DIR="binutils-${BINUTILS_VERSION}"
|
||||||
GDB_DIR="gdb-${GDB_VERSION}"
|
GDB_DIR="gdb-${GDB_VERSION}"
|
||||||
|
@ -675,17 +672,6 @@ build_MPC() {
|
||||||
normalize_dirs
|
normalize_dirs
|
||||||
}
|
}
|
||||||
|
|
||||||
build_LIBELF() {
|
|
||||||
CC="$(hostcc host)" CXX="$(hostcxx host)" \
|
|
||||||
CFLAGS="$HOSTCFLAGS" libelf_cv_elf_h_works=no \
|
|
||||||
../${LIBELF_DIR}/configure --disable-shared --disable-nls --prefix=$TARGETDIR \
|
|
||||||
--infodir=$TARGETDIR/info CFLAGS="$HOSTCFLAGS" || touch .failed
|
|
||||||
$MAKE $JOBS || touch .failed
|
|
||||||
$MAKE install prefix=$DESTDIR$TARGETDIR || touch .failed
|
|
||||||
|
|
||||||
normalize_dirs
|
|
||||||
}
|
|
||||||
|
|
||||||
build_BINUTILS() {
|
build_BINUTILS() {
|
||||||
if [ $TARGETARCH = "x86_64-elf" ]; then
|
if [ $TARGETARCH = "x86_64-elf" ]; then
|
||||||
ADDITIONALTARGET=",i386-elf"
|
ADDITIONALTARGET=",i386-elf"
|
||||||
|
@ -720,7 +706,7 @@ bootstrap_GCC() {
|
||||||
--disable-libsanitizer \
|
--disable-libsanitizer \
|
||||||
${GCC_OPTIONS} --enable-languages="${LANGUAGES}" \
|
${GCC_OPTIONS} --enable-languages="${LANGUAGES}" \
|
||||||
--with-gmp=$DESTDIR$TARGETDIR --with-mpfr=$DESTDIR$TARGETDIR \
|
--with-gmp=$DESTDIR$TARGETDIR --with-mpfr=$DESTDIR$TARGETDIR \
|
||||||
--with-mpc=$DESTDIR$TARGETDIR --with-libelf=$DESTDIR$TARGETDIR \
|
--with-mpc=$DESTDIR$TARGETDIR \
|
||||||
--with-pkgversion="coreboot bootstrap v$CROSSGCC_VERSION $CROSSGCC_DATE" \
|
--with-pkgversion="coreboot bootstrap v$CROSSGCC_VERSION $CROSSGCC_DATE" \
|
||||||
&& \
|
&& \
|
||||||
$MAKE $JOBS BOOT_CFLAGS="$HOSTCFLAGS" BUILD_CONFIG="" bootstrap && \
|
$MAKE $JOBS BOOT_CFLAGS="$HOSTCFLAGS" BUILD_CONFIG="" bootstrap && \
|
||||||
|
@ -763,7 +749,7 @@ build_cross_GCC() {
|
||||||
${GCC_OPTIONS} --enable-languages="${LANGUAGES}" \
|
${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-libelf=$DESTDIR$TARGETDIR \
|
--with-mpc=$DESTDIR$TARGETDIR \
|
||||||
--with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \
|
--with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \
|
||||||
|| touch .failed
|
|| touch .failed
|
||||||
$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-gcc || touch .failed
|
$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-gcc || touch .failed
|
||||||
|
@ -887,7 +873,6 @@ print_supported() {
|
||||||
GDB|gdb) printf "%s\n" "$GDB_VERSION";;
|
GDB|gdb) printf "%s\n" "$GDB_VERSION";;
|
||||||
GMP|gmp) printf "%s\n" "$GMP_VERSION";;
|
GMP|gmp) printf "%s\n" "$GMP_VERSION";;
|
||||||
IASL|iasl) printf "%s\n" "$IASL_VERSION";;
|
IASL|iasl) printf "%s\n" "$IASL_VERSION";;
|
||||||
LIBELF|libelf) printf "%s\n" "$LIBELF_VERSION";;
|
|
||||||
MPC|mpc) printf "%s\n" "$MPC_VERSION";;
|
MPC|mpc) printf "%s\n" "$MPC_VERSION";;
|
||||||
MPFR|mpfr) printf "%s\n" "$MPFR_VERSION";;
|
MPFR|mpfr) printf "%s\n" "$MPFR_VERSION";;
|
||||||
PYTHON|python) printf "%s\n" "$PYTHON_VERSION";;
|
PYTHON|python) printf "%s\n" "$PYTHON_VERSION";;
|
||||||
|
@ -983,7 +968,7 @@ case "$PACKAGE" in
|
||||||
GCC|gcc)
|
GCC|gcc)
|
||||||
echo "Target architecture is $TARGETARCH"
|
echo "Target architecture is $TARGETARCH"
|
||||||
NAME="${TARGETARCH} cross GCC"
|
NAME="${TARGETARCH} cross GCC"
|
||||||
PACKAGES="GMP MPFR MPC LIBELF BINUTILS GCC"
|
PACKAGES="GMP MPFR MPC BINUTILS GCC"
|
||||||
;;
|
;;
|
||||||
GDB|gdb)
|
GDB|gdb)
|
||||||
NAME="${TARGETARCH} cross GDB"
|
NAME="${TARGETARCH} cross GDB"
|
||||||
|
@ -1222,7 +1207,7 @@ printf "Unpacked and patched ... ${green}ok${NC}\n"
|
||||||
|
|
||||||
if [ -n "$BOOTSTRAPONLY" ]; then
|
if [ -n "$BOOTSTRAPONLY" ]; then
|
||||||
printf "Building bootstrap compiler only ... \n"
|
printf "Building bootstrap compiler only ... \n"
|
||||||
for pkg in GMP MPFR MPC LIBELF GCC; do
|
for pkg in GMP MPFR MPC GCC; do
|
||||||
build_for_host $pkg
|
build_for_host $pkg
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
aff6feac0ff69eb7b240babdf2918f640eadb032 tarballs/elfutils-0.170.tar.bz2
|
|
Loading…
Reference in New Issue