From b2f82b00d74cef51daf5db98d0c5d05ec63bff9b Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Fri, 10 Jan 2025 18:42:24 -0600 Subject: [PATCH] Minor djgpp fixes. --- toolchains.sh | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/toolchains.sh b/toolchains.sh index e06ab2f..6f01ea0 100755 --- a/toolchains.sh +++ b/toolchains.sh @@ -121,7 +121,7 @@ function build_pi_sysroot() { local IMAGE= local START= local SYSROOT=../x-tools/sysroot-pi${BITS} - + mkdir -p work pushd work if [[ ! -f sysroot-relativelinks.py ]]; then @@ -268,6 +268,23 @@ function use_toolchain() { case "${PLAT}" in + dos) + case "${ARCH}" in + x86) + TRIPLE="i586-pc-msdosdjgpp" + ;; + esac + echo "source ${TC_G_SCRIPT_DIR}/x-tools/djgpp/setenv" + #echo "export PATH=\"${TC_G_SCRIPT_DIR}/x-tools/djgpp/i586-pc-msdosdjgpp/bin:${TC_G_SCRIPT_DIR}/x-tools/djgpp/bin:${TC_G_SCRIPT_DIR}/x-tools/djgpp/libexec/gcc/i586-pc-msdosdjgpp/12.2.0:${PATH}\"" + #echo "export GCC_EXE_PREFIX=\"${TC_G_SCRIPT_DIR}/x-tools/djgpp/lib/gcc\"" + #echo "export DJDIR=\"${TC_G_SCRIPT_DIR}/x-tools/djgpp/i586-pc-msdosdjgpp\"" + CROSS_OS="dos" + CC="gcc" + CXX="g++" + RANLIB="ranlib" + SUFFIX=".exe" + ;; + linux) case "${ARCH}" in x86) @@ -388,7 +405,7 @@ if [[ "${MODE}" == "install" ]]; then if [[ "${PLAT}" == "pi" ]]; then sudo apt-get -y install qemu-user-static fi - + # Install all toolchains. if [[ "${ARCH}" == "all" && "${PLAT}" == "all" ]]; then HELP=0 @@ -452,22 +469,22 @@ if [[ ${HELP} -eq 1 ]]; then For "install" mode: - If [architecture] and [platform] are both "all", - everything will be installed. + If [architecture] and [platform] are both "all", + everything will be installed. - if [architecture] is "all", then all available - architectures for the specified [platform] will - be installed. + if [architecture] is "all", then all available + architectures for the specified [platform] will + be installed. - NOTE: You should always install x86_64 linux - before attempting to install other - toolchains. + NOTE: You should always install x86_64 linux + before attempting to install other + toolchains. For "use" mode: - Souce the output of this script to set the environment - to use the appropriate toolchain for [architecture] and - [platform]. + Souce the output of this script to set the environment + to use the appropriate toolchain for [architecture] and + [platform]. HELP fi