Mercurial > mxe-octave
comparison src/build-binutils.mk @ 3048:5ef49fb3299d
treat gcc and binutils as build tools
use a separate target for building the cmake toolchain file
don't unpack gcc or binutils if we are using the system compiler
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 14 Jun 2013 16:51:29 -0400 |
parents | src/binutils.mk@bcc26ffe9a0f |
children | ff92c0dc6aeb |
comparison
equal
deleted
inserted
replaced
3047:e7b7b0f663d3 | 3048:5ef49fb3299d |
---|---|
1 # This file is part of MXE. | |
2 # See index.html for further information. | |
3 | |
4 PKG := build-binutils | |
5 $(PKG)_IGNORE := | |
6 $(PKG)_CHECKSUM := 587fca86f6c85949576f4536a90a3c76ffc1a3e1 | |
7 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION) | |
8 $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2 | |
9 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE) | |
10 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE) | |
11 $(PKG)_DEPS := | |
12 | |
13 define $(PKG)_UPDATE | |
14 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \ | |
15 $(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \ | |
16 grep -v '^2\.1' | \ | |
17 head -1 | |
18 endef | |
19 | |
20 define $(PKG)_BUILD | |
21 # install config.guess for general use | |
22 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin' | |
23 $(INSTALL) -m755 '$(1)/config.guess' '$(BUILD_TOOLS_PREFIX)/bin/' | |
24 | |
25 # install target-specific autotools config file | |
26 $(INSTALL) -d '$(HOST_PREFIX)/share' | |
27 echo "ac_cv_build=`$(1)/config.guess`" > '$(HOST_PREFIX)/share/config.site' | |
28 | |
29 cd '$(1)' && ./configure \ | |
30 --target='$(TARGET)' \ | |
31 --build='$(BUILD_SYSTEM)' \ | |
32 --prefix='$(BUILD_TOOLS_PREFIX)' \ | |
33 --with-gcc \ | |
34 --with-gnu-ld \ | |
35 --with-gnu-as \ | |
36 --disable-nls \ | |
37 $(ENABLE_SHARED_OR_STATIC) \ | |
38 --disable-werror | |
39 $(MAKE) -C '$(1)' -j '$(JOBS)' | |
40 $(MAKE) -C '$(1)' -j 1 install | |
41 $(MAKE) -C '$(1)' -j 1 DESTDIR=$(TOP_DIR)/cross-tools install | |
42 endef |