Mercurial > mxe-octave
view src/native-gcc.mk @ 3554:b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
* src/native-gcc.mk: untar gmp, mpc, mpfr, cloog and isl into the gcc source tree before configure and build, set sysroot.
* src/native-binutils.mk: set sysroot path.
* src/mingw-w64-1-math-h.patch, mingw-w64-2-float-h.patch: New files.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Fri, 21 Feb 2014 06:05:39 -0500 |
parents | 1b350761007f |
children | 22b42ac3fd68 |
line wrap: on
line source
# This file is part of MXE. # See index.html for further information. PKG := native-gcc $(PKG)_IGNORE := $(PKG)_VERSION := 4.8.2 $(PKG)_CHECKSUM := 810fb70bd721e1d9f446b6503afe0a9088b62986 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := native-binutils cloog gmp isl mpc mpfr ifeq ($(MXE_SYSTEM),mingw) $(PKG)_DEPS += mingw-w64 endif ifneq ($(BUILD_SHARED),yes) $(PKG)_STATIC_FLAG := --static endif ifeq ($(MXE_SYSTEM),mingw) $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ --enable-version-specific-runtime-libs \ --disable-nls \ --without-x \ --disable-win32-registry \ --with-native-system-header-dir='$(HOST_PREFIX)/include' \ --enable-threads=win32 ifneq ($(ENABLE_64),yes) $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ --disable-sjlj-exceptions endif endif define $(PKG)_UPDATE $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ grep -v '^4\.[543]\.' | \ head -1 endef define $(PKG)_BUILD # unpack support libraries cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gmp,$(TAR)) mv '$(1)/$(gmp_SUBDIR)' '$(1)/gmp' cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,mpc,$(TAR)) mv '$(1)/$(mpc_SUBDIR)' '$(1)/mpc' cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,mpfr,$(TAR)) mv '$(1)/$(mpfr_SUBDIR)' '$(1)/mpfr' cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,cloog,$(TAR)) mv '$(1)/$(cloog_SUBDIR)' '$(1)/cloog' cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,isl,$(TAR)) mv '$(1)/$(isl_SUBDIR)' '$(1)/isl' #--with-native-system-header-dir='/include' # configure gcc mkdir '$(1).build' cd '$(1).build' && '$(1)/configure' \ --target='$(TARGET)' \ $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ --prefix='$(HOST_PREFIX)' \ --enable-languages='c,c++,fortran' \ --disable-multilib \ $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ $(ENABLE_SHARED_OR_STATIC) \ --disable-libgomp \ --disable-libmudflap \ --with-mpfr-include='$(1)/mpfr/src' \ --with-mpfr-lib='$(1).build/mpfr/src/.libs' \ $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") $(MAKE) -C '$(1).build' -j '$(JOBS)' $(MAKE) -C '$(1).build' -j 1 install endef