From ef7bfdb233b5b9db81a740687f0698ee51589c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Jeli=C5=84ski?= Date: Thu, 21 Oct 2021 13:55:46 +0200 Subject: [PATCH 1/2] gcc/newlib: Drop gcc-nostdc dependency Only "new" files from PREFIX are packaged so after using gcc-nostdc as a host package some of the crucial files were ignored. This was the root cause behind the necessity to install gcc-newlib with gcc-nostdc. The `${TOOLCHAIN_ARCH}-unknown-elf-gcc` and `${TOOLCHAIN_ARCH}-elf-gcc` aren't found so these must've been previously installed with gcc-nostdc. --- gcc/newlib/build.sh | 2 -- gcc/newlib/meta.yaml | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gcc/newlib/build.sh b/gcc/newlib/build.sh index 8a047fc..9f1c7ad 100644 --- a/gcc/newlib/build.sh +++ b/gcc/newlib/build.sh @@ -169,8 +169,6 @@ ls -l $PREFIX/bin/$TARGET-newlib-* cd .. -$PREFIX/bin/$TARGET-gcc --version -$PREFIX/bin/${TOOLCHAIN_ARCH}-unknown-elf-gcc --version $PREFIX/bin/$TARGET-newlib-gcc --version echo $($PREFIX/bin/$TARGET-newlib-gcc --version 2>&1 | head -1 | sed -e"s/$TARGET-gcc (GCC) //") diff --git a/gcc/newlib/meta.yaml b/gcc/newlib/meta.yaml index 7e8ea89..fbe5f97 100644 --- a/gcc/newlib/meta.yaml +++ b/gcc/newlib/meta.yaml @@ -30,6 +30,9 @@ requirements: - {{ compiler('c') }} - {{ compiler('cxx') }} - make + # Arch specific + - binutils-{{ environ.get('TOOLCHAIN_ARCH') }}-elf + - gcc-{{ environ.get('TOOLCHAIN_ARCH') }}-elf-nostdc {{ version }}.* host: # These are taken from the output of the configure scripts - gmp >=4.3.2 @@ -37,12 +40,8 @@ requirements: - mpc >=0.8.1 - isl >=0.15.0 - cloog - # Arch specific - - binutils-{{ environ.get('TOOLCHAIN_ARCH') }}-elf - - gcc-{{ environ.get('TOOLCHAIN_ARCH') }}-elf-nostdc {{ version }}.* run: - binutils-{{ environ.get('TOOLCHAIN_ARCH') }}-elf - - gcc-{{ environ.get('TOOLCHAIN_ARCH') }}-elf-nostdc {{ version }}.* about: home: https://gcc.gnu.org/ From 1d3c455cffe4387a2846bdae488795da9285a851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Jeli=C5=84ski?= Date: Thu, 21 Oct 2021 15:11:50 +0200 Subject: [PATCH 2/2] gcc/newlib: Mainly use `$TOOLCHAIN_ARCH-elf-` prefix The `-elf-newlib-` prefixed executables are still available. `newlib-` links for executables were created even before and this logic remains untouched. --- gcc/newlib/build.sh | 3 ++- gcc/newlib/run_test.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/newlib/build.sh b/gcc/newlib/build.sh index 9f1c7ad..556ae3d 100644 --- a/gcc/newlib/build.sh +++ b/gcc/newlib/build.sh @@ -125,7 +125,7 @@ cd build-gcc $SRC_DIR/gcc/configure \ \ --prefix=$PREFIX \ - --program-prefix=$TARGET-newlib- \ + --program-prefix=$TARGET- \ \ --with-gmp=$CONDA_PREFIX \ --with-mpfr=$CONDA_PREFIX \ @@ -169,6 +169,7 @@ ls -l $PREFIX/bin/$TARGET-newlib-* cd .. +$PREFIX/bin/$TARGET-gcc --version $PREFIX/bin/$TARGET-newlib-gcc --version echo $($PREFIX/bin/$TARGET-newlib-gcc --version 2>&1 | head -1 | sed -e"s/$TARGET-gcc (GCC) //") diff --git a/gcc/newlib/run_test.sh b/gcc/newlib/run_test.sh index 564ae55..f9420ea 100644 --- a/gcc/newlib/run_test.sh +++ b/gcc/newlib/run_test.sh @@ -6,8 +6,8 @@ set +x set +e TARGET=${TOOLCHAIN_ARCH}-elf -GCC=$TARGET-newlib-gcc -GXX=$TARGET-newlib-g++ +GCC=$TARGET-gcc +GXX=$TARGET-g++ OBJDUMP=$TARGET-objdump case "${TOOLCHAIN_ARCH}" in