mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +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)
|
cp -rvf $(DIR_SRC)/src/$(THISAPP) $(DIR_APP)
|
||||||
|
|
||||||
cd $(DIR_APP) && make install CFLAGS="$(CFLAGS)" \
|
cd $(DIR_APP) && make install CFLAGS="$(CFLAGS)" \
|
||||||
TOOLS_DIR="$(TOOLS_DIR)"
|
TOOLS_DIR="/tools"
|
||||||
|
|
||||||
@rm -rf $(DIR_APP)
|
@rm -rf $(DIR_APP)
|
||||||
@$(POSTBUILD)
|
@$(POSTBUILD)
|
||||||
|
|||||||
25
make.sh
25
make.sh
@@ -229,9 +229,28 @@ prepareenv() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildtoolchain() {
|
buildtoolchain() {
|
||||||
if [ "$(uname -m)" = "x86_64" ]; then
|
local error=false
|
||||||
exiterror "Cannot build toolchain on x86_64. Please use the download."
|
case "${MACHINE}:$(uname -m)" in
|
||||||
fi
|
# 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
|
if [ "$(uname -r | grep ipfire)" ]; then
|
||||||
exiterror "Cannot build toolchain on ipfire. Please use the download."
|
exiterror "Cannot build toolchain on ipfire. Please use the download."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -225,17 +225,17 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
|
|||||||
CXXFLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
|
CXXFLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
|
||||||
C2FLAGS="-O2 -march=i586 -mtune=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"
|
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
|
echo "`date -u '+%b %e %T'`: Machine is ARM (or equivalent)" >> $LOGFILE
|
||||||
MACHINE=armv5tel
|
MACHINE=armv5tel
|
||||||
MACHINE_TYPE=arm
|
MACHINE_TYPE=arm
|
||||||
BUILDTARGET=${MACHINE}-unknown-linux-gnueabi
|
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"
|
CXXFLAGS="$CFLAGS"
|
||||||
C2FLAGS="$CFLAGS"
|
C2FLAGS="$CFLAGS"
|
||||||
CXX2FLAGS="$CXXFLAGS"
|
CXX2FLAGS="$CXXFLAGS"
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user