annotate src/native-gcc.mk @ 4467:b7d6a53fa46c

gcc: update to 7.1 with tools * src/build-gcc.mk: update version 7.1.0 * src/cloog.mk: update 0.18.4 * src/gmp.mk: update 6.1.2 * src/isl.mk: update 0.16.1, add no-undefined flag * src/mpfr.mk: update 3.1.6 * src/native-gcc.mk: update 7.1.0 * src/isl-1-fixes.patch: removed file * dist-files.mk: remove reference to patch files, add mingw-w64 patch * src/build-gcc-1-mingw-float.patch: removed patch * src/native-gcc-1-mingw-float.patch: removed patch * src/build-gcc-2-intrinsics.patch: removed patch * src/native-gcc-2-intrinsics.patch: removed patch * src/mingw-w64.mk: update to 5.0.2 * src/gcc-1-mingw-float.patch: remove patch * src/gcc-2-darwin-no-pie.patch: remove patch * src/mingw-w64-2-pthreads.patch: new file * src/pthreads.mk: apply mingw patches to mingw sources before running configure
author John D
date Mon, 31 Jul 2017 16:53:21 -0400
parents 1fdd3ed2e0af
children 575bcdc0e139
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 # This file is part of MXE.
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 # See index.html for further information.
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 PKG := native-gcc
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 $(PKG)_IGNORE :=
4467
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents: 4188
diff changeset
6 $(PKG)_VERSION := 7.1.0
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents: 4188
diff changeset
7 $(PKG)_CHECKSUM := a6dca81b25a97416211218f725b26f01e8063e05
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
4467
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents: 4188
diff changeset
9 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.gz
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
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
8ed7da7e39d4 gcc: parial undo of c/s ee802fc5dd9b
John Donoghue
parents: 3926
diff changeset
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
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 ifneq ($(BUILD_SHARED),yes)
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 $(PKG)_STATIC_FLAG := --static
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 endif
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
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 += \
3981
f1cc0bdd57b6 native-gcc: compile gcc as static when using mingw64
John Donoghue
parents: 3944
diff changeset
31 $(ENABLE_SHARED_OR_STATIC) \
3944
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
32 --disable-multilib \
3511
799dcef88a41 Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3480
diff changeset
33 --disable-sjlj-exceptions
3944
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
34 else
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
35 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
3981
f1cc0bdd57b6 native-gcc: compile gcc as static when using mingw64
John Donoghue
parents: 3944
diff changeset
36 --enable-multilib --enable-64bit --disable-shared
3511
799dcef88a41 Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3480
diff changeset
37 endif
3944
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
38 else
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
39 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
3981
f1cc0bdd57b6 native-gcc: compile gcc as static when using mingw64
John Donoghue
parents: 3944
diff changeset
40 $(ENABLE_SHARED_OR_STATIC) \
3944
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
41 --disable-multilib
3511
799dcef88a41 Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3480
diff changeset
42 endif
799dcef88a41 Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3480
diff changeset
43
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 define $(PKG)_UPDATE
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 grep -v '^4\.[543]\.' | \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 head -1
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 endef
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 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
52 # configure gcc
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 mkdir '$(1).build'
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
54 cd '$(1).build' && '$(1)/configure' \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
55 --target='$(TARGET)' \
3013
bcc26ffe9a0f use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents: 3012
diff changeset
56 $(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
57 --prefix='$(HOST_PREFIX)' \
3016
c94807091658 native-gcc.mk: don't build objective C compiler
John W. Eaton <jwe@octave.org>
parents: 3014
diff changeset
58 --enable-languages='c,c++,fortran' \
3695
e4ce23a86225 disable libsanitizer for gcc builds
John W. Eaton <jwe@octave.org>
parents: 3684
diff changeset
59 --disable-libsanitizer \
3511
799dcef88a41 Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3480
diff changeset
60 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
61 --disable-libgomp \
3719
9caae5336e92 Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents: 3718
diff changeset
62 --with-cloog='$(HOST_PREFIX)' \
9caae5336e92 Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents: 3718
diff changeset
63 --with-gmp='$(HOST_PREFIX)' \
9caae5336e92 Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents: 3718
diff changeset
64 --with-isl='$(HOST_PREFIX)' \
9caae5336e92 Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents: 3718
diff changeset
65 --with-mpc='$(HOST_PREFIX)' \
9caae5336e92 Undo botched commit. Backed out changeset 992be3109433
John W. Eaton <jwe@octave.org>
parents: 3718
diff changeset
66 --with-mpfr='$(HOST_PREFIX)' \
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
67 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'")
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
68
3511
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 '$(JOBS)'
799dcef88a41 Install native binutils and gcc directly in host directory tree.
John W. Eaton <jwe@octave.org>
parents: 3480
diff changeset
70 $(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
71
7fe77aaeb070 native-gcc.mk: move libgcc_s.a to directory searched by ld
John W. Eaton <jwe@octave.org>
parents: 3556
diff changeset
72 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
73 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
74 fi
3944
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
75
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
76 if [ -f $(HOST_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a ]; then \
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
77 mv $(HOST_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a $(HOST_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/32/libgcc_s.a; \
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
78 fi
d83f02205481 native-gcc: compile as multilib in win64
John Donoghue
parents: 3934
diff changeset
79
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
80 endef