]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ccache: Update to version 4.1
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Dec 2020 15:09:38 +0000 (15:09 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 5 Jul 2021 05:42:39 +0000 (07:42 +0200)
This version has changed its build system to cmake and
can use zstd. We build zstd just before this package, but
depend on cmake from the host system.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/ccache
make.sh

index e930f20d111af75a60a560386e008503d0dc097b..7782429dcb60c0eea399abfdf09578df00730055 100644 (file)
 
 include Config
 
-VER        = 3.7.12
+VER        = 4.1
 
 THISAPP    = ccache-$(VER)
 DL_FILE    = $(THISAPP).tar.xz
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(THISAPP)-pass$(PASS)
-
-ifeq "$(PASS)" "1"
-       CFLAGS := $(patsubst -march=%,,$(CFLAGS))
-       CFLAGS := $(patsubst -mtune=%,,$(CFLAGS))
-       CFLAGS := $(patsubst -mfpu=%,,$(CFLAGS))
-       CFLAGS := $(patsubst -mfloat-abi=%,,$(CFLAGS))
-       CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS))
-       CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS))
-       CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS))
-       CFLAGS := $(patsubst -fcf-protection,,$(CFLAGS))
-endif
+TARGET     = $(DIR_INFO)/$(THISAPP)-tools
 
 ###############################################################################
 # Top-level Rules
@@ -51,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 4c9a09ae499d1d82bb83e67f1068f9bb
+$(DL_FILE)_MD5 = 539df5f81b853cb69e88f8dd148d9fc8
 
 install : $(TARGET)
 
@@ -81,30 +70,24 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && ./configure --prefix=$(TOOLS_DIR)
-       cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
-       cd $(DIR_APP) && make install
-
-ifeq "$(TOOLCHAIN)" "1"
- ifeq "$(PASS)" "1"
+       cd $(DIR_APP) && mkdir -pv build
+       cd $(DIR_APP)/build && cmake \
+               -DCMAKE_INSTALL_PREFIX=$(TOOLS_DIR) \
+               -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=$(TOOLS_DIR)/include \
+               ..
+       cd $(DIR_APP)/build && make $(MAKETUNING) VERBOSE=1
+       cd $(DIR_APP)/build && make install
+
+       # Install symlinks
        mkdir -pv $(TOOLS_DIR)/ccache/bin
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/gcc
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/g++
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/cc
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/c++
-       ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-gcc
-       ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-g++
-       ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-cc
-       ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(CROSSTARGET)-c++
- endif
-
- ifeq "$(PASS)" "2"
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-gcc
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-g++
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-cc
        ln -svf ../../bin/ccache $(TOOLS_DIR)/ccache/bin/$(BUILDTARGET)-c++
- endif
-endif
 
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 6fd1b077566a29c8aab42bde79bdd77a4034db6a..402c68c362a32ba9e05be81034aaa1926211a21a 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1036,7 +1036,6 @@ buildtoolchain() {
        export LOGFILE
 
        lfsmake1 stage1
-       lfsmake1 ccache                 PASS=1
        lfsmake1 binutils                       PASS=1
        lfsmake1 gcc                    PASS=1
        lfsmake1 linux                  KCFG="-headers"
@@ -1047,7 +1046,7 @@ buildtoolchain() {
        lfsmake1 gcc                    PASS=2
        lfsmake1 zlib
        lfsmake1 zstd
-       lfsmake1 ccache                 PASS=2
+       lfsmake1 ccache
        lfsmake1 tcl
        lfsmake1 expect
        lfsmake1 dejagnu