# This is a list of other components need to build this component depends="gmp mpfr mpc linux binutils" # This is a file that gets installed that is used to determine if the toolchain # component is already installed. installs="gcc" # The current branch of the existing GCC release. latest="gcc.git~linaro/gcc-5-branch" # If yes, only static linking will be used static_link="no" # This is a list of default flags always supplied to configure default_configure_flags="--with-bugurl=https://bugs.linaro.org --with-mpc=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host} --with-gmp=${local_builds}/destdir/${host} --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap${override_arch:+ --with-arch=${override_arch}}${override_cpu:+ --with-cpu=${override_cpu}}${override_tune:+ --with-tune=${override_tune}}" # --with-pkgversion=${USER} # --with-as=${local_builds}/bin/${target}-as --with-ld=${local_builds}/bin/${target}-ld # Disable the Graphite loop optimizer as it's being depreciated default_configure_flags="${default_configure_flags} --with-cloog=no --with-ppl=no --with-isl=no" # nls is used for DNS default_configure_flags="${default_configure_flags} --disable-nls" # C99 is the latest standard, and has improved numerics support, so we want it # http://en.wikipedia.org/wiki/C99 default_configure_flags="${default_configure_flags} --enable-c99" # libssp does stack protection #default_configure_flags="${default_configure_flags} --enable-libssp" # Used by fortran # http://gcc.gnu.org/onlinedocs/libquadmath/ # default_configure_flags="${default_configure_flags} --disable-libquadmath" # Transactional Memory, used for threading # http://gcc.gnu.org/wiki/TransactionalMemory #default_configure_flags="${default_configure_flags} --disable-libitm" # Libatomic is a synchronization library # http://www.hpl.hp.com/research/linux/atomic_ops/ #default_configure_flags="${default_configure_flags} --disable-libatomic" if test `echo ${target} | grep -c aarch64` -eq 1 -a `echo ${gcc_version} | grep -c gcc-linaro-4\.7` -eq 1; then error "GCC 4.7 does not support aarch64!" exit 1 fi aarch64_errata="--enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419" # Default set of languages to build. If building binary tarballs, we don't build all the # front ends. if test x"${tarbin}" != xyes; then languages="c,c++,fortran,lto" else languages="c,c++,fortran,lto" fi default_makeflags="MAKEINFOFLAGS=--force" # For a cross build, we need the target as part of the name for to find the correct. # assembler and linker. We also disable bootstrapping for cross builds if test x"${build}" != x"${target}"; then # stage1_flags are used to build the initial C compiler, which is used to compile # the C library. We disable most everything, as the second GCC build will be # able to use the C library built with the first GCC build. stage1_flags="--disable-libssp --disable-libquadmath --disable-threads --without-headers --with-newlib --disable-libmudflap --disable-bootstrap --disable-decimal-float --disable-libgomp --disable-libatomic --disable-libsanitizer --disable-plugins --disable-libitm MAKEINFO=echo --enable-languages=c --with-sysroot=${local_builds}/sysroot-${target} --disable-shared --with-glibc-version=2.18" # Add platform specific flags case ${target} in armv8l-*linux-gnueabihf) if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv8-a" fi default_configure_flags="${default_configure_flags} --with-fpu=neon-fp-armv8 --with-float=hard --with-mode=thumb --disable-multilib --enable-multiarch" ;; arm-*linux-gnueabi) if test x"${override_cpu}" = x -a x"${override_tune}" = x; then default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" fi if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv7-a" fi default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --disable-multilib --enable-multiarch" ;; arm-*linux-gnueabihf) if test x"${override_cpu}" = x -a x"${override_tune}" = x; then default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" fi if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv7-a" fi default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-multilib --enable-multiarch" ;; armeb-*linux-gnueabi) if test x"${override_cpu}" = x -a x"${override_tune}" = x; then default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" fi if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv7-a" fi default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --disable-multilib --enable-multiarch" ;; armeb-*linux-gnueabihf) if test x"${override_cpu}" = x -a x"${override_tune}" = x; then default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" fi if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv7-a" fi default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-multilib --enable-multiarch" ;; # bare metal targets don't support threads. arm*-elf|arm*-eabi*) default_configure_flags="${default_configure_flags} --enable-threads=no --enable-multilib --disable-multiarch --with-multilib-list=aprofile" languages="c,c++,lto" ;; aarch64*-*elf) if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv8-a ${aarch64_errata} --disable-multiarch" fi # LDFLAGS_FOR_TARGET=-static # Gfortran doesn't cross configure, just native languages="c,c++,lto" ;; aarch64*-linux-gnu) if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv8-a ${aarch64_errata} --enable-multiarch" fi # LDFLAGS_FOR_TARGET=-static ;; *-mingw32) languages="c,c++" default_configure_flags="${default_configure_flags} --enable-languages=${languages} --disable-plugins" # Cygwin doesn't support GCC plugins # default_configure_flags="`echo ${default_configure_flags} | sed -e 's:--enable-plugins::'`" ;; *) default_configure_flags="${default_configure_flags}" ;; esac case ${clibrary} in eglibc) if test "`echo ${eglibc_version} | grep -c '/'`" -gt 0; then libc_version="`echo ${eglibc_version} | cut -d '/' -f 2`" else libc_version="${eglibc_version}" fi ;; glibc) libc_version="${glibc_version}" ;; newlib) # bare metal targets don't support threads. default_configure_flags="${default_configure_flags} --disable-threads --with-newlib" libc_version="${newlib_version}" ;; *) fixme "\${clibrary} not specified by the time libc_version is being set." ;; esac # bootstrapping is handled by Jenkins now. if test x"${with_languages}" != x"default"; then languages="${with_languages}" fi # The sysroot path depends on the C library version. if test x"${tarbin}" = xyes; then # local sysroot="/opt/linaro/sysroot-${libc_version}-${target}/libc" local sysroot="${local_builds}/destdir/${host}/${target}/libc" # local sysroot="../${target}/libc" else local sysroot="${local_builds}/sysroot-${target}" fi stage2_flags="--with-build-sysroot=${sysroots} --enable-lto --enable-linker-build-id --enable-long-long --enable-shared --with-sysroot=${sysroot} --enable-languages=${languages}" if test x"${release}" = x; then stage2_flags="${stage2_flags} --enable-checking=yes" else stage2_flags="${stage2_flags} --enable-checking=release" fi if test x"${bootstrap}" = x"yes"; then stage2_flags="${stage2_flags} --enable-bootstrap" else stage2_flags="${stage2_flags} --disable-bootstrap" fi # native builds are easy, so build almost everything else if test x"${with_languages}" != x"default"; then languages="${with_languages}" else languages="c,c++,go,objc,fortran" fi default_configure_flags="${default_configure_flags} --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --enable-languages=${languages}" # Native compilers are bootstrapped by default, but sometimes the extra time isn't # desired. if test x"${bootstrap}" = x"yes"; then default_configure_flags="${default_configure_flags} --enable-bootstrap" else default_configure_flags="${default_configure_flags} --disable-bootstrap" fi case ${target} in arm*-linux-gnueabi) if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv7-a" fi default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb " ;; arm*-linux-gnueabihf) if test x"${override_arch}" = x -a x"${override_cpu}" = x; then default_configure_flags="${default_configure_flags} --with-arch=armv7-a" fi default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" ;; arm*-eabi | aarch64*-*elf) #default_configure_flags="${default_configure_flags}" ;; aarch64*-linux-gnu) default_configure_flags="${default_configure_flags} ${aarch64_errata}" ;; x86-pc-linux-gnu) default_configure_flags="${default_configure_flags} --enable-linker-build-id --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions" ;; x86_64*-linux-gnu) # default_configure_flags="${default_configure_flags}" ;; *) ;; esac stage2_flags="" fi # This is a list of default flags always supplied to "make check". runtest_flags=""