mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
tool chain: switch to gcc-4.7.1
This commit is contained in:
parent
0910e14de5
commit
443d611dd2
@ -60,7 +60,7 @@ MPC_DOWNLOAD_URL ?= http://www.multiprecision.org/mpc/download
|
||||
# Tool versions and install location
|
||||
#
|
||||
|
||||
GCC_VERSION = 4.6.1
|
||||
GCC_VERSION = 4.7.1
|
||||
BINUTILS_VERSION = 2.21.1
|
||||
GDB_VERSION = 7.3.1
|
||||
GMP_VERSION = 5.0.2
|
||||
@ -89,6 +89,7 @@ VERBOSE = @
|
||||
|
||||
AUTOCONF_gcc_4.4.5 = autoconf2.59
|
||||
AUTOCONF_gcc_4.6.1 = autoconf2.64
|
||||
AUTOCONF_gcc_4.7.1 = autoconf2.64
|
||||
|
||||
AUTOCONF = $(AUTOCONF_gcc_$(GCC_VERSION))
|
||||
|
||||
@ -215,6 +216,8 @@ LD_PREFIX = -Wl,
|
||||
LD_DEFSYM_DUMMY_LIBC = $(addprefix $(LD_PREFIX)--defsym=,$(addsuffix =0,$(DUMMY_LIBC_SYMS)))
|
||||
|
||||
GCC_CONFIG += $(COMMON_CONFIG) \
|
||||
--enable-languages=c,c++,go --disable-libgo \
|
||||
--enable-targets=all \
|
||||
--with-gnu-as --with-gnu-ld --disable-tls --disable-threads \
|
||||
--disable-libstdcxx-pch \
|
||||
--enable-shared \
|
||||
@ -234,14 +237,14 @@ GCC_CONFIG += $(GCC_CONFIG_$(PLATFORM))
|
||||
#
|
||||
HOST_CONFIG_ARGS = $(CONFIG_QUIET) \
|
||||
host_xm_include_list=$(LINK_SPEC_H_$(PLATFORM)) \
|
||||
tmake_file='t-slibgcc-elf-ver t-slibgcc-nolc-override t-linux'
|
||||
tmake_file='t-slibgcc'
|
||||
|
||||
# passed to target components such as libgcc, libstdc++
|
||||
TARGET_CONFIG_ARGS = $(CONFIG_QUIET) \
|
||||
extra_parts='crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o'
|
||||
|
||||
# compile libsupc++ as position-independent code
|
||||
TARGET_CONFIG_ARGS += LIBSUPCXX_PICFLAGS='-prefer-pic'
|
||||
TARGET_CONFIG_ARGS += PIC_CXXFLAGS='-prefer-pic'
|
||||
|
||||
GCC_INSTALL_RULE = install-strip
|
||||
ifeq ($(GCC_VERSION),4.4.5)
|
||||
@ -305,13 +308,9 @@ $(DOWNLOAD_DIR)/$(BINUTILS_DOWNLOAD_TBZ2): $(DOWNLOAD_DIR)
|
||||
$(ECHO) "$(BRIGHT_COL)downloading binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(BINUTILS_DOWNLOAD_URL)/$(BINUTILS_DOWNLOAD_TBZ2) && touch $@
|
||||
|
||||
$(DOWNLOAD_DIR)/gcc-core-$(GCC_VERSION).tar.bz2: $(DOWNLOAD_DIR)
|
||||
$(DOWNLOAD_DIR)/gcc-$(GCC_VERSION).tar.bz2: $(DOWNLOAD_DIR)
|
||||
$(ECHO) "$(BRIGHT_COL)downloading gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GCC_DOWNLOAD_URL)/gcc-$(GCC_VERSION)/gcc-core-$(GCC_VERSION).tar.bz2 && touch $@
|
||||
|
||||
$(DOWNLOAD_DIR)/gcc-g++-$(GCC_VERSION).tar.bz2: $(DOWNLOAD_DIR)
|
||||
$(ECHO) "$(BRIGHT_COL)downloading g++...$(DEFAULT_COL)"
|
||||
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GCC_DOWNLOAD_URL)/gcc-$(GCC_VERSION)/gcc-g++-$(GCC_VERSION).tar.bz2 && touch $@
|
||||
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(GCC_DOWNLOAD_URL)/gcc-$(GCC_VERSION)/gcc-$(GCC_VERSION).tar.bz2 && touch $@
|
||||
|
||||
$(DOWNLOAD_DIR)/gmp-$(GMP_VERSION).tar.bz2: $(DOWNLOAD_DIR)
|
||||
$(ECHO) "$(BRIGHT_COL)downloading gmp...$(DEFAULT_COL)"
|
||||
@ -337,7 +336,7 @@ $(CONTRIB_DIR)/mpc-$(MPC_VERSION)/configure: $(DOWNLOAD_DIR)/mpc-$(MPC_VERSION).
|
||||
$(ECHO) "$(BRIGHT_COL)unpacking mpc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)tar xfz $< -C $(CONTRIB_DIR)
|
||||
|
||||
$(CONTRIB_DIR)/gcc-$(GCC_VERSION): $(addprefix $(DOWNLOAD_DIR)/,gcc-core-$(GCC_VERSION).tar.bz2 gcc-g++-$(GCC_VERSION).tar.bz2)
|
||||
$(CONTRIB_DIR)/gcc-$(GCC_VERSION): $(addprefix $(DOWNLOAD_DIR)/,gcc-$(GCC_VERSION).tar.bz2)
|
||||
$(ECHO) "$(BRIGHT_COL)unpacking gcc and g++...$(DEFAULT_COL)"
|
||||
$(VERBOSE)mkdir -p $(CONTRIB_DIR)
|
||||
$(VERBOSE)for i in $^ ; do tar xfj $$i -C $(CONTRIB_DIR) ;done
|
||||
@ -471,8 +470,7 @@ clean:
|
||||
|
||||
cleanall: clean
|
||||
rm -rf $(DOWNLOAD_DIR)/$(BINUTILS_DOWNLOAD_TBZ2)
|
||||
rm -rf $(DOWNLOAD_DIR)/gcc-core-$(GCC_VERSION).tar.bz2
|
||||
rm -rf $(DOWNLOAD_DIR)/gcc-g++-$(GCC_VERSION).tar.bz2
|
||||
rm -rf $(DOWNLOAD_DIR)/gcc-$(GCC_VERSION).tar.bz2
|
||||
|
||||
#
|
||||
# Install rules
|
||||
|
@ -12,9 +12,10 @@ $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/configure:: $(CONTRIB_DIR)/gcc-$(GCC_VERSION)
|
||||
@#
|
||||
$(VERBOSE)sed -i "/^tmake_file=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc/config.gcc
|
||||
$(VERBOSE)sed -i "/^extra_parts=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc/config.gcc
|
||||
$(VERBOSE)sed -i "/^extra_parts=$$/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host
|
||||
$(VERBOSE)sed -i "/^EXTRA_PARTS=/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc/config/i386/t-i386elf
|
||||
$(VERBOSE)sed -i "/^EXTRA_MULTILIB_PARTS *=/s/^/#/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/gcc/config/arm/t-arm-elf
|
||||
$(VERBOSE)sed -i "s/^tmake_file=$$/&\"t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver\"/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host
|
||||
$(VERBOSE)sed -i "s/^extra_parts=$$/&\"crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o\"/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config.host
|
||||
$(VERBOSE)sed -i "s/^libgcov-objects = .*/libgcov-objects = /" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/Makefile.in
|
||||
$(VERBOSE)sed -i "s/-lc//" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libgcc/config/t-{libunwind-elf,slibgcc}
|
||||
@#
|
||||
@# Let 'config.gcc' expand our already populated 'tmake_file' variable rather
|
||||
@# than making a hard assignment. This is needed for the ARM platform because
|
||||
@ -83,10 +84,10 @@ $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/configure:: $(CONTRIB_DIR)/gcc-$(GCC_VERSION)
|
||||
@# in text relocations. Because for base tool chains, no 'dynamic_linker'
|
||||
@# is defined (see 'libtool.m4'), 'dynamic_linker' is set to 'no', which
|
||||
@# results in 'can_build_shared = no', which, in turn , results
|
||||
@# in 'enable_shared = no', which, in turn, sets 'LIBSUPCXX_PICFLAGS' to
|
||||
@# in 'enable_shared = no', which, in turn, sets 'PIC_CXXFLAGS' to
|
||||
@# nothing rather then '-prefer-pic'.
|
||||
@#
|
||||
$(VERBOSE)sed -i "/LIBSUPCXX_PICFLAGS=$$/s/LIB/__LIB/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libstdc++-v3/configure.ac
|
||||
$(VERBOSE)sed -i "/PIC_CXXFLAGS=$$/s/PIC/__PIC/" $(CONTRIB_DIR)/gcc-$(GCC_VERSION)/libstdc++-v3/configure.ac
|
||||
@#
|
||||
@# Re-generate configure scripts
|
||||
@#
|
||||
|
Loading…
Reference in New Issue
Block a user