Merge pull request #9831 from dhewg/toolchain

fix usage of multiple toolchains
This commit is contained in:
Christian Hewitt 2025-03-06 08:47:30 +04:00 committed by GitHub
commit fc3028eaa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 40 additions and 27 deletions

View File

@ -12,8 +12,7 @@ PKG_DEPENDS_UNPACK+=" binutils"
PKG_PATCH_DIRS+=" $(get_pkg_directory binutils)/patches"
PKG_CONFIGURE_OPTS_HOST="--target=aarch64-none-elf \
--with-sysroot=${SYSROOT_PREFIX} \
--with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \
--with-sysroot=${TOOLCHAIN}/aarch64-none-elf/sysroot \
--without-ppl \
--enable-static \
--without-cloog \
@ -47,9 +46,5 @@ make_host() {
}
makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
make -C bfd install # fix parallel build with libctf requiring bfd
# override the makeinfo binary with true - this does not build the documentation
make MAKEINFO=true install
}

View File

@ -12,8 +12,7 @@ PKG_DEPENDS_UNPACK+=" binutils"
PKG_PATCH_DIRS+=" $(get_pkg_directory binutils)/patches"
PKG_CONFIGURE_OPTS_HOST="--target=arm-none-eabi \
--with-sysroot=${SYSROOT_PREFIX} \
--with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \
--with-sysroot=${TOOLCHAIN}/arm-none-eabi/sysroot \
--without-ppl \
--enable-static \
--without-cloog \
@ -47,9 +46,6 @@ make_host() {
}
makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
make -C bfd install # fix parallel build with libctf requiring bfd
# override the makeinfo binary with true - this does not build the documentation
make MAKEINFO=true install
}

View File

@ -12,8 +12,7 @@ PKG_DEPENDS_UNPACK+=" binutils"
PKG_PATCH_DIRS+=" $(get_pkg_directory binutils)/patches"
PKG_CONFIGURE_OPTS_HOST="--target=bpf \
--with-sysroot=${SYSROOT_PREFIX} \
--with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \
--with-sysroot=${TOOLCHAIN}/bpf/sysroot \
--without-ppl \
--enable-static \
--without-cloog \
@ -47,9 +46,6 @@ make_host() {
}
makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
make -C bfd install # fix parallel build with libctf requiring bfd
# override the makeinfo binary with true - this does not build the documentation
make MAKEINFO=true install
}

View File

@ -12,8 +12,7 @@ PKG_DEPENDS_UNPACK+=" binutils"
PKG_PATCH_DIRS+=" $(get_pkg_directory binutils)/patches"
PKG_CONFIGURE_OPTS_HOST="--target=or1k-none-elf \
--with-sysroot=${SYSROOT_PREFIX} \
--with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \
--with-sysroot=${TOOLCHAIN}/or1k-none-elf/sysroot \
--without-ppl \
--enable-static \
--without-cloog \
@ -47,8 +46,6 @@ make_host() {
}
makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C bfd install # fix parallel build with libctf requiring bfd
# override the makeinfo binary with true - this does not build the documentation
make MAKEINFO=true install
}

View File

@ -16,7 +16,7 @@ if [ "${MOLD_SUPPORT}" = "yes" ]; then
fi
PKG_CONFIGURE_OPTS_HOST="--target=aarch64-none-elf \
--with-sysroot=${SYSROOT_PREFIX} \
--with-sysroot=${TOOLCHAIN}/aarch64-none-elf/sysroot \
--with-gmp=${TOOLCHAIN} \
--with-mpfr=${TOOLCHAIN} \
--with-mpc=${TOOLCHAIN} \
@ -57,6 +57,13 @@ unpack() {
tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}
}
pre_configure_host() {
unset CPPFLAGS
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
}
post_makeinstall_host() {
PKG_GCC_PREFIX="${TOOLCHAIN}/bin/aarch64-none-elf-"
GCC_VERSION=$(${PKG_GCC_PREFIX}gcc -dumpversion)

View File

@ -16,7 +16,7 @@ if [ "${MOLD_SUPPORT}" = "yes" ]; then
fi
PKG_CONFIGURE_OPTS_HOST="--target=arm-none-eabi \
--with-sysroot=${SYSROOT_PREFIX} \
--with-sysroot=${TOOLCHAIN}/arm-none-eabi/sysroot \
--with-gmp=${TOOLCHAIN} \
--with-mpfr=${TOOLCHAIN} \
--with-mpc=${TOOLCHAIN} \
@ -56,6 +56,13 @@ unpack() {
tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}
}
pre_configure_host() {
unset CPPFLAGS
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
}
post_makeinstall_host() {
PKG_GCC_PREFIX="${TOOLCHAIN}/bin/arm-none-eabi-"
GCC_VERSION=$(${PKG_GCC_PREFIX}gcc -dumpversion)

View File

@ -16,7 +16,7 @@ if [ "${MOLD_SUPPORT}" = "yes" ]; then
fi
PKG_CONFIGURE_OPTS_HOST="--target=bpf \
--with-sysroot=${SYSROOT_PREFIX} \
--with-sysroot=${TOOLCHAIN}/bpf/sysroot \
--with-gmp=${TOOLCHAIN} \
--with-mpfr=${TOOLCHAIN} \
--with-mpc=${TOOLCHAIN} \
@ -56,3 +56,10 @@ unpack() {
mkdir -p ${PKG_BUILD}
tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}
}
pre_configure_host() {
unset CPPFLAGS
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
}

View File

@ -16,7 +16,7 @@ if [ "${MOLD_SUPPORT}" = "yes" ]; then
fi
PKG_CONFIGURE_OPTS_HOST="--target=or1k-none-elf \
--with-sysroot=${SYSROOT_PREFIX} \
--with-sysroot=${TOOLCHAIN}/or1k-none-elf/sysroot \
--with-gmp=${TOOLCHAIN} \
--with-mpfr=${TOOLCHAIN} \
--with-mpc=${TOOLCHAIN} \
@ -57,6 +57,13 @@ unpack() {
tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}
}
pre_configure_host() {
unset CPPFLAGS
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
}
post_makeinstall_host() {
PKG_GCC_PREFIX="${TOOLCHAIN}/bin/or1k-none-elf-"
GCC_VERSION=$(${PKG_GCC_PREFIX}gcc -dumpversion)

View File

@ -21,12 +21,13 @@ fi
make_target() {
# As of atf 2.11.0 - the supported compile for .S is gcc (not as.)
unset AS
unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP STRIP RANLIB
unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
if [ "${ATF_PLATFORM}" = "imx8mq" ]; then
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" CFLAGS="" make PLAT=${ATF_PLATFORM} LOG_LEVEL=0 bl31
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" make PLAT=${ATF_PLATFORM} LOG_LEVEL=0 bl31
else
# as of atf 2.12.0 - sun50i_a64 builds use LTO, include -ffat-lto-objects to support this
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" CFLAGS="-ffat-lto-objects" make PLAT=${ATF_PLATFORM} bl31
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" CFLAGS="-ffat-lto-objects" make PLAT=${ATF_PLATFORM} bl31
fi
}