Revision: 5336
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5336&view=rev
Author:   gespinasse
Date:     2011-01-13 07:41:40 +0000 (Thu, 13 Jan 2011)

Log Message:
-----------
2 unrelated mixed subject
First upgrade ccache to 3.1.4
That give the flexibility to define CCACHE_COMPILERCHECK with a gcc signature 
(and everything we want to add there like the specs)
Some cleanup is still required on toolchain_make to define a clean environment
And distcc will not work as I remove CCACHE_PREFIX as ccache does not work when 
it's empty.

Secondly, compile xz earlier, so we could unpack glibc-<foo>.xz even on old host
xz need a bit more work, we should compile too on base build

Modified Paths:
--------------
    ipcop/trunk/lfs/ccache
    ipcop/trunk/lfs/xz
    ipcop/trunk/make.sh

Modified: ipcop/trunk/lfs/ccache
===================================================================
--- ipcop/trunk/lfs/ccache      2011-01-13 07:09:31 UTC (rev 5335)
+++ ipcop/trunk/lfs/ccache      2011-01-13 07:41:40 UTC (rev 5336)
@@ -33,12 +33,12 @@
 include Config
 
 PKG_NAME   = ccache
-VER        = 2.4
+VER        = 3.1.4
 HOST_ARCH  = all
 OTHER_SRC  = yes
 
 THISAPP    = ccache-$(VER)
-DL_FILE    = $(THISAPP).tar.gz
+DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = http://samba.org/ftp/ccache
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
@@ -52,7 +52,7 @@
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 73c1ed1e767c1752dd0f548ec1e66ce7
+$(DL_FILE)_MD5 = 676fda8a9a5e02574435c32b22942abd
 
 install : $(TARGET)
 
@@ -81,18 +81,16 @@
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && patch -Np0 -i $(DIR_PATCHES)/$(THISAPP).patch
-       cd $(DIR_APP) && patch -Np0 -i 
$(DIR_PATCHES)/ccache-null-cache_prefix.patch
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
 
-       cd $(DIR_APP) && CFLAGS="-O2 -static" ./configure --prefix=$(PREFIX)
+       # libz will not being detected if libz.h is not installed : bundled 
zlib will be build
+       cd $(DIR_APP) && CFLAGS="-O2 -static" ac_cv_func_getpwuid=no 
./configure --prefix=$(PREFIX)
        cd $(DIR_APP) && make
        cd $(DIR_APP) && make install
        ln -sf ccache $(PREFIX)/bin/gcc
        ln -sf ccache $(PREFIX)/bin/g++
        ln -sf ccache $(PREFIX)/bin/cc
        ln -sf ccache $(PREFIX)/bin/c++
-       $(PREFIX)/bin/ccache -z
 
        # show toolchain_make existing variables
        env

Modified: ipcop/trunk/lfs/xz
===================================================================
--- ipcop/trunk/lfs/xz  2011-01-13 07:09:31 UTC (rev 5335)
+++ ipcop/trunk/lfs/xz  2011-01-13 07:41:40 UTC (rev 5336)
@@ -41,8 +41,14 @@
 DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = http://tukaani.org/xz
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
 
+ifeq "$(STAGE)" "toolchain"
+  TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)-pass$(PASS)
+else
+  TARGET     = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
+endif
+
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -93,11 +99,12 @@
 
        cd $(DIR_APP) && make -j $(PARALLELISM)
 
+ifneq "$(PASS)" "1"
 ifeq "$(RUNNING_TEST)" "yes"
        # No error in tests
        cd $(DIR_APP); make -j 1 check &> 
$(DIR_TEST)/$(THISAPP)-$(STAGE_ORDER).log
 endif
-
+endif
        cd $(DIR_APP) && make install-exec
 
        @rm -rf $(DIR_APP)

Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2011-01-13 07:09:31 UTC (rev 5335)
+++ ipcop/trunk/make.sh 2011-01-13 07:41:40 UTC (rev 5336)
@@ -1113,6 +1113,18 @@
        fi
 } # End of report_result()
 
+#########################################################################################################
+# update compiler signature for ccache with installed gcc                      
                        #
