annotate src/gcc.mk @ 943:bc40d4f60207

provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 09 May 2010 19:00:16 +0200
parents 7922b096c74e
children 07e346dfcd76
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
641
dab071eac9c0 simplified file markers
Volker Grabsch <vog@notjusthosting.com>
parents: 605
diff changeset
1 # This file is part of mingw-cross-env.
714
29f1ba4559ae point consequently to "doc/index.html" instead of "doc/index.html or doc/README"
Volker Grabsch <vog@notjusthosting.com>
parents: 697
diff changeset
2 # See doc/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
504
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
4 # GCC
306
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 266
diff changeset
5 PKG := gcc
938
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
6 $(PKG)_IGNORE :=
922
7491ac97c72e upgrade package gcc to GCC 4.5, switching back from TDM to MinGW (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 897
diff changeset
7 $(PKG)_VERSION := 4.5.0
7491ac97c72e upgrade package gcc to GCC 4.5, switching back from TDM to MinGW (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 897
diff changeset
8 $(PKG)_CHECKSUM := 4beb8366ce1883f37255aa57f0258e7d3cd13a9b
504
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
9 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
10 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
11 $(PKG)_WEBSITE := http://gcc.gnu.org/
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
12 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
13 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
938
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
14 $(PKG)_DEPS := mingwrt mingwrt-dll w32api binutils gcc-gmp gcc-mpc gcc-mpfr
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 define $(PKG)_UPDATE
605
96fa8fada1dc improved speed of version recognition for package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 504
diff changeset
17 wget -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \
96fa8fada1dc improved speed of version recognition for package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 504
diff changeset
18 grep '<a href="gcc-' | \
96fa8fada1dc improved speed of version recognition for package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 504
diff changeset
19 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \
942
7922b096c74e avoid all old 4.4.x versions of package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 938
diff changeset
20 grep -v '^4\.4\.' | \
504
0fd340b5a6a8 improved structure of the gcc-* packages
Volker Grabsch <vog@notjusthosting.com>
parents: 475
diff changeset
21 head -1
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22 endef
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
23
938
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
24 define $(PKG)_BUILD
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
25 # unpack support libraries
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
26 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-gmp)
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
27 mv '$(1)/$(gcc-gmp_SUBDIR)' '$(1)/gmp'
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
28 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpc)
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
29 mv '$(1)/$(gcc-mpc_SUBDIR)' '$(1)/mpc'
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
30 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr)
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
31 mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr'
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
32
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
33 # build GCC and support libraries
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
34 mkdir '$(1)/build'
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
35 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
36 --target='$(TARGET)' \
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 --prefix='$(PREFIX)' \
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 --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
39 --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
40 --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
41 --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
42 --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
43 --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
44 --disable-shared \
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 --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
46 --disable-win32-registry \
938
795dbc19e055 detangle package pthreads from package gcc
Volker Grabsch <vog@notjusthosting.com>
parents: 922
diff changeset
47 --enable-sjlj-exceptions \
943
bc40d4f60207 provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 942
diff changeset
48 --enable-threads=win32 \
bc40d4f60207 provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 942
diff changeset
49 --disable-libgomp \
bc40d4f60207 provide GCC OpenMP functionality as extra package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents: 942
diff changeset
50 --disable-libmudflap
217
89ba55cd6e29 switch from MinGW GCC to TDM-GCC
Volker Grabsch <vog@notjusthosting.com>
parents: 143
diff changeset
51 $(MAKE) -C '$(1)/build' -j '$(JOBS)'
89ba55cd6e29 switch from MinGW GCC to TDM-GCC
Volker Grabsch <vog@notjusthosting.com>
parents: 143
diff changeset
52 $(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
53
b930f92b1f77 use the natively installed pkg-config instead of building a custom pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents: 650
diff changeset
54 # 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
55 (echo '#!/bin/sh'; \
731
2ffb38727a32 hardcode the --static argument into i686-pc-mingw32-pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents: 721
diff changeset
56 echo 'PKG_CONFIG_PATH= 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
57 > '$(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
58 chmod 0755 '$(PREFIX)/bin/$(TARGET)-pkg-config'
115
ae21cae1b378 translated packages: mingwrt, w32api, binutils, gcc
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
59 endef