shithub: newlib

ref: 536cef2b2ad9ba00df99f38b8eee764297562799
dir: /recipes/libgcc/

View raw version
name=libgcc
revision=1
hostdeps="gcc autoconf-2.69 automake-1.15.1"
imagedeps="gcc"
deps="newlib"

build() {
    cd "${base_dir}"/host-builds/gcc/build

    make -j${parallelism} all-target-libgcc
}

package() {
    cd "${base_dir}"/host-builds/gcc/build

    rm -rf tmp_libgcc_dir
    mkdir tmp_libgcc_dir

    DESTDIR="$(realpath tmp_libgcc_dir)" make install-target-libgcc

    mkdir -p "${dest_dir}${prefix}"

    cp -r tmp_libgcc_dir/usr/local/lib "${dest_dir}${prefix}"/

    # Copy libgcc into GCC's tree else it will complain.
    mkdir -p "${base_dir}"/host-pkgs/gcc/usr/local/lib
    cp -r tmp_libgcc_dir/usr/local/lib/* "${base_dir}"/host-pkgs/gcc/usr/local/lib/
}