Mercurial > mxe-octave
annotate 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 |
rev | line source |
---|---|
2915 | 1 # This file is part of MXE. |
2 # See index.html for further information. | |
3 | |
4 PKG := native-gcc | |
5 $(PKG)_IGNORE := | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
6 $(PKG)_VERSION := 4.8.2 |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
7 $(PKG)_CHECKSUM := 810fb70bd721e1d9f446b6503afe0a9088b62986 |
2915 | 8 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) |
9 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 | |
10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) | |
11 $(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
12 |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
13 $(PKG)_DEPS := native-binutils cloog gmp isl mpc mpfr |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
14 ifeq ($(MXE_SYSTEM),mingw) |
3523
1b350761007f
allow native-gcc build to succeed
John W. Eaton <jwe@octave.org>
parents:
3511
diff
changeset
|
15 $(PKG)_DEPS += mingw-w64 |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
16 endif |
2915 | 17 ifneq ($(BUILD_SHARED),yes) |
18 $(PKG)_STATIC_FLAG := --static | |
19 endif | |
20 | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
21 ifeq ($(MXE_SYSTEM),mingw) |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
22 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
23 --enable-version-specific-runtime-libs \ |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
24 --disable-nls \ |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
25 --without-x \ |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
26 --disable-win32-registry \ |
3554
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
27 --with-native-system-header-dir='$(HOST_PREFIX)/include' \ |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
28 --enable-threads=win32 |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
29 ifneq ($(ENABLE_64),yes) |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
30 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
31 --disable-sjlj-exceptions |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
32 endif |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
33 endif |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
34 |
2915 | 35 define $(PKG)_UPDATE |
36 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ | |
37 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ | |
38 grep -v '^4\.[543]\.' | \ | |
39 head -1 | |
40 endef | |
41 | |
42 define $(PKG)_BUILD | |
3554
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
43 # unpack support libraries |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
44 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gmp,$(TAR)) |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
45 mv '$(1)/$(gmp_SUBDIR)' '$(1)/gmp' |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
46 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,mpc,$(TAR)) |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
47 mv '$(1)/$(mpc_SUBDIR)' '$(1)/mpc' |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
48 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,mpfr,$(TAR)) |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
49 mv '$(1)/$(mpfr_SUBDIR)' '$(1)/mpfr' |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
50 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,cloog,$(TAR)) |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
51 mv '$(1)/$(cloog_SUBDIR)' '$(1)/cloog' |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
52 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,isl,$(TAR)) |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
53 mv '$(1)/$(isl_SUBDIR)' '$(1)/isl' |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
54 #--with-native-system-header-dir='/include' |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
55 |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
56 # configure gcc |
2915 | 57 mkdir '$(1).build' |
58 cd '$(1).build' && '$(1)/configure' \ | |
59 --target='$(TARGET)' \ | |
3013
bcc26ffe9a0f
use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
60 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
61 --prefix='$(HOST_PREFIX)' \ |
3016
c94807091658
native-gcc.mk: don't build objective C compiler
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
62 --enable-languages='c,c++,fortran' \ |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
63 --disable-multilib \ |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
64 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ |
2915 | 65 $(ENABLE_SHARED_OR_STATIC) \ |
66 --disable-libgomp \ | |
67 --disable-libmudflap \ | |
3554
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
68 --with-mpfr-include='$(1)/mpfr/src' \ |
b1ca68ddd02c
build native-gcc using untared dependancies within gcc source tree
John Donoghue <john.donoghue@ieee.org>
parents:
3523
diff
changeset
|
69 --with-mpfr-lib='$(1).build/mpfr/src/.libs' \ |
2915 | 70 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
71 | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
72 $(MAKE) -C '$(1).build' -j '$(JOBS)' |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
73 $(MAKE) -C '$(1).build' -j 1 install |
2915 | 74 endef |