@@ -420,7 +420,7 @@ function gcc_script(gcc_version::VersionNumber, compiler_target::Platform)
420420 # Install CSU
421421 make csu/subdir_lib -j${nproc}
422422 mkdir -p ${sysroot}/usr/${LIB64}
423- install csu/crt1.o csu/crti.o csu/crtn.o ${sysroot}/usr/${LIB64}
423+ install -v csu/crt1.o csu/crti.o csu/crtn.o ${sysroot}/usr/${LIB64}
424424 ${COMPILER_TARGET}-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o ${sysroot}/usr/${LIB64}/libc.so
425425
426426 elif [[ ${COMPILER_TARGET} == *-musl* ]]; then
@@ -444,7 +444,7 @@ function gcc_script(gcc_version::VersionNumber, compiler_target::Platform)
444444 # Make CRT
445445 make lib/{crt1,crti,crtn}.o
446446 mkdir -p ${sysroot}/usr/lib
447- install lib/crt1.o lib/crti.o lib/crtn.o ${sysroot}/usr/lib
447+ install -v lib/crt1.o lib/crti.o lib/crtn.o ${sysroot}/usr/lib
448448 ${COMPILER_TARGET}-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o ${sysroot}/usr/lib/libc.so
449449
450450 elif [[ ${COMPILER_TARGET} == *-mingw* ]]; then
@@ -631,6 +631,12 @@ function gcc_script(gcc_version::VersionNumber, compiler_target::Platform)
631631
632632 # Remove heavy doc directories
633633 rm -rf ${sysroot}/usr/share/man
634+
635+ # Remove leftover dummy `libc.so` file:
636+ # <https://github.com/JuliaPackaging/BinaryBuilderBase.jl/pull/403#issuecomment-2585717031>.
637+ if [[ "${target}" == riscv64-linux-gnu ]]; then
638+ rm -v ${sysroot}/usr/${LIB64}/libc.so
639+ fi
634640 """
635641
636642 return script
0 commit comments