Mercurial > mxe-octave
comparison src/native-gcc.mk @ 3511:799dcef88a41
Install native binutils and gcc directly in host directory tree.
Don't install them separate in native-tools directory tree.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 07 Feb 2014 12:51:01 -0500 |
parents | 13be64f9f16d |
children | 1b350761007f |
comparison
equal
deleted
inserted
replaced
3510:40a589c403d6 | 3511:799dcef88a41 |
---|---|
1 # This file is part of MXE. | 1 # This file is part of MXE. |
2 # See index.html for further information. | 2 # See index.html for further information. |
3 | 3 |
4 PKG := native-gcc | 4 PKG := native-gcc |
5 $(PKG)_IGNORE := | 5 $(PKG)_IGNORE := |
6 $(PKG)_VERSION := 4.8.1 | 6 $(PKG)_VERSION := 4.8.2 |
7 $(PKG)_CHECKSUM := 4e655032cda30e1928fcc3f00962f4238b502169 | 7 $(PKG)_CHECKSUM := 810fb70bd721e1d9f446b6503afe0a9088b62986 |
8 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) | 8 $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) |
9 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 | 9 $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 |
10 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) | 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) | 11 $(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) |
12 $(PKG)_DEPS := mingwrt w32api build-binutils gcc-gmp gcc-mpc gcc-mpfr | 12 |
13 $(PKG)_DEPS := native-binutils cloog gmp isl mpc mpfr | |
14 ifeq ($(MXE_SYSTEM),mingw) | |
15 ifeq ($(ENABLE_64),yes) | |
16 $(PKG)_DEPS += mingw-w64 | |
17 else | |
18 $(PKG)_DEPS += mingwrt w32api | |
19 endif | |
20 endif | |
13 ifneq ($(BUILD_SHARED),yes) | 21 ifneq ($(BUILD_SHARED),yes) |
14 $(PKG)_STATIC_FLAG := --static | 22 $(PKG)_STATIC_FLAG := --static |
23 endif | |
24 | |
25 ifeq ($(MXE_SYSTEM),mingw) | |
26 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ | |
27 --enable-version-specific-runtime-libs \ | |
28 --disable-nls \ | |
29 --without-x \ | |
30 --disable-win32-registry \ | |
31 --enable-threads=win32 \ | |
32 --with-native-system-header-dir=$(HOST_PREFIX)/include | |
33 ifneq ($(ENABLE_64),yes) | |
34 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ | |
35 --disable-sjlj-exceptions | |
36 endif | |
15 endif | 37 endif |
16 | 38 |
17 define $(PKG)_UPDATE | 39 define $(PKG)_UPDATE |
18 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ | 40 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ |
19 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ | 41 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ |
20 grep -v '^4\.[543]\.' | \ | 42 grep -v '^4\.[543]\.' | \ |
21 head -1 | 43 head -1 |
22 endef | 44 endef |
23 | 45 |
24 define $(PKG)_BUILD | 46 define $(PKG)_BUILD |
25 # unpack support libraries | 47 # configure gcc |
26 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-gmp,$(TAR)) | |
27 mv '$(1)/$(gcc-gmp_SUBDIR)' '$(1)/gmp' | |
28 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpc,$(TAR)) | |
29 mv '$(1)/$(gcc-mpc_SUBDIR)' '$(1)/mpc' | |
30 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr,$(TAR)) | |
31 mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr' | |
32 | |
33 # build GCC and support libraries | |
34 mkdir '$(1).build' | 48 mkdir '$(1).build' |
35 cd '$(1).build' && '$(1)/configure' \ | 49 cd '$(1).build' && '$(1)/configure' \ |
36 --target='$(TARGET)' \ | 50 --target='$(TARGET)' \ |
37 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ | 51 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
38 --prefix='/usr' \ | 52 --prefix='$(HOST_PREFIX)' \ |
39 --libdir='/usr/lib' \ | |
40 --enable-languages='c,c++,fortran' \ | 53 --enable-languages='c,c++,fortran' \ |
41 --enable-version-specific-runtime-libs \ | 54 --disable-multilib \ |
42 --with-gcc \ | 55 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ |
43 --with-gnu-ld \ | |
44 --with-gnu-as \ | |
45 --disable-nls \ | |
46 $(ENABLE_SHARED_OR_STATIC) \ | 56 $(ENABLE_SHARED_OR_STATIC) \ |
47 --disable-sjlj-exceptions \ | |
48 --without-x \ | |
49 --disable-win32-registry \ | |
50 --enable-threads=win32 \ | |
51 --disable-libgomp \ | 57 --disable-libgomp \ |
52 --disable-libmudflap \ | 58 --disable-libmudflap \ |
53 --with-mpfr-include='$(1)/mpfr/src' \ | |
54 --with-mpfr-lib='$(1).build/mpfr/src/.libs' \ | |
55 --with-native-system-header-dir=$(HOST_INCDIR) \ | |
56 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") | 59 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
60 | |
57 $(MAKE) -C '$(1).build' -j '$(JOBS)' | 61 $(MAKE) -C '$(1).build' -j '$(JOBS)' |
58 $(MAKE) -C '$(1).build' -j 1 DESTDIR='$(TOP_DIR)/native-tools' install | 62 $(MAKE) -C '$(1).build' -j 1 install |
59 | |
60 # # create pkg-config script | |
61 # (echo '#!/bin/sh'; \ | |
62 # echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(HOST_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \ | |
63 # > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config' | |
64 # chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config' | |
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)'; \ | |
81 # echo 'set(CMAKE_FIND_ROOT_PATH $(HOST_PREFIX))'; \ | |
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)'; \ | |
85 # echo 'set(CMAKE_C_COMPILER $(MXE_CC))'; \ | |
86 # echo 'set(CMAKE_CXX_COMPILER $(MXE_CXX))'; \ | |
87 # echo 'set(CMAKE_Fortran_COMPILER $(MXE_F77))'; \ | |
88 # echo 'set(CMAKE_RC_COMPILER $(MXE_WINDRES))'; \ | |
89 # echo 'set(PKG_CONFIG_EXECUTABLE $(MXE_PKG_CONFIG))'; \ | |
90 # echo 'set(QT_QMAKE_EXECUTABLE $(MXE_QMAKE))'; \ | |
91 # echo 'set(CMAKE_INSTALL_PREFIX $(HOST_PREFIX) CACHE PATH "Installation Prefix")'; \ | |
92 # echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \ | |
93 # > '$(CMAKE_TOOLCHAIN_FILE)' | |
94 endef | 63 endef |