From 24c1065ab7e3437d93cde6936b13781f5e20a44f Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 10 Mar 2024 21:14:12 +0100 Subject: [PATCH] Fix buildtool.sh and introduce $BUILDTOOL_DEBUG --- buildtool.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/buildtool.sh b/buildtool.sh index 4ee5112..bf9168d 100755 --- a/buildtool.sh +++ b/buildtool.sh @@ -14,7 +14,7 @@ echo "" export "BUILDTOOL_REPOSITORY=https://git.staropensource.de/JeremyStarTM/kernel-optimized.git" export "BUILDTOOL_PACKAGES=base-devel git rustup" export "BUILDTOOL_CLONEDIR=jstm-kernel-optimized" -export "BUILDTOOL_BUILDCMDLINE=nice -20 env MAKEFLAGS=\"-j$(nproc)\"" +export "BUILDTOOL_BUILDCMDLINE=nice -20 env MAKEFLAGS=-j$(nproc)" # Checks ## Check for Arch Linux @@ -52,7 +52,7 @@ function ask_mold() { case "${BUILDTOOL_MOLD}" in "y"|"Y"|"") export "BUILDTOOL_PACKAGES=${BUILDTOOL_PACKAGES} mold" - export "BUILDTOOL_BUILDCMDLINE=${BUILDTOOL_BUILDCMDLINE} LDFLAGS=\"-fuse-ld=mold\" RUSTFLAGS=\"-C link-arg=-fuse-ld=mold\"" + export "BUILDTOOL_BUILDCMDLINE=${BUILDTOOL_BUILDCMDLINE} LDFLAGS=-fuse-ld=mold RUSTFLAGS=\"-C link-arg=-fuse-ld=mold\"" ;; "n"|"N") ;; *) @@ -283,6 +283,15 @@ echo ":: Cloning repository" git clone "${BUILDTOOL_REPOSITORY}" "${BUILDTOOL_CLONEDIR}" cd "${BUILDTOOL_CLONEDIR}" +# Print debug information +if [ "${BUILDTOOL_DEBUG}" == "true" ]; then + echo ":: Printing debug information" + echo "++ env ++" + env|grep "BUILDTOOL_"|sort + echo "++ env ++" + echo "build cmdline: ${BUILDTOOL_BUILDCMDLINE} "${BUILDTOOL_PKGBUILD_XCONFIG}" "${BUILDTOOL_PKGBUILD_NCONFIG}" "${BUILDTOOL_PKGBUILD_CPFINALCONFIG}" "${BUILDTOOL_PKGBUILD_MODPROBEDDB}" "${BUILDTOOL_PKGBUILD_SUBARCHITECTURE}" "${BUILDTOOL_PKGBUILD_DEBUG}" makepkg --syncdeps -p PKGBUILD.buildtool" +fi + # Build kernel echo ":: Building kernel" -${BUILDTOOL_BUILDCMDLINE} "${BUILDTOOL_PKGBUILD_XCONFIG}" "${BUILDTOOL_PKGBUILD_NCONFIG}" "${BUILDTOOL_PKGBUILD_CPFINALCONFIG}" "${BUILDTOOL_PKGBUILD_MODPROBEDDB}" "${BUILDTOOL_PKGBUILD_SUBARCHITECTURE}" "${BUILDTOOL_PKGBUILD_DEBUG}" makepkg --syncdeps -p PKGBUILD.buildtool \ No newline at end of file +${BUILDTOOL_BUILDCMDLINE} "${BUILDTOOL_PKGBUILD_XCONFIG}" "${BUILDTOOL_PKGBUILD_NCONFIG}" "${BUILDTOOL_PKGBUILD_CPFINALCONFIG}" "${BUILDTOOL_PKGBUILD_MODPROBEDDB}" "${BUILDTOOL_PKGBUILD_SUBARCHITECTURE}" "${BUILDTOOL_PKGBUILD_DEBUG}" makepkg --syncdeps -p PKGBUILD.buildtool