]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix stripping.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Aug 2012 12:40:48 +0000 (14:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Aug 2012 12:40:48 +0000 (14:40 +0200)
lfs/strip
make.sh
src/stripper
tools/make-functions

index 3ae1bde6f5241b69de99eab65661b2913b227c9f..30cb9b33b47703ce3a4a1dfce25baba267f3af19 100644 (file)
--- a/lfs/strip
+++ b/lfs/strip
@@ -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
diff --git a/make.sh b/make.sh
index 0f12839ebd7820d9489d9382434933c37ff0aa66..b827b6fdbb386a6fde002562c18d60e83f8e039b 100755 (executable)
--- a/make.sh
+++ b/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"
index 15fa308faff70a1f3731ea395e3e01657788a418..2b4feafe9063c50bf0c01795bd8ea887fcf21e19 100755 (executable)
@@ -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' |
index a9f8136b44c3bf174f30dd8c32b7f7643627c3f4..5af0b4b8472d474d4dde7688207a9f49808ac0e8 100644 (file)
@@ -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`