mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Merge remote-tracking branch 'ms/fake-uname'
Conflicts: lfs/fake-environ
This commit is contained in:
@@ -52,7 +52,7 @@ $(TARGET) :
|
||||
cp -rvf $(DIR_SRC)/src/$(THISAPP) $(DIR_APP)
|
||||
|
||||
cd $(DIR_APP) && make install CFLAGS="$(CFLAGS)" \
|
||||
TOOLS_DIR="$(TOOLS_DIR)"
|
||||
TOOLS_DIR="/tools"
|
||||
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
|
||||
25
make.sh
25
make.sh
@@ -229,9 +229,28 @@ prepareenv() {
|
||||
}
|
||||
|
||||
buildtoolchain() {
|
||||
if [ "$(uname -m)" = "x86_64" ]; then
|
||||
exiterror "Cannot build toolchain on x86_64. Please use the download."
|
||||
fi
|
||||
local error=false
|
||||
case "${MACHINE}:$(uname -m)" in
|
||||
# x86
|
||||
i586:i586|i586:i686)
|
||||
# These are working.
|
||||
;;
|
||||
i586:*)
|
||||
error=true
|
||||
;;
|
||||
|
||||
# ARM
|
||||
armv5tel:armv5tel|armv5tel:armv5tejl)
|
||||
# These are working.
|
||||
;;
|
||||
armv5tel:*)
|
||||
error=true
|
||||
;;
|
||||
esac
|
||||
|
||||
${error} && \
|
||||
exiterror "Cannot build ${MACHINE} toolchain on $(uname -m). Please use the download if any."
|
||||
|
||||
if [ "$(uname -r | grep ipfire)" ]; then
|
||||
exiterror "Cannot build toolchain on ipfire. Please use the download."
|
||||
fi
|
||||
|
||||
@@ -225,17 +225,17 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
|
||||
CXXFLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
|
||||
C2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
|
||||
CXX2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
|
||||
elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE ]; then
|
||||
elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE -o 'armv7l' = $MACHINE ]; then
|
||||
echo "`date -u '+%b %e %T'`: Machine is ARM (or equivalent)" >> $LOGFILE
|
||||
MACHINE=armv5tel
|
||||
MACHINE_TYPE=arm
|
||||
BUILDTARGET=${MACHINE}-unknown-linux-gnueabi
|
||||
CFLAGS="-O2 -march=armv5te -fomit-frame-pointer -pipe"
|
||||
CFLAGS="-O2 -march=armv5te -mfloat-abi=soft -fomit-frame-pointer -pipe"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
C2FLAGS="$CFLAGS"
|
||||
CXX2FLAGS="$CXXFLAGS"
|
||||
else
|
||||
echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
|
||||
echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user