###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 11.1.0
+VER = 13.2.0
GMP_VER = 6.2.1
-MPFR_VER = 4.1.0
-MPC_VER = 1.2.1
+MPFR_VER = 4.2.0
+MPC_VER = 1.3.1
THISAPP = gcc-$(VER)
DL_FILE = $(THISAPP).tar.xz
CFLAGS := $(filter-out -fexceptions,$(CFLAGS))
CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS))
+CFLAGS := $(patsubst -mbranch-protection=%,,$(CFLAGS))
CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS))
CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS))
CFLAGS := $(patsubst -fcf-protection,,$(CFLAGS))
CXXFLAGS := $(CFLAGS)
-ifeq "$(BUILD_ARCH)" "armv7hl"
- FULL_BOOTSTRAP = 1
-endif
-
-ifeq "$(BUILD_ARCH)" "armv6l"
- FULL_BOOTSTRAP = 1
-endif
-
# Normal build or $(TOOLS_DIR) build.
#
ifeq "$(ROOT)" ""
--disable-nls
EXTRA_MAKE =
EXTRA_INSTALL =
+ifeq "$(PASS)" "A"
+ TARGET = $(DIR_INFO)/$(THISAPP)-libatomic
+endif
else
ifeq "$(PASS)" "1"
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
--with-sysroot=$(ROOT) \
--with-local-prefix=$(TOOLS_DIR) \
--with-native-system-header-dir=$(TOOLS_DIR)/include \
+ --with-glibc-version=2.11 \
--disable-nls \
--disable-shared \
+ --disable-multilib \
--disable-decimal-float \
--disable-threads \
--disable-libatomic \
--without-ppl \
--without-cloog \
--enable-languages=c,c++
- EXTRA_MAKE =
- EXTRA_INSTALL =
+ EXTRA_MAKE =
+ EXTRA_INSTALL =
else
ifeq "$(PASS)" "2"
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
RANLIB="$(CROSSTARGET)-ranlib"
EXTRA_CONFIG = \
--build=$(BUILDTARGET) \
+ --host=$(BUILDTARGET) \
--prefix=$(TOOLS_DIR) \
--with-local-prefix=$(TOOLS_DIR) \
--with-native-system-header-dir=$(TOOLS_DIR)/include \
+ --disable-bootstrap \
--enable-languages=c,c++ \
--disable-libstdcxx-pch \
+ --disable-multilib \
--disable-libgomp
- EXTRA_MAKE =
- EXTRA_INSTALL =
-
- ifeq "$(FULL_BOOTSTRAP)" "1"
- EXTRA_CONFIG += --enable-bootstrap
- else
- EXTRA_CONFIG += --disable-bootstrap
- endif
+ EXTRA_MAKE =
+ EXTRA_INSTALL =
else
# PASS=L # libstdc++-v3
TARGET = $(DIR_INFO)/$(THISAPP)-libstdc++
--disable-libstdcxx-threads \
--disable-libstdcxx-pch \
--with-gxx-include-dir=$(TOOLS_DIR)/$(CROSSTARGET)/include/c++/$(VER)
- EXTRA_MAKE =
- EXTRA_INSTALL =
+ EXTRA_MAKE =
+ EXTRA_INSTALL =
endif
endif
endif
--enable-standard-branch-protection
endif
-ifeq "$(BUILD_ARCH)" "armv7hl"
- EXTRA_CONFIG += \
- --with-float=hard
-endif
-
-ifeq "$(BUILD_ARCH)" "armv6l"
- EXTRA_CONFIG += \
- --with-arch=armv6 \
- --with-float=softfp
-# --disable-sjlj-exceptions
-endif
-
-ifeq "$(BUILD_ARCH)" "i586"
- EXTRA_CONFIG += \
- --with-arch=i586 \
- --with-tune=generic
-endif
-
ifeq "$(BUILD_ARCH)" "riscv64"
EXTRA_CONFIG += \
--with-arch=rv64gc \
EXTRA_CONFIG += \
--disable-multilib \
- --with-bugurl=http://bugtracker.ipfire.org \
+ --with-bugurl=https://bugzilla.ipfire.org \
--disable-libunwind-exceptions \
--enable-gnu-unique-object
mpfr-$(MPFR_VER).tar.xz = $(DL_FROM)/mpfr-$(MPFR_VER).tar.xz
mpc-$(MPC_VER).tar.gz = $(DL_FROM)/mpc-$(MPC_VER).tar.gz
-$(DL_FILE)_MD5 = 77f6252be0861ab918042acf42bc10ff
-gmp-$(GMP_VER).tar.xz_MD5 = 0b82665c4a92fd2ade7440c13fcaa42b
-mpfr-$(MPFR_VER).tar.xz_MD5 = bdd3d5efba9c17da8d83a35ec552baef
-mpc-$(MPC_VER).tar.gz_MD5 = 9f16c976c25bb0f76b50be749cd7a3a8
+$(DL_FILE)_BLAKE2 = 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2
+gmp-$(GMP_VER).tar.xz_BLAKE2 = c0d85f175392a50cfa01bc6b0a312b235946ad8b4f6f84f6dabd33d7a6f2cc75c9b0e1e33057be07750bfa0145b7c4cf3b6188a5be6ca9d7271ec2276c84ebcb
+mpfr-$(MPFR_VER).tar.xz_BLAKE2 = dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64
+mpc-$(MPC_VER).tar.gz_BLAKE2 = 76434e6f8830af3571836d51576bfebbc9701e9bbb5c4686f134081cd96cd90ae02f7ff42bf9e3957c7a7ba92b6b2d9cdabe18f0269271147521cd7f6a2d551c
install : $(TARGET)
download :$(patsubst %,$(DIR_DL)/%,$(objects))
-md5 : $(subst %,%_MD5,$(objects))
+b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
-# Downloading, checking, md5sum
+# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+ @$(B2SUM)
###############################################################################
# Installation Details
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc/gcc-13.1.0-riscv_use_log2_from_cheader_without_namespace.patch
+
@mkdir $(DIR_SRC)/gcc-build
cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in
$(EXTRA_CONFIG)
cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE)
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
-
+else
+ifeq "$(PASS)" "A"
+ # libatomic pass
+ cd $(DIR_SRC)/gcc-build && \
+ $(EXTRA_ENV) \
+ $(DIR_APP)/libatomic/configure \
+ $(EXTRA_CONFIG)
+ cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE)
+ cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
else
# The actual build.
cd $(DIR_SRC)/gcc-build && \
$(EXTRA_ENV) \
$(DIR_APP)/configure \
$(EXTRA_CONFIG)
- cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE)
+ cd $(DIR_SRC)/gcc-build && make $(EXTRA_MAKE) $(MAKETUNING)
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
endif
+endif
ifeq "$(TOOLCHAIN)" "1"
ifeq "$(PASS)" "1"