mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Fix stripping.
This commit is contained in:
@@ -46,4 +46,5 @@ md5 :
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) :
|
||||
STRIP="/tools/bin/strip" $(DIR_SRC)/src/stripper /
|
||||
STRIP="/tools/bin/strip" $(DIR_SRC)/src/stripper / \
|
||||
--exclude=/usr/src --exclude=/tools
|
||||
|
||||
6
make.sh
6
make.sh
@@ -378,12 +378,12 @@ buildipfire() {
|
||||
|
||||
# The xen and PAE kernels are only available for x86
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
ipfiremake linux2 KCFG="-xen"
|
||||
# ipfiremake linux2 KCFG="-xen"
|
||||
# ipfiremake v4l-dvb KCFG="-xen"
|
||||
# ipfiremake mISDN KCFG="-xen"
|
||||
# ipfiremake dahdi KCFG="-xen" KMOD=1
|
||||
ipfiremake cryptodev KCFG="-xen"
|
||||
ipfiremake compat-wireless KCFG="-xen"
|
||||
# ipfiremake cryptodev KCFG="-xen"
|
||||
# ipfiremake compat-wireless KCFG="-xen"
|
||||
# ipfiremake r8169 KCFG="-xen"
|
||||
# ipfiremake r8168 KCFG="-xen"
|
||||
# ipfiremake r8101 KCFG="-xen"
|
||||
|
||||
28
src/stripper
28
src/stripper
@@ -1,10 +1,32 @@
|
||||
#!/bin/bash
|
||||
#!/tools/bin/bash
|
||||
|
||||
dirs=""
|
||||
excludes="/dev /proc /sys /run"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "${1}" in
|
||||
--exclude=*)
|
||||
excludes="${excludes} ${1#*=}"
|
||||
;;
|
||||
*)
|
||||
dirs="${dirs} ${1}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
function _strip() {
|
||||
local file=${1}
|
||||
|
||||
local cmd="${STRIP-strip}"
|
||||
|
||||
local exclude l
|
||||
for exclude in ${excludes}; do
|
||||
l=${#exclude}
|
||||
if [ "${file:0:${l}}" = "${exclude}" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
case "$(file -bi ${file})" in
|
||||
application/x-sharedlib*|application/x-archive*)
|
||||
cmd="${cmd} --strip-debug --remove-section=.comment --remove-section=.note"
|
||||
@@ -18,7 +40,7 @@ function _strip() {
|
||||
${cmd} ${file}
|
||||
}
|
||||
|
||||
for dir in $@; do
|
||||
for dir in ${dirs}; do
|
||||
# Strip shared objects.
|
||||
find ${dir} -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
|
||||
| file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' |
|
||||
|
||||
@@ -530,8 +530,9 @@ installmake() {
|
||||
CROSSTARGET="${CROSSTARGET}" \
|
||||
MACHINE="$MACHINE" \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
/bin/bash -x -c "cd /usr/src/lfs && \
|
||||
make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
|
||||
LD_LIBRARY_PATH=/tools/lib \
|
||||
/tools/bin/bash -x -c "cd /usr/src/lfs && \
|
||||
/tools/bin/make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
|
||||
|
||||
local COMPILE_SUCCESS=$?
|
||||
local PKG_TIME_END=`date +%s`
|
||||
|
||||
Reference in New Issue
Block a user