Mercurial > mxe-octave
annotate src/build-gcc.mk @ 7195:0247b4ede541 default tip @
maint: Merge release to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 10 May 2024 13:52:05 +0200 |
parents | 6bdeb0d431e0 |
children |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2329
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:
3031
diff
changeset
|
4 PKG := build-gcc |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
5 $(PKG)_IGNORE := |
6812
6bdeb0d431e0
* src/build-gcc.mk, src/native-gcc.mk: update to v13.2.0
John Donoghue <john.donoghue@ieee.org>
parents:
6697
diff
changeset
|
6 $(PKG)_VERSION := 13.2.0 |
6bdeb0d431e0
* src/build-gcc.mk, src/native-gcc.mk: update to v13.2.0
John Donoghue <john.donoghue@ieee.org>
parents:
6697
diff
changeset
|
7 $(PKG)_CHECKSUM := 5f95b6d042fb37d45c6cbebfc91decfbc4fb493c |
504
0fd340b5a6a8
improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents:
475
diff
changeset
|
8 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) |
4469 | 9 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.xz |
504
0fd340b5a6a8
improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents:
475
diff
changeset
|
10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) |
2769 | 11 $(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
12 |
5327
217b0a7a5730
* src/build-gcc.mk, src/native-gcc.mk: remove dependancy on cloog
John Donoghue
parents:
5205
diff
changeset
|
13 $(PKG)_DEPS := gcc-gmp gcc-isl gcc-mpc gcc-mpfr |
3542
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
14 ifneq ($(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
|
15 $(PKG)_DEPS += build-binutils |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
16 endif |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
17 ifeq ($(MXE_SYSTEM),mingw) |
3521
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
18 $(PKG)_DEPS += mingw-w64 |
2997 | 19 endif |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
20 |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2769
diff
changeset
|
21 ifneq ($(BUILD_SHARED),yes) |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
22 $(PKG)_STATIC_FLAG := --static |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2769
diff
changeset
|
23 endif |
115
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
24 |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
25 ifeq ($(MXE_SYSTEM),mingw) |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
26 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ |
3189
e028df4c0e31
omit some configure args for native build-gcc builds
John W. Eaton <jwe@octave.org>
parents:
3188
diff
changeset
|
27 --enable-version-specific-runtime-libs \ |
e028df4c0e31
omit some configure args for native build-gcc builds
John W. Eaton <jwe@octave.org>
parents:
3188
diff
changeset
|
28 --with-gcc \ |
e028df4c0e31
omit some configure args for native build-gcc builds
John W. Eaton <jwe@octave.org>
parents:
3188
diff
changeset
|
29 --with-gnu-ld \ |
e028df4c0e31
omit some configure args for native build-gcc builds
John W. Eaton <jwe@octave.org>
parents:
3188
diff
changeset
|
30 --with-gnu-as \ |
e028df4c0e31
omit some configure args for native build-gcc builds
John W. Eaton <jwe@octave.org>
parents:
3188
diff
changeset
|
31 --disable-nls \ |
e028df4c0e31
omit some configure args for native build-gcc builds
John W. Eaton <jwe@octave.org>
parents:
3188
diff
changeset
|
32 --without-x \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
33 --disable-win32-registry \ |
4606
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
34 --enable-threads=posix |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
35 |
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
|
36 ifneq ($(TARGET),x86_64-w64-mingw32) |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
37 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ |
3804
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
38 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
39 --with-native-system-header-dir='/include' \ |
5500
512e69a36d09
Use SSE2 instruction set for i686-w64 target (bug #58807).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5348
diff
changeset
|
40 --disable-sjlj-exceptions \ |
512e69a36d09
Use SSE2 instruction set for i686-w64 target (bug #58807).
Markus Mützel <markus.muetzel@gmx.de>
parents:
5348
diff
changeset
|
41 --with-specs='%{!mfpmath:-mfpmath=sse} %{!msse:%{!mno-sse:-msse}} %{!msse2:%{!mno-sse2:-msse2}}' |
3804
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
42 else |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
43 define $(PKG)_PRE_BUILD |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
44 echo "Shortcuts" |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
45 # create shortcuts |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
46 if ! [ -L $(BUILD_TOOLS_PREFIX)/mingw ]; then \ |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
47 ln -s $(HOST_PREFIX) $(BUILD_TOOLS_PREFIX)/mingw; \ |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
48 fi |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
49 endef |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
50 endif |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
51 |
6036
9ccca4b29aa3
gcc, mingw-w64: Set Windows API to Windows 7 for all Octave targets.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5975
diff
changeset
|
52 $(PKG)_WINAPI_VERSION_FLAGS := --with-default-win32-winnt=0x0601 |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
53 |
5961
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
54 ifneq ($(HOST_MSVCRT),ucrt) |
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
55 $(PKG)_DEFAULT_MSVCRT := --with-default-msvcrt=msvcrt |
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
56 else |
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
57 $(PKG)_DEFAULT_MSVCRT := --with-default-msvcrt=ucrt |
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
58 endif |
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
59 |
4615
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
60 define $(PKG)_INSTALL_SYSTEM_HEADERS |
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
61 $($(PKG)_PRE_BUILD) |
4606
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
62 # install mingw-w64 headers |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
63 $(call PREPARE_PKG_SOURCE,mingw-w64,$(1)) |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
64 mkdir '$(1).headers' |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
65 cd '$(1).headers' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \ |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
66 --host='$(TARGET)' \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
67 --prefix='$(HOST_PREFIX)' \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
68 --enable-sdk=all \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
69 --enable-idl \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
70 --enable-secure-api \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
71 $($(PKG)_WINAPI_VERSION_FLAGS) \ |
5961
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
72 $($(PKG)_DEFAULT_MSVCRT) \ |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
73 $(mingw-w64-headers_CONFIGURE_OPTS) |
4606
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
74 $(MAKE) -C '$(1).headers' install |
4615
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
75 endef |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
76 |
4615
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
77 define $(PKG)_BUILD_SYSTEM_RUNTIME |
3542
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
78 # build standalone gcc |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
79 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
80 $(MAKE) -C '$(1).build' -j 1 install-gcc |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
81 # build mingw-w64-crt |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
82 mkdir '$(1).crt-build' |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
83 cd '$(1).crt-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-crt/configure' \ |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
84 --host='$(TARGET)' \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
85 --prefix='$(HOST_PREFIX)' \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
86 $(if $(filter $(TARGET), x86_64-w64-mingw32),--disable-lib32) \ |
5961
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
87 --with-sysroot='$(HOST_PREFIX)' \ |
7c0066684448
Add support for building with UCRT on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5849
diff
changeset
|
88 $($(PKG)_DEFAULT_MSVCRT) |
3542
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
89 $(MAKE) -C '$(1).crt-build' -j '$(JOBS)' || $(MAKE) -C '$(1).crt-build' -j '$(JOBS)' |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
90 $(MAKE) -C '$(1).crt-build' -j 1 install |
4606
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
91 |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
92 # build posix threads |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
93 mkdir '$(1).pthreads' |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
94 cd '$(1).pthreads' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-libraries/winpthreads/configure' \ |
5732
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
95 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
96 --prefix='$(HOST_PREFIX)' \ |
055dec6c319b
Allow other packages to use newer Windows API functions.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5591
diff
changeset
|
97 $(ENABLE_SHARED_OR_STATIC) |
4606
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
98 $(MAKE) -C '$(1).pthreads' -j '$(JOBS)' || $(MAKE) -C '$(1).pthreads' -j '$(JOBS)' |
86c3c1fd16f1
build-gcc, native-gcc: build with --enable-threads=posix
John W. Eaton <jwe@octave.org>
parents:
4545
diff
changeset
|
99 $(MAKE) -C '$(1).pthreads' -j 1 install |
3542
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
100 endef |
6410
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
101 |
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
102 define $(PKG)_POST_BUILD |
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
103 # overwrite default specs to mimic stack protector handling of glibc |
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
104 # ./configure above doesn't do this |
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
105 '$(TARGET)-gcc' -dumpspecs > '$(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/specs' |
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
106 $(SED) -i 's,-lmingwex,-lmingwex -lssp_nonshared -lssp,' '$(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/specs' |
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
107 endef |
3542
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
108 endif |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
109 |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
110 ifneq ($(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
|
111 $(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
|
112 --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
|
113 --build='$(BUILD_SYSTEM)' \ |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
114 --with-as='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-as' \ |
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
115 --with-ld='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ld' \ |
4626 | 116 --with-nm='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-nm' \ |
117 --disable-multilib --with-host-libstdcxx="-lstdc++" --with-system-zlib | |
3804
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
118 |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
119 ifeq ($(ENABLE_WINDOWS_64),yes) |
4626 | 120 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ |
4812
053df833176d
* src/build-gcc.mk: disable win32 install when 64bit, dont create lib32/64 symlinks
John Donoghue
parents:
4678
diff
changeset
|
121 --enable-64bit --disable-32bit --enable-fully-dynamic-string |
3804
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
122 endif |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
123 else |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
124 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
125 --disable-multilib |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
126 endif |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
127 |
115
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
128 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
129 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ |
605
96fa8fada1dc
improved speed of version recognition for package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
504
diff
changeset
|
130 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ |
4545
0e56fe2d2ef5
Makefile.in: add update-build-tools target
John Donoghue <john.donoghue@ieee.org>
parents:
4469
diff
changeset
|
131 $(SORT) -V | \ |
0e56fe2d2ef5
Makefile.in: add update-build-tools target
John Donoghue <john.donoghue@ieee.org>
parents:
4469
diff
changeset
|
132 tail -1 |
115
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
133 endef |
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
134 |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
135 define $(PKG)_CONFIGURE |
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
136 # configure gcc |
1066
c7b2a7ef1bf9
use a build directory separate from the source directory in package gcc (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
1060
diff
changeset
|
137 mkdir '$(1).build' |
c7b2a7ef1bf9
use a build directory separate from the source directory in package gcc (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
1060
diff
changeset
|
138 cd '$(1).build' && '$(1)/configure' \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
139 --prefix='$(BUILD_TOOLS_PREFIX)' \ |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
140 --enable-languages='c,c++,fortran' \ |
3695
e4ce23a86225
disable libsanitizer for gcc builds
John W. Eaton <jwe@octave.org>
parents:
3684
diff
changeset
|
141 --disable-libsanitizer \ |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
142 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2769
diff
changeset
|
143 $(ENABLE_SHARED_OR_STATIC) \ |
943
bc40d4f60207
provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
942
diff
changeset
|
144 --disable-libgomp \ |
6410
7de412374c48
* src/build-gcc.mk: enable build ssp
John Donoghue <john.donoghue@ieee.org>
parents:
6369
diff
changeset
|
145 --enable-default-ssp \ |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
146 --with-cloog='$(BUILD_TOOLS_PREFIX)' \ |
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
147 --with-gmp='$(BUILD_TOOLS_PREFIX)' \ |
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
148 --with-isl='$(BUILD_TOOLS_PREFIX)' \ |
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
149 --with-mpc='$(BUILD_TOOLS_PREFIX)' \ |
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
150 --with-mpfr='$(BUILD_TOOLS_PREFIX)' \ |
2731
7dece766f419
package gcc: fix for OSX ASLR issues with pre-compiled headers
Tony Theodore <tonyt@logyst.com>
parents:
2707
diff
changeset
|
151 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
152 endef |
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
153 |
3521
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
154 define $(PKG)_BUILD |
4615
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
155 # Windows only. |
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
156 $($(PKG)_INSTALL_SYSTEM_HEADERS) |
3804
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
157 |
4615
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
158 # All systems. |
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
159 $($(PKG)_CONFIGURE) |
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
160 |
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
161 # Windows only. |
3542
bff3dfa5c343
make native linux builds work again, hopefully without breaking cross mingw builds...
John W. Eaton <jwe@octave.org>
parents:
3523
diff
changeset
|
162 $($(PKG)_BUILD_SYSTEM_RUNTIME) |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
163 |
4615
0539bcde3fa8
build-gcc.mk: fix build rules error on non-Windows systems
John W. Eaton <jwe@octave.org>
parents:
4606
diff
changeset
|
164 # Build rest of gcc. |
3521
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
165 $(MAKE) -C '$(1).build' -j '$(JOBS)' |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
166 $(MAKE) -C '$(1).build' -j 1 install |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
167 |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
168 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a ]; then \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
169 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
170 fi |
3496
3c7b3646d0b3
update to gcc 4.8.2 and allow building for MinGW-64
John W. Eaton <jwe@octave.org>
parents:
3480
diff
changeset
|
171 |
3804
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
172 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a ]; then \ |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
173 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/32/libgcc_s.a; \ |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
174 fi |
7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
John D
parents:
3735
diff
changeset
|
175 |
3521
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
176 # create pkg-config script |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
177 if [ '$(MXE_NATIVE_BUILD)' = 'no' ]; then \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
178 (echo '#!/bin/sh'; \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
179 echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(HOST_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
180 > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'; \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
181 chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'; \ |
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
182 fi |
695
b930f92b1f77
use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
650
diff
changeset
|
183 |
3521
2aaa6f511434
also use mingw-w64 sources for i686 build
John W. Eaton <jwe@octave.org>
parents:
3509
diff
changeset
|
184 $($(PKG)_POST_BUILD) |
3048
5ef49fb3299d
treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents:
3031
diff
changeset
|
185 endef |