]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/ccache
toolchain: update to gcc-7.3.0 and enable retpolines on x86_64 and i586
[ipfire-2.x.git] / lfs / ccache
index 43f4df70ece918500a92076036f760559fac3ca7..8f6a1815225bb65f9254f2f1417d68bad9d0ea28 100644 (file)
@@ -34,7 +34,10 @@ TARGET     = $(DIR_INFO)/$(THISAPP)-pass$(PASS)
 
 ifeq "$(PASS)" "1"
        CFLAGS := $(patsubst -march=%,,$(CFLAGS))
+       CFLAGS := $(patsubst -mfpu=%,,$(CFLAGS))
        CFLAGS := $(patsubst -mfloat-abi=%,,$(CFLAGS))
+       CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS))
+       CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS))
 endif
 
 # Set max cache size to 5GB
@@ -78,28 +81,28 @@ $(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
+       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"
-       mkdir -pv /tools/ccache/bin
-       ln -svf ../../bin/ccache /tools/ccache/bin/gcc
-       ln -svf ../../bin/ccache /tools/ccache/bin/g++
-       ln -svf ../../bin/ccache /tools/ccache/bin/cc
-       ln -svf ../../bin/ccache /tools/ccache/bin/c++
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-gcc
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-g++
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-cc
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(CROSSTARGET)-c++
+       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/ccache/bin/$(BUILDTARGET)-gcc
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-g++
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-cc
-       ln -svf ../../bin/ccache /tools/ccache/bin/$(BUILDTARGET)-c++
+       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