Mercurial > mxe-octave
annotate src/gcc.mk @ 2769:072676f75749
update package gcc
author | Mark Brand <mabrand@mabrand.nl> |
---|---|
date | Thu, 20 Sep 2012 16:25:00 +0200 |
parents | 7dece766f419 |
children | 47558e958113 |
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 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
4 PKG := gcc |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
5 $(PKG)_IGNORE := |
2769 | 6 $(PKG)_CHECKSUM := a464ba0f26eef24c29bcd1e7489421117fb9ee35 |
504
0fd340b5a6a8
improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents:
475
diff
changeset
|
7 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) |
0fd340b5a6a8
improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents:
475
diff
changeset
|
8 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 |
0fd340b5a6a8
improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents:
475
diff
changeset
|
9 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) |
2769 | 10 $(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) |
1029
462deba73d49
bugfix: remove mingwrt-dll from the dependencies of package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
1024
diff
changeset
|
11 $(PKG)_DEPS := mingwrt w32api binutils gcc-gmp gcc-mpc gcc-mpfr |
115
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 |
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
14 $(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
|
15 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ |
1799
53a080f97374
package gcc: fix update macro
Mark Brand <mabrand@mabrand.nl>
parents:
1759
diff
changeset
|
16 grep -v '^4\.[543]\.' | \ |
504
0fd340b5a6a8
improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents:
475
diff
changeset
|
17 head -1 |
115
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 endef |
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 |
938
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
20 define $(PKG)_BUILD |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
21 # unpack support libraries |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
22 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-gmp) |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
23 mv '$(1)/$(gcc-gmp_SUBDIR)' '$(1)/gmp' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
24 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpc) |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
25 mv '$(1)/$(gcc-mpc_SUBDIR)' '$(1)/mpc' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
26 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr) |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
27 mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr' |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
28 |
795dbc19e055
detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
922
diff
changeset
|
29 # build GCC and support libraries |
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
|
30 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
|
31 cd '$(1).build' && '$(1)/configure' \ |
444
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
32 --target='$(TARGET)' \ |
2153
e4c83fa61a5b
replaced $(BUILD) with a more direct and less brittle construct
Volker Grabsch <vog@notjusthosting.com>
parents:
2151
diff
changeset
|
33 --build="`config.guess`" \ |
444
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
34 --prefix='$(PREFIX)' \ |
1950
f97ce88183f5
packages gcc libmikmod: explicitly specify --libdir
Mark Brand <mabrand@mabrand.nl>
parents:
1905
diff
changeset
|
35 --libdir='$(PREFIX)/lib' \ |
444
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
36 --enable-languages='c,c++,objc,fortran' \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
37 --enable-version-specific-runtime-libs \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
38 --with-gcc \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
39 --with-gnu-ld \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
40 --with-gnu-as \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
41 --disable-nls \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
42 --disable-shared \ |
1759
544f2ac34b4d
disable SJLJ exceptions explicitly, as those cause trouble
Kay Hayen <kayhayen@gmx.de>
parents:
1692
diff
changeset
|
43 --disable-sjlj-exceptions \ |
444
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
44 --without-x \ |
c828215f90ae
enable libgomp (OpenMP) in package gcc by interweaving the pthread build into the gcc build
Volker Grabsch <vog@notjusthosting.com>
parents:
426
diff
changeset
|
45 --disable-win32-registry \ |
943
bc40d4f60207
provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
942
diff
changeset
|
46 --enable-threads=win32 \ |
bc40d4f60207
provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
942
diff
changeset
|
47 --disable-libgomp \ |
2010 | 48 --disable-libmudflap \ |
49 --with-mpfr-include='$(1)/mpfr/src' \ | |
2731
7dece766f419
package gcc: fix for OSX ASLR issues with pre-compiled headers
Tony Theodore <tonyt@logyst.com>
parents:
2707
diff
changeset
|
50 --with-mpfr-lib='$(1).build/mpfr/src/.libs' \ |
7dece766f419
package gcc: fix for OSX ASLR issues with pre-compiled headers
Tony Theodore <tonyt@logyst.com>
parents:
2707
diff
changeset
|
51 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
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
|
52 $(MAKE) -C '$(1).build' -j '$(JOBS)' |
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
|
53 $(MAKE) -C '$(1).build' -j 1 install |
695
b930f92b1f77
use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
650
diff
changeset
|
54 |
b930f92b1f77
use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
650
diff
changeset
|
55 # create pkg-config script |
b930f92b1f77
use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
650
diff
changeset
|
56 (echo '#!/bin/sh'; \ |
1504
dfa937baa17b
improved pkg-config wrapper and its documentation
Volker Grabsch <vog@notjusthosting.com>
parents:
1320
diff
changeset
|
57 echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(PREFIX)/$(TARGET)/lib/pkgconfig'\'' exec pkg-config --static "$$@"') \ |
695
b930f92b1f77
use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
650
diff
changeset
|
58 > '$(PREFIX)/bin/$(TARGET)-pkg-config' |
b930f92b1f77
use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
650
diff
changeset
|
59 chmod 0755 '$(PREFIX)/bin/$(TARGET)-pkg-config' |
2329
466e77a78672
Fix annoying whitespaces at EOL
Volker Grabsch <vog@notjusthosting.com>
parents:
2296
diff
changeset
|
60 |
1663
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
61 # create the CMake toolchain file |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
62 [ -d '$(dir $(CMAKE_TOOLCHAIN_FILE))' ] || mkdir -p '$(dir $(CMAKE_TOOLCHAIN_FILE))' |
2707
4c2874e00f0c
Move CMAKE_BUILD_TYPE into toolchain file
Volker Grabsch <vog@notjusthosting.com>
parents:
2706
diff
changeset
|
63 (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \ |
1965
2a749f1c6756
additional variable for the cmake toolchain file
Zach Thibeau <zachary.thibeau@gmail.com>
parents:
1950
diff
changeset
|
64 echo 'set(MSYS 1)'; \ |
2707
4c2874e00f0c
Move CMAKE_BUILD_TYPE into toolchain file
Volker Grabsch <vog@notjusthosting.com>
parents:
2706
diff
changeset
|
65 echo 'set(BUILD_SHARED_LIBS OFF)'; \ |
4c2874e00f0c
Move CMAKE_BUILD_TYPE into toolchain file
Volker Grabsch <vog@notjusthosting.com>
parents:
2706
diff
changeset
|
66 echo 'set(CMAKE_BUILD_TYPE Release)'; \ |
1663
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
67 echo 'set(CMAKE_FIND_ROOT_PATH $(PREFIX)/$(TARGET))'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
68 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
69 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
70 echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
71 echo 'set(CMAKE_C_COMPILER $(PREFIX)/bin/$(TARGET)-gcc)'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
72 echo 'set(CMAKE_CXX_COMPILER $(PREFIX)/bin/$(TARGET)-g++)'; \ |
2092
5af000bfab36
add cmake definition for fortran
Mark Brand <mabrand@mabrand.nl>
parents:
2054
diff
changeset
|
73 echo 'set(CMAKE_Fortran_COMPILER $(PREFIX)/bin/$(TARGET)-gfortran)'; \ |
1663
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
74 echo 'set(CMAKE_RC_COMPILER $(PREFIX)/bin/$(TARGET)-windres)'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
75 echo 'set(PKG_CONFIG_EXECUTABLE $(PREFIX)/bin/$(TARGET)-pkg-config)'; \ |
2015
b289b25fa9c0
set QT_QMAKE_EXECUTABLE in cmake toolchain file
Mark Brand <mabrand@mabrand.nl>
parents:
2010
diff
changeset
|
76 echo 'set(QT_QMAKE_EXECUTABLE $(PREFIX)/bin/$(TARGET)-qmake)'; \ |
1663
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
77 echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
78 echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \ |
9577f70222f8
add cmake toolchain file and simplify build rules of relevant packages
Tony Theodore <tonyt@logyst.com>
parents:
1524
diff
changeset
|
79 > '$(CMAKE_TOOLCHAIN_FILE)' |
115
ae21cae1b378
translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
80 endef |