Mercurial > hg > mxe
changeset 3096:74304e21f1ab
native gcc and binutils
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 12 Dec 2012 09:54:24 -0500 |
parents | 0868a3b5e3e4 |
children | c90f5757f351 |
files | index.html src/native-binutils.mk src/native-gcc-1-float.patch src/native-gcc.mk |
diffstat | 4 files changed, 169 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/index.html +++ b/index.html @@ -999,6 +999,11 @@ <td id="cminpack-website"><a href="http://devernay.free.fr/hacks/cminpack/cminpack.html">cminpack</a></td> </tr> <tr> + <td id="coreutils-package">coreutils</td> + <td id="coreutils-version">8.20</td> + <td id="coreutils-website"><a href="http://www.gnu.org/software/coreutils/">coreutils</a></td> + </tr> + <tr> <td id="cppunit-package">cppunit</td> <td id="cppunit-version">1.12.1</td> <td id="cppunit-website"><a href="http://apps.sourceforge.net/mediawiki/cppunit/">CppUnit</a></td> @@ -1649,6 +1654,16 @@ <td id="mxml-website"><a href="http://www.minixml.org/">Mini-XML</a></td> </tr> <tr> + <td id="native-binutils-package">native-binutils</td> + <td id="native-binutils-version">2.23.1</td> + <td id="native-binutils-website"><a href="http://www.gnu.org/software/binutils/">GNU Binutils</a></td> + </tr> + <tr> + <td id="native-gcc-package">native-gcc</td> + <td id="native-gcc-version">4.7.2</td> + <td id="native-gcc-website"><a href="http://gcc.gnu.org/">GCC</a></td> + </tr> + <tr> <td id="ncurses-package">ncurses</td> <td id="ncurses-version">5.9</td> <td id="ncurses-website"><a href="http://www.gnu.org/software/ncurses/">Ncurses</a></td>
new file mode 100644 --- /dev/null +++ b/src/native-binutils.mk @@ -0,0 +1,42 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := native-binutils +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := 587fca86f6c85949576f4536a90a3c76ffc1a3e1 +$(PKG)_SUBDIR := binutils-$($(PKG)_VERSION) +$(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE) +$(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE) +$(PKG)_DEPS := + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \ + $(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \ + grep -v '^2\.1' | \ + head -1 +endef + +define $(PKG)_BUILD + # install config.guess for general use + $(INSTALL) -d '$(PREFIX)/../dist/usr/bin' + $(INSTALL) -m755 '$(1)/config.guess' '$(PREFIX)/../dist/usr/bin/' + + # install target-specific autotools config file + $(INSTALL) -d '$(PREFIX)/../dist/usr/share' + echo "ac_cv_build=`$(1)/config.guess`" > '$(PREFIX)/../dist/usr/share/config.site' + + cd '$(1)' && ./configure \ + --target='$(TARGET)' \ + --host='$(TARGET)' \ + --build="`config.guess`" \ + --prefix='/usr' \ + --with-gcc \ + --with-gnu-ld \ + --with-gnu-as \ + --disable-nls \ + $(ENABLE_SHARED_OR_STATIC) \ + --disable-werror + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 DESTDIR='$(PREFIX)/../native' install +endef
new file mode 100644 --- /dev/null +++ b/src/native-gcc-1-float.patch @@ -0,0 +1,18 @@ +This file is part of MXE. +See index.html for further information. + +This patch has been taken from: +http://gcc.gnu.org/ml/gcc-patches/2010-06/msg00387.html +http://sourceforge.net/tracker/?func=detail&atid=302435&aid=3011968&group_id=2435 + +diff -urN a/gcc/ginclude/float.h b/gcc/ginclude/float.h +--- a/gcc/ginclude/float.h 2009-04-09 17:00:19.000000000 +0200 ++++ b/gcc/ginclude/float.h 2010-06-05 12:03:41.887724045 +0200 +@@ -275,3 +275,7 @@ + #endif /* __STDC_WANT_DEC_FP__ */ + + #endif /* _FLOAT_H___ */ ++ ++#ifdef __MINGW32__ ++#include_next<float.h> ++#endif
new file mode 100644 --- /dev/null +++ b/src/native-gcc.mk @@ -0,0 +1,94 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := native-gcc +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := a464ba0f26eef24c29bcd1e7489421117fb9ee35 +$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) +$(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := mingwrt w32api binutils gcc-gmp gcc-mpc gcc-mpfr +ifneq ($(BUILD_SHARED),yes) +$(PKG)_STATIC_FLAG := --static +endif + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ + $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ + grep -v '^4\.[543]\.' | \ + head -1 +endef + +define $(PKG)_BUILD + # unpack support libraries + cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-gmp) + mv '$(1)/$(gcc-gmp_SUBDIR)' '$(1)/gmp' + cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpc) + mv '$(1)/$(gcc-mpc_SUBDIR)' '$(1)/mpc' + cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr) + mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr' + + # build GCC and support libraries + mkdir '$(1).build' + cd '$(1).build' && '$(1)/configure' \ + --target='$(TARGET)' \ + --host='$(TARGET)' \ + --build="`config.guess`" \ + --prefix='/usr' \ + --libdir='/usr/lib' \ + --enable-languages='c,c++,objc,fortran' \ + --enable-version-specific-runtime-libs \ + --with-gcc \ + --with-gnu-ld \ + --with-gnu-as \ + --disable-nls \ + $(ENABLE_SHARED_OR_STATIC) \ + --disable-sjlj-exceptions \ + --without-x \ + --disable-win32-registry \ + --enable-threads=win32 \ + --disable-libgomp \ + --disable-libmudflap \ + --with-mpfr-include='$(1)/mpfr/src' \ + --with-mpfr-lib='$(1).build/mpfr/src/.libs' \ + --with-native-system-header-dir=$(PREFIX)/$(TARGET)/include \ + $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 DESTDIR='$(PREFIX)/../native' install + + # # create pkg-config script + # (echo '#!/bin/sh'; \ + # echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(PREFIX)/$(TARGET)/lib/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \ + # > '$(PREFIX)/bin/$(TARGET)-pkg-config' + # chmod 0755 '$(PREFIX)/bin/$(TARGET)-pkg-config' + + # # create the CMake toolchain file + # [ -d '$(dir $(CMAKE_TOOLCHAIN_FILE))' ] || mkdir -p '$(dir $(CMAKE_TOOLCHAIN_FILE))' + # (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \ + # echo 'set(MSYS 1)'; \ + # if [ $(BUILD_SHARED) = yes ]; then \ + # echo 'set(BUILD_SHARED_LIBS ON)'; \ + # else \ + # echo 'set(BUILD_SHARED_LIBS OFF)'; \ + # fi; \ + # if [ $(BUILD_STATIC) = yes ]; then \ + # echo 'set(BUILD_STATIC_LIBS ON)'; \ + # else \ + # echo 'set(BUILD_STATIC_LIBS OFF)'; \ + # fi; \ + # echo 'set(CMAKE_BUILD_TYPE Release)'; \ + # echo 'set(CMAKE_FIND_ROOT_PATH $(PREFIX)/$(TARGET))'; \ + # echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \ + # echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \ + # echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \ + # echo 'set(CMAKE_C_COMPILER $(PREFIX)/bin/$(TARGET)-gcc)'; \ + # echo 'set(CMAKE_CXX_COMPILER $(PREFIX)/bin/$(TARGET)-g++)'; \ + # echo 'set(CMAKE_Fortran_COMPILER $(PREFIX)/bin/$(TARGET)-gfortran)'; \ + # echo 'set(CMAKE_RC_COMPILER $(PREFIX)/bin/$(TARGET)-windres)'; \ + # echo 'set(PKG_CONFIG_EXECUTABLE $(PREFIX)/bin/$(TARGET)-pkg-config)'; \ + # echo 'set(QT_QMAKE_EXECUTABLE $(PREFIX)/bin/$(TARGET)-qmake)'; \ + # echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \ + # echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \ + # > '$(CMAKE_TOOLCHAIN_FILE)' +endef