# Template file for 'cross-${_triplet}-gcc' _triplet=arm-none-eabi _pkgname=gcc pkgname=cross-${_triplet}-gcc version=9.3.0 revision=1 wrksrc="gcc-${version}" build_wrksrc=build build_style=gnu-configure make_build_args="INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0'" hostmakedepends="autoconf automake cross-arm-none-eabi-binutils bison flex perl tar texinfo" makedepends="gmp-devel isl15-devel libmpc-devel mpfr-devel zlib-devel" depends="cross-arm-none-eabi-binutils" short_desc="GNU Compiler Collection" maintainer="Ivan Sokolov " license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later" homepage="https://gcc.gnu.org" distfiles="${GNU_SITE}/gcc/gcc-${version}/gcc-${version}.tar.xz" checksum=71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1 alternatives="arm-none-eabi:/usr/bin/arm-none-eabi-cc:/usr/bin/arm-none-eabi-gcc" nocross=yes nopie=yes nostrip_files="libgcc.a libgcov.a" post_extract() { mkdir -p build } pre_configure() { export CFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections" export CXXFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections" } do_configure() { ../configure \ --disable-decimal-float \ --disable-libffi \ --disable-libgomp \ --disable-libmudflap \ --disable-libquadmath \ --disable-libssp \ --disable-libstdcxx-pch \ --disable-libstdc__-v3 \ --disable-nls \ --disable-shared \ --disable-threads \ --disable-tls \ --disable-werror \ --enable-__cxa_atexit \ --enable-c99 \ --enable-gnu-indirect-function \ --enable-interwork \ --enable-languages=c,c++ \ --enable-long-long \ --enable-multilib \ --enable-plugins \ --host=${XBPS_CROSS_TRIPLET} \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --prefix=/usr \ --target=${_triplet} \ --with-gmp \ --with-gnu-as \ --with-gnu-ld \ --with-headers=/usr/${_triplet}/include \ --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ --with-isl \ --with-libelf \ --with-mpc \ --with-mpfr \ --with-multilib-list=rmprofile \ --with-native-system-header-dir=/include \ --with-newlib \ --with-python-dir=share/gcc-${_triplet} \ --with-sysroot=/usr/${_triplet} \ --with-system-zlib } pre_build() { pre_configure } post_install() { rm -fr ${DESTDIR}/usr/share/{info,man/man7} rm -fr ${DESTDIR}/usr/lib/libcc1.* }