annotate src/build-binutils.mk @ 3877:65b9641f852c

build-binutils: remove native tools from HOST_PREFIX/bin (Bug 44753) * src/build-binutils.mk: for win64, remove ar as dlltool ld ld.bfd nm objcopy objdump ranlib strip from the HOST/bin folder
author John Donoghue
date Tue, 07 Apr 2015 12:20:02 -0400
parents 7e15ef9bf1e5
children 16ce2dee4633
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2159
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
414
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 408
diff changeset
3
3048
5ef49fb3299d treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents: 3013
diff changeset
4 PKG := build-binutils
1281
3443a9b9a415 remove $(PKG)_IGNORE entries that are no longer needed
Volker Grabsch <vog@notjusthosting.com>
parents: 994
diff changeset
5 $(PKG)_IGNORE :=
3763
be8906c52b6b binutils: update to version 2.25
John Donoghue
parents: 3542
diff changeset
6 $(PKG)_VERSION := 2.25
be8906c52b6b binutils: update to version 2.25
John Donoghue
parents: 3542
diff changeset
7 $(PKG)_CHECKSUM := b46cc90ebaba7ffcf6c6d996d60738881b14e50d
2118
60fa94368a98 update package binutils
Mark Brand <mabrand@mabrand.nl>
parents: 2053
diff changeset
8 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION)
505
398d63c87ef8 update version of package binutils
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
9 $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2
398d63c87ef8 update version of package binutils
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE)
398d63c87ef8 update version of package binutils
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
11 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE)
3542
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
12 $(PKG)_DEPS :=
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
13
3509
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
14 ifneq ($(MXE_NATIVE_BUILD),yes)
3804
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
15 ifneq ($(ENABLE_WINDOWS_64),yes)
3509
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
16 define $(PKG)_POST_BUILD
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
17 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)'
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
18 mv $(addprefix $(HOST_PREFIX)/bin/, ar as dlltool ld ld.bfd nm objcopy objdump ranlib strip) '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)'
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
19 endef
3877
65b9641f852c build-binutils: remove native tools from HOST_PREFIX/bin (Bug 44753)
John Donoghue
parents: 3804
diff changeset
20 else
65b9641f852c build-binutils: remove native tools from HOST_PREFIX/bin (Bug 44753)
John Donoghue
parents: 3804
diff changeset
21 define $(PKG)_POST_BUILD
65b9641f852c build-binutils: remove native tools from HOST_PREFIX/bin (Bug 44753)
John Donoghue
parents: 3804
diff changeset
22 rm $(addprefix $(HOST_PREFIX)/bin/, ar as dlltool ld ld.bfd nm objcopy objdump ranlib strip)
65b9641f852c build-binutils: remove native tools from HOST_PREFIX/bin (Bug 44753)
John Donoghue
parents: 3804
diff changeset
23 endef
3509
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
24 endif
3804
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
25 endif
3509
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
26
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2365
diff changeset
28 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \
994
07e346dfcd76 improved version recognition of packages binutils and gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 876
diff changeset
29 $(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \
1864
0ac0306fc662 Improved filtering of bad binutils versions
Volker Grabsch <vog@notjusthosting.com>
parents: 1863
diff changeset
30 grep -v '^2\.1' | \
505
398d63c87ef8 update version of package binutils
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
31 head -1
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 endef
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
33
3542
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
34 ifeq ($(MXE_NATIVE_BUILD),yes)
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
35 $(PKG)_DEPS += build-gcc
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
36 else
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
37 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
38 --target='$(TARGET)' \
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
39 --build='$(BUILD_SYSTEM)' \
3804
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
40
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
41 ifeq ($(ENABLE_WINDOWS_64),yes)
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
42 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
43 --enable-multilib \
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
44 --with-sysroot='$(BUILD_TOOLS_PREFIX)' \
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
45 --enable-targets=x86_64-w64-mingw32,i686-w64-mingw32
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
46 else
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
47 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
48 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
49 --disable-multilib \
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
50 --with-sysroot='$(HOST_PREFIX)'
7e15ef9bf1e5 Update build-gcc, nsis to compile when in w64 mode.
John D
parents: 3763
diff changeset
51 endif
3542
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
52 endif
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
53
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
54 define $(PKG)_BUILD
2151
18d32520bcb5 take config.guess from binutils instead of gcc
Mark Brand <mabrand@mabrand.nl>
parents: 2118
diff changeset
55 # install config.guess for general use
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
56 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin'
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
57 $(INSTALL) -m755 '$(1)/config.guess' '$(BUILD_TOOLS_PREFIX)/bin/'
2151
18d32520bcb5 take config.guess from binutils instead of gcc
Mark Brand <mabrand@mabrand.nl>
parents: 2118
diff changeset
58
2158
3a7782db4d61 install target-specific autotools config.site file
Tony Theodore <tonyt@logyst.com>
parents: 2153
diff changeset
59 # install target-specific autotools config file
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
60 $(INSTALL) -d '$(HOST_PREFIX)/share'
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
61 echo "ac_cv_build=`$(1)/config.guess`" > '$(HOST_PREFIX)/share/config.site'
2158
3a7782db4d61 install target-specific autotools config.site file
Tony Theodore <tonyt@logyst.com>
parents: 2153
diff changeset
62
131
ed98f6b98e35 use $(1) instead of $(2) to address to temporary build dir
Volker Grabsch <vog@notjusthosting.com>
parents: 115
diff changeset
63 cd '$(1)' && ./configure \
3542
bff3dfa5c343 make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents: 3523
diff changeset
64 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \
3012
100e618349f7 Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents: 2997
diff changeset
65 --prefix='$(BUILD_TOOLS_PREFIX)' \
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
66 --with-gcc \
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
67 --with-gnu-ld \
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
68 --with-gnu-as \
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
69 --disable-nls \
2855
47558e958113 Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents: 2852
diff changeset
70 $(ENABLE_SHARED_OR_STATIC) \
543
c1a03ad713d1 portability fix to packages binutils and gcc for MacOS 10.6
Volker Grabsch <vog@notjusthosting.com>
parents: 505
diff changeset
71 --disable-werror
173
b279dbda0f54 improved parallel builds of packages 'binutils', 'pdflib_lite' and 'sdl'
Volker Grabsch <vog@notjusthosting.com>
parents: 143
diff changeset
72 $(MAKE) -C '$(1)' -j '$(JOBS)'
b279dbda0f54 improved parallel builds of packages 'binutils', 'pdflib_lite' and 'sdl'
Volker Grabsch <vog@notjusthosting.com>
parents: 143
diff changeset
73 $(MAKE) -C '$(1)' -j 1 install
3509
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
74
3350681f52f2 Don't install cross tools in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3495
diff changeset
75 $($(PKG)_POST_BUILD)
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
76 endef