Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work on FreeBSD too #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build-binutils.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

###################################################################
#Script Name : build-binutils
Expand Down Expand Up @@ -65,9 +65,9 @@ fi


# build and install binutils
make -j${NUM_PROC} 2<&1 | tee build.log
${MAKE} -j${NUM_PROC} 2<&1 | tee build.log

# Install binutils
if [ $? -eq 0 ]; then
make install -j${NUM_PROC}
${MAKE} install -j${NUM_PROC}
fi
10 changes: 5 additions & 5 deletions build-gcc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

###################################################################
#Script Name : build-gcc
Expand Down Expand Up @@ -83,13 +83,13 @@ cd ${BUILD_DIR}/${DIR}


# build and install gcc
make -j${NUM_PROC} 2<&1 | tee build.log
${MAKE} -j${NUM_PROC} 2<&1 | tee build.log

# Install
if [ $? -eq 0 ]; then
make install
make -j${NUM_PROC} all-target-libgcc
make install-target-libgcc
${MAKE} install
${MAKE} -j${NUM_PROC} all-target-libgcc
${MAKE} install-target-libgcc
fi


8 changes: 4 additions & 4 deletions build-newlib.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

###################################################################
#Script Name : build-newlib
Expand Down Expand Up @@ -66,9 +66,9 @@ cd ${BUILD_DIR}/${DIR}
--disable-newlib-supplied-syscalls \

# Build and install newlib
make -j${NUM_PROC} 2<&1 | tee build.log
${MAKE} -j${NUM_PROC} 2<&1 | tee build.log

# Install newlib
if [ $? -eq 0 ]; then
make install
fi
${MAKE} install
fi
12 changes: 9 additions & 3 deletions build-toolchain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

###################################################################
#Script Name : build-toolchain
Expand Down Expand Up @@ -40,11 +40,17 @@ for arg do
done

# Export
if [ "$(uname)" = 'FreeBSD' ]; then
export MAKE="gmake"
export NUM_PROC=$(sysctl -n hw.ncpu)
else
export MAKE="make"
export NUM_PROC=$(nproc)
fi
export ARCH=$(uname -m)
export TARGET="m68k-elf"
export BUILD_MACH="${ARCH}-pc-linux-gnu"
export HOST_MACH="${ARCH}-pc-linux-gnu"
export NUM_PROC=$(nproc)
export PROGRAM_PREFIX=${PREFIX}
export INSTALL_DIR="${PWD}/m68k-toolchain"
export DOWNLOAD_DIR="${PWD}/download"
Expand Down Expand Up @@ -97,4 +103,4 @@ if [ ${BUILD_NEWLIB} == "yes" ]; then
fi
fi

echo "m68k toolchain build was terminated"
echo "m68k toolchain build was terminated"