Mercurial > mxe-octave
comparison src/build-binutils.mk @ 3542:bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 19 Feb 2014 16:46:26 -0500 |
parents | 1b350761007f |
children | be8906c52b6b |
comparison
equal
deleted
inserted
replaced
3541:3ba1b1d89243 | 3542:bff3dfa5c343 |
---|---|
7 $(PKG)_CHECKSUM := 7ac75404ddb3c4910c7594b51ddfc76d4693debb | 7 $(PKG)_CHECKSUM := 7ac75404ddb3c4910c7594b51ddfc76d4693debb |
8 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION) | 8 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION) |
9 $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2 | 9 $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2 |
10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE) | 10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE) |
11 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE) | 11 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE) |
12 ifeq ($(MXE_SYSTEM),mingw) | 12 $(PKG)_DEPS := |
13 $(PKG)_DEPS := | |
14 else | |
15 $(PKG)_DEPS := build-gcc | |
16 endif | |
17 | 13 |
18 ifneq ($(MXE_NATIVE_BUILD),yes) | 14 ifneq ($(MXE_NATIVE_BUILD),yes) |
19 define $(PKG)_POST_BUILD | 15 define $(PKG)_POST_BUILD |
20 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' | 16 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' |
21 mv $(addprefix $(HOST_PREFIX)/bin/, ar as dlltool ld ld.bfd nm objcopy objdump ranlib strip) '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' | 17 mv $(addprefix $(HOST_PREFIX)/bin/, ar as dlltool ld ld.bfd nm objcopy objdump ranlib strip) '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' |
27 $(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \ | 23 $(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \ |
28 grep -v '^2\.1' | \ | 24 grep -v '^2\.1' | \ |
29 head -1 | 25 head -1 |
30 endef | 26 endef |
31 | 27 |
28 ifeq ($(MXE_NATIVE_BUILD),yes) | |
29 $(PKG)_DEPS += build-gcc | |
30 else | |
31 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ | |
32 --target='$(TARGET)' \ | |
33 --build='$(BUILD_SYSTEM)' \ | |
34 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ | |
35 --disable-multilib \ | |
36 --with-sysroot='$(HOST_PREFIX)' | |
37 endif | |
38 | |
32 define $(PKG)_BUILD | 39 define $(PKG)_BUILD |
33 # install config.guess for general use | 40 # install config.guess for general use |
34 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin' | 41 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin' |
35 $(INSTALL) -m755 '$(1)/config.guess' '$(BUILD_TOOLS_PREFIX)/bin/' | 42 $(INSTALL) -m755 '$(1)/config.guess' '$(BUILD_TOOLS_PREFIX)/bin/' |
36 | 43 |
37 # install target-specific autotools config file | 44 # install target-specific autotools config file |
38 $(INSTALL) -d '$(HOST_PREFIX)/share' | 45 $(INSTALL) -d '$(HOST_PREFIX)/share' |
39 echo "ac_cv_build=`$(1)/config.guess`" > '$(HOST_PREFIX)/share/config.site' | 46 echo "ac_cv_build=`$(1)/config.guess`" > '$(HOST_PREFIX)/share/config.site' |
40 | 47 |
41 cd '$(1)' && ./configure \ | 48 cd '$(1)' && ./configure \ |
42 --target='$(TARGET)' \ | 49 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ |
43 --build='$(BUILD_SYSTEM)' \ | |
44 --prefix='$(BUILD_TOOLS_PREFIX)' \ | 50 --prefix='$(BUILD_TOOLS_PREFIX)' \ |
45 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ | |
46 --with-gcc \ | 51 --with-gcc \ |
47 --with-gnu-ld \ | 52 --with-gnu-ld \ |
48 --with-gnu-as \ | 53 --with-gnu-as \ |
49 --disable-nls \ | 54 --disable-nls \ |
50 --disable-multilib \ | |
51 --with-sysroot='$(HOST_PREFIX)' \ | |
52 $(ENABLE_SHARED_OR_STATIC) \ | 55 $(ENABLE_SHARED_OR_STATIC) \ |
53 --disable-werror | 56 --disable-werror |
54 $(MAKE) -C '$(1)' -j '$(JOBS)' | 57 $(MAKE) -C '$(1)' -j '$(JOBS)' |
55 $(MAKE) -C '$(1)' -j 1 install | 58 $(MAKE) -C '$(1)' -j 1 install |
56 | 59 |