Mercurial > mxe-octave
annotate src/native-gcc.mk @ 3480:13be64f9f16d
move version info from index.html to src/*.mk files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 31 Jan 2014 16:04:01 -0500 |
parents | e3944cf36a54 |
children | 799dcef88a41 |
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 := | |
3480
13be64f9f16d
move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents:
3250
diff
changeset
|
6 $(PKG)_VERSION := 4.8.1 |
3250
e3944cf36a54
update native gcc version to match build-gcc version
John W. Eaton <jwe@octave.org>
parents:
3174
diff
changeset
|
7 $(PKG)_CHECKSUM := 4e655032cda30e1928fcc3f00962f4238b502169 |
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) | |
3058 | 12 $(PKG)_DEPS := mingwrt w32api build-binutils gcc-gmp gcc-mpc gcc-mpfr |
2915 | 13 ifneq ($(BUILD_SHARED),yes) |
14 $(PKG)_STATIC_FLAG := --static | |
15 endif | |
16 | |
17 define $(PKG)_UPDATE | |
18 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ | |
19 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ | |
20 grep -v '^4\.[543]\.' | \ | |
21 head -1 | |
22 endef | |
23 | |
24 define $(PKG)_BUILD | |
25 # unpack support libraries | |
3174
6e323510f5b5
Fix calls to UNPACK_PKG_ARCHIVE in src/*.mk files.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3058
diff
changeset
|
26 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-gmp,$(TAR)) |
2915 | 27 mv '$(1)/$(gcc-gmp_SUBDIR)' '$(1)/gmp' |
3174
6e323510f5b5
Fix calls to UNPACK_PKG_ARCHIVE in src/*.mk files.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3058
diff
changeset
|
28 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpc,$(TAR)) |
2915 | 29 mv '$(1)/$(gcc-mpc_SUBDIR)' '$(1)/mpc' |
3174
6e323510f5b5
Fix calls to UNPACK_PKG_ARCHIVE in src/*.mk files.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3058
diff
changeset
|
30 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr,$(TAR)) |
2915 | 31 mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr' |
32 | |
33 # build GCC and support libraries | |
34 mkdir '$(1).build' | |
35 cd '$(1).build' && '$(1)/configure' \ | |
36 --target='$(TARGET)' \ | |
3013
bcc26ffe9a0f
use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
37 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
2915 | 38 --prefix='/usr' \ |
39 --libdir='/usr/lib' \ | |
3016
c94807091658
native-gcc.mk: don't build objective C compiler
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
40 --enable-languages='c,c++,fortran' \ |
2915 | 41 --enable-version-specific-runtime-libs \ |
42 --with-gcc \ | |
43 --with-gnu-ld \ | |
44 --with-gnu-as \ | |
45 --disable-nls \ | |
46 $(ENABLE_SHARED_OR_STATIC) \ | |
47 --disable-sjlj-exceptions \ | |
48 --without-x \ | |
49 --disable-win32-registry \ | |
50 --enable-threads=win32 \ | |
51 --disable-libgomp \ | |
52 --disable-libmudflap \ | |
53 --with-mpfr-include='$(1)/mpfr/src' \ | |
54 --with-mpfr-lib='$(1).build/mpfr/src/.libs' \ | |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
55 --with-native-system-header-dir=$(HOST_INCDIR) \ |
2915 | 56 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
57 $(MAKE) -C '$(1).build' -j '$(JOBS)' | |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
58 $(MAKE) -C '$(1).build' -j 1 DESTDIR='$(TOP_DIR)/native-tools' install |
2915 | 59 |
60 # # create pkg-config script | |
61 # (echo '#!/bin/sh'; \ | |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
62 # echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(HOST_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \ |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
63 # > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config' |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
64 # chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config' |
2915 | 65 |
66 # # create the CMake toolchain file | |
67 # [ -d '$(dir $(CMAKE_TOOLCHAIN_FILE))' ] || mkdir -p '$(dir $(CMAKE_TOOLCHAIN_FILE))' | |
68 # (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \ | |
69 # echo 'set(MSYS 1)'; \ | |
70 # if [ $(BUILD_SHARED) = yes ]; then \ | |
71 # echo 'set(BUILD_SHARED_LIBS ON)'; \ | |
72 # else \ | |
73 # echo 'set(BUILD_SHARED_LIBS OFF)'; \ | |
74 # fi; \ | |
75 # if [ $(BUILD_STATIC) = yes ]; then \ | |
76 # echo 'set(BUILD_STATIC_LIBS ON)'; \ | |
77 # else \ | |
78 # echo 'set(BUILD_STATIC_LIBS OFF)'; \ | |
79 # fi; \ | |
80 # echo 'set(CMAKE_BUILD_TYPE Release)'; \ | |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
81 # echo 'set(CMAKE_FIND_ROOT_PATH $(HOST_PREFIX))'; \ |
2915 | 82 # echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \ |
83 # echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \ | |
84 # echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \ | |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
85 # echo 'set(CMAKE_C_COMPILER $(MXE_CC))'; \ |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
86 # echo 'set(CMAKE_CXX_COMPILER $(MXE_CXX))'; \ |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
87 # echo 'set(CMAKE_Fortran_COMPILER $(MXE_F77))'; \ |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
88 # echo 'set(CMAKE_RC_COMPILER $(MXE_WINDRES))'; \ |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
89 # echo 'set(PKG_CONFIG_EXECUTABLE $(MXE_PKG_CONFIG))'; \ |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3016
diff
changeset
|
90 # echo 'set(QT_QMAKE_EXECUTABLE $(MXE_QMAKE))'; \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2997
diff
changeset
|
91 # echo 'set(CMAKE_INSTALL_PREFIX $(HOST_PREFIX) CACHE PATH "Installation Prefix")'; \ |
2915 | 92 # echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \ |
93 # > '$(CMAKE_TOOLCHAIN_FILE)' | |
94 endef |