+#########################################################################################################
+# arg is the path to gcc
+update-gcc-hash()
+{
+       #[ -f $1 ] || exiterror "Bad path: $1 for gcc"
+       local hash=$(md5sum $1)
+       #[ $? -eq 0 ] || exiterror "md5sum error for $1"
+       export CCACHE_COMPILERCHECK="echo ${hash}"
+       echo "Update CCACHE_COMPILERCHECK to ${CCACHE_COMPILERCHECK}" 
>>${PREPLOGFILE}
+}
 
 
#########################################################################################################
 # Function that checks for toolchain prerequisites                             
                        #
@@ -1334,7 +1346,6 @@
                SNAME=${SNAME} \
                SLOGAN="${SLOGAN}" \
                CCACHE_DIR=/usr/src/ccache \
-               CCACHE_PREFIX=${CCACHE_PREFIX} \
                CCACHE_HASHDIR=${CCACHE_HASHDIR} \
                DISTCC_DIR=/usr/src/distcc \
                PARALLELISM=${PARALLELISM} \
@@ -1517,7 +1528,6 @@
                SNAME=${SNAME} \
                SLOGAN="${SLOGAN}" \
                CCACHE_DIR=/usr/src/ccache \
-               CCACHE_PREFIX=${CCACHE_PREFIX} \
                CCACHE_HASHDIR=${CCACHE_HASHDIR} \
                DISTCC_DIR=/usr/src/distcc \
                PARALLELISM=${PARALLELISM} \
@@ -1585,11 +1595,18 @@
        if [ x"${USE_DISTCC}" == x"yes" -a ! -z "${DISTCC_HOSTS}" ]; then
                toolchain_make distcc
        fi
+       
+       # search gcc host path before ccache is made, as ccache installed gcc 
symlink is found earlier in PATH chain
+       local HOSTGCC=$(bash +h -c "type gcc" | cut -d" " -f3)
 
        toolchain_make ccache
+       update-gcc-hash ${HOSTGCC}              # preset the compiler hash with 
the value of the host compiler
        PASS="1"
+       toolchain_make xz                       # Early, to be sure, even in 
old host we could open .lzma or .xz package like glibc
        toolchain_make binutils
        toolchain_make gcc
+       # gcc pass1 is removed on lfs/strip. If absent that mean we don't need 
this signature
+       [ -f /${TOOLS_DIR}/bin/${LFS_TGT}-gcc ] && update-gcc-hash 
"/${TOOLS_DIR}/bin/${LFS_TGT}-gcc"
        PASS=""
        toolchain_make linux-headers
        toolchain_make glibc
@@ -1597,17 +1614,19 @@
        PASS="2"
        toolchain_make binutils
        toolchain_make gcc
+       update-gcc-hash "/${TOOLS_DIR}/bin/${TARGET_TGT}-gcc"
        PASS=""
        toolchain_make ncurses
        toolchain_make bash
        toolchain_make bzip2
-       toolchain_make xz                       # possible to use xz or lmza 
for every package after this one
+       PASS="2"
+       toolchain_make xz                       # rebuild with our compiled libc
+       PASS=""
        toolchain_make tar                      # build just after xz to avoid 
using pipe with .xz package (if host tar is old)
        toolchain_make coreutils
        toolchain_make diffutils
        toolchain_make file
-       # contrary to LFS, we compile as mount is needed inside stage2 and 
linux32 is used in chroot_make
-       toolchain_make util-linux-ng
+       toolchain_make util-linux-ng            # contrary to LFS, we need 
mount and linux32 for stage2 and chroot_make
        toolchain_make findutils
        toolchain_make gawk
        toolchain_make gettext
@@ -1642,6 +1661,8 @@
        ${MKDIR} ${BASEDIR}/files_${MACHINE}/02_base
        ${MKDIR} ${BASEDIR}/log_${MACHINE}/02_base
 
+       update-gcc-hash "/${TOOLS_DIR}/bin/${TARGET_TGT}-gcc"
+
        chroot_make stage2
        chroot_make linux-headers
        chroot_make glibc
@@ -1652,6 +1673,7 @@
        chroot_make gmp
        chroot_make mpfr
        chroot_make gcc
+       update-gcc-hash "${BASEDIR}/build_${MACHINE}/ipcop/usr/bin/gcc"
        chroot_make sed
        chroot_make pkg-config
        chroot_make ncurses


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to