{ "bootstrap": { "type": "export" , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"] , "target": "bootstrap-ar" } , "toolchain": { "type": "export" , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"] , "target": "binutils" } , "files": {"type": "install", "deps": [["TREE", null, "."]]} , "bootstrap-ar": { "type": ["@", "rules", "CC/foreign/shell", "data"] , "project": ["files"] , "localbase": [["@", "busybox", "", "bootstrap"], ["@", "make", "", "bootstrap"]] , "cmds": [ "export LD=${CC}" , "export AR=true" , "export RANLIB=true" , "export MAKE=${LOCALBASE}/bin/make" , "export PATH=${LOCALBASE}/bin:$PATH" , "unset LDFLAGS" , "export SHELL=${LOCALBASE}/bin/sh" , "export CONFIG_SHELL=${LOCALBASE}/bin/sh" , "mv install-sh install-sh.orig" , "echo '#!'\"${SHELL}\" > install-sh" , "cat install-sh.orig >> install-sh" , "chmod 755 install-sh" , "sh ./configure --prefix=/ --disable-nls --enable-shared=no --enable-plugins=no --enable-gprofng=no --disable-werror --enable-deterministic-archives --without-zstd >configure.log 2>&1 || (cat configure.log && exit 1)" , "${MAKE} MAKEINFO=true all-binutils >build.log 2>&1 || true" , "cd binutils" , "AR_SRCS='ar.c arparse.c arlex.c arsup.c not-ranlib.c rename.c binemul.c emul_vanilla.c bucomm.c version.c filemode.c'" , "AR_DEPS=\"$(ls ../bfd/*.o ../libiberty/*.o ../zlib/*.o ../libsframe/*.o | LC_ALL=C sort)\"" , "AR_CFLAGS=\"${CFLAGS} -DDEFAULT_AR_DETERMINISTIC=1 -Dbin_dummy_emulation=bin_vanilla_emulation -I../include -I../bfd\"" , "${CC} ${AR_CFLAGS} -o ${DESTDIR}/bin/ar ${AR_SRCS} ${AR_DEPS} >../build.log 2>&1 || (cat ../configure.log ../build.log && exit 1)" ] , "outs": ["bin/ar"] } , "binutils": { "type": ["@", "rules", "CC/foreign/shell", "data"] , "project": ["files"] , "localbase": [ ["@", "busybox", "", "bootstrap"] , ["@", "make", "", "bootstrap"] , "bootstrap" ] , "cmds": [ "export LD=${CC}" , "export RANLIB=true" , "export AR=${LOCALBASE}/bin/ar" , "export MAKE=${LOCALBASE}/bin/make" , "export PATH=${LOCALBASE}/bin:$PATH" , "export SHELL=${LOCALBASE}/bin/sh" , "export CONFIG_SHELL=${LOCALBASE}/bin/sh" , "mv install-sh install-sh.orig" , "echo '#!'\"${SHELL}\" > install-sh" , "cat install-sh.orig >> install-sh" , "chmod 755 install-sh" , "unset LDFLAGS" , "if [ -f /lib/ld-musl-$(uname -m).so.1 ]; then" , " ln -s /lib/ld-musl-$(uname -m).so.1 ${TMPDIR}/ldd" , " export PATH=$PATH:${TMPDIR}" , "fi" , "export CXX=no" , "mkdir build" , "cd build" , "sh ../configure --prefix=/ --disable-nls --enable-gprofng=no --disable-werror --enable-deterministic-archives >configure.log 2>&1 || (cat configure.log && exit 1)" , "${MAKE} -j1 MAKEINFO=true >build.log 2>&1 || (cat configure.log build.log && exit 1)" , "${MAKE} -j1 MAKEINFO=true DESTDIR=${DESTDIR} install-strip >>build.log 2>&1 || (cat configure.log build.log && exit 1)" , "for f in $(find ${DESTDIR} -type f -name '*.la'); do sed -i 's|'$(pwd)'|/build|g' $f; done" ] , "out_dirs": ["."] } }