Mercurial > mxe-octave
annotate src/native-gcc.mk @ 3944:d83f02205481
native-gcc: compile as multilib in win64
* src/native-binutils.mk: in win64 mode, enable multilib and targets=targets=x86_64-w64-mingw32,i686-w64-mingw32
* src/native-gcc.mk: in win64, enable mutilib, copy lib32 file to correct splot
author | John Donoghue |
---|---|
date | Wed, 20 May 2015 07:36:47 -0400 |
parents | 8ed7da7e39d4 |
children | f1cc0bdd57b6 |
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 := | |
3934 | 6 $(PKG)_VERSION := 4.9.2 |
7 $(PKG)_CHECKSUM := 79dbcb09f44232822460d80b033c962c0237c6d8 | |
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 |
3934 | 13 $(PKG)_DEPS := native-binutils gmp isl mpc mpfr cloog |
3511
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 |
3710
1220a9158bc1
make building 64-bit Windows binaries independent from enabling 64-bit indexing in Octave
John W. Eaton <jwe@octave.org>
parents:
3695
diff
changeset
|
29 ifneq ($(ENABLE_WINDOWS_64),yes) |
3511
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 += \ |
3944 | 31 --disable-multilib \ |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
32 --disable-sjlj-exceptions |
3944 | 33 else |
34 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ | |
35 --enable-multilib --enable-64bit | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
36 endif |
3944 | 37 else |
38 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ | |
39 --disable-multilib | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
40 endif |
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
41 |
2915 | 42 define $(PKG)_UPDATE |
43 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ | |
44 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ | |
45 grep -v '^4\.[543]\.' | \ | |
46 head -1 | |
47 endef | |
48 | |
49 define $(PKG)_BUILD | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
50 # configure gcc |
2915 | 51 mkdir '$(1).build' |
52 cd '$(1).build' && '$(1)/configure' \ | |
53 --target='$(TARGET)' \ | |
3013
bcc26ffe9a0f
use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
54 $(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
|
55 --prefix='$(HOST_PREFIX)' \ |
3016
c94807091658
native-gcc.mk: don't build objective C compiler
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
56 --enable-languages='c,c++,fortran' \ |
3695
e4ce23a86225
disable libsanitizer for gcc builds
John W. Eaton <jwe@octave.org>
parents:
3684
diff
changeset
|
57 --disable-libsanitizer \ |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
58 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ |
2915 | 59 $(ENABLE_SHARED_OR_STATIC) \ |
60 --disable-libgomp \ | |
3719
9caae5336e92
Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents:
3718
diff
changeset
|
61 --with-cloog='$(HOST_PREFIX)' \ |
9caae5336e92
Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents:
3718
diff
changeset
|
62 --with-gmp='$(HOST_PREFIX)' \ |
9caae5336e92
Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents:
3718
diff
changeset
|
63 --with-isl='$(HOST_PREFIX)' \ |
9caae5336e92
Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents:
3718
diff
changeset
|
64 --with-mpc='$(HOST_PREFIX)' \ |
9caae5336e92
Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents:
3718
diff
changeset
|
65 --with-mpfr='$(HOST_PREFIX)' \ |
2915 | 66 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
67 | |
3511
799dcef88a41
Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
68 $(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
|
69 $(MAKE) -C '$(1).build' -j 1 install |
3559
7fe77aaeb070
native-gcc.mk: move libgcc_s.a to directory searched by ld
John W. Eaton <jwe@octave.org>
parents:
3556
diff
changeset
|
70 |
7fe77aaeb070
native-gcc.mk: move libgcc_s.a to directory searched by ld
John W. Eaton <jwe@octave.org>
parents:
3556
diff
changeset
|
71 if [ -f $(HOST_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a ]; then \ |
7fe77aaeb070
native-gcc.mk: move libgcc_s.a to directory searched by ld
John W. Eaton <jwe@octave.org>
parents:
3556
diff
changeset
|
72 mv $(HOST_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(HOST_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \ |
7fe77aaeb070
native-gcc.mk: move libgcc_s.a to directory searched by ld
John W. Eaton <jwe@octave.org>
parents:
3556
diff
changeset
|
73 fi |
3944 | 74 |
75 if [ -f $(HOST_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a ]; then \ | |
76 mv $(HOST_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a $(HOST_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/32/libgcc_s.a; \ | |
77 fi | |
78 | |
2915 | 79 endef |