changeset 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 40a589c403d6
children 3df664b02b15
files src/native-binutils.mk src/native-gcc.mk
diffstat 2 files changed, 33 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- a/src/native-binutils.mk	Fri Feb 07 12:49:43 2014 -0500
+++ b/src/native-binutils.mk	Fri Feb 07 12:51:01 2014 -0500
@@ -30,7 +30,7 @@
     cd '$(1)' && ./configure \
         --target='$(TARGET)' \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
-        --prefix='/usr' \
+        --prefix='$(HOST_PREFIX)' \
         --with-gcc \
         --with-gnu-ld \
         --with-gnu-as \
@@ -38,5 +38,5 @@
         $(ENABLE_SHARED_OR_STATIC) \
         --disable-werror
     $(MAKE) -C '$(1)' -j '$(JOBS)'
-    $(MAKE) -C '$(1)' -j 1 DESTDIR='$(TOP_DIR)/native-tools' install
+    $(MAKE) -C '$(1)' -j 1 install
 endef
--- a/src/native-gcc.mk	Fri Feb 07 12:49:43 2014 -0500
+++ b/src/native-gcc.mk	Fri Feb 07 12:51:01 2014 -0500
@@ -3,17 +3,39 @@
 
 PKG             := native-gcc
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 4.8.1
-$(PKG)_CHECKSUM := 4e655032cda30e1928fcc3f00962f4238b502169
+$(PKG)_VERSION  := 4.8.2
+$(PKG)_CHECKSUM := 810fb70bd721e1d9f446b6503afe0a9088b62986
 $(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 build-binutils gcc-gmp gcc-mpc gcc-mpfr
+
+$(PKG)_DEPS := native-binutils cloog gmp isl mpc mpfr
+ifeq ($(MXE_SYSTEM),mingw)
+  ifeq ($(ENABLE_64),yes)
+    $(PKG)_DEPS += mingw-w64
+  else
+    $(PKG)_DEPS += mingwrt w32api
+  endif
+endif
 ifneq ($(BUILD_SHARED),yes)
 $(PKG)_STATIC_FLAG := --static
 endif
 
+ifeq ($(MXE_SYSTEM),mingw)
+  $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \
+    --enable-version-specific-runtime-libs \
+    --disable-nls \
+    --without-x \
+    --disable-win32-registry \
+    --enable-threads=win32 \
+    --with-native-system-header-dir=$(HOST_PREFIX)/include
+  ifneq ($(ENABLE_64),yes)
+    $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
+      --disable-sjlj-exceptions
+  endif
+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' | \
@@ -22,73 +44,20 @@
 endef
 
 define $(PKG)_BUILD
-    # unpack support libraries
-    cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-gmp,$(TAR))
-    mv '$(1)/$(gcc-gmp_SUBDIR)' '$(1)/gmp'
-    cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpc,$(TAR))
-    mv '$(1)/$(gcc-mpc_SUBDIR)' '$(1)/mpc'
-    cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr,$(TAR))
-    mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr'
-
-    # build GCC and support libraries
+    # configure gcc
     mkdir '$(1).build'
     cd    '$(1).build' && '$(1)/configure' \
         --target='$(TARGET)' \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
-        --prefix='/usr' \
-        --libdir='/usr/lib' \
+        --prefix='$(HOST_PREFIX)' \
         --enable-languages='c,c++,fortran' \
-        --enable-version-specific-runtime-libs \
-        --with-gcc \
-        --with-gnu-ld \
-        --with-gnu-as \
-        --disable-nls \
+        --disable-multilib \
+        $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \
         $(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=$(HOST_INCDIR) \
         $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'")
-    $(MAKE) -C '$(1).build' -j '$(JOBS)'
-    $(MAKE) -C '$(1).build' -j 1 DESTDIR='$(TOP_DIR)/native-tools' install
-
-    # # create pkg-config script
-    # (echo '#!/bin/sh'; \
-    #  echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(HOST_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \
-    #          > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'
-    # chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)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 $(HOST_PREFIX))'; \
-    #  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 $(MXE_CC))'; \
-    #  echo 'set(CMAKE_CXX_COMPILER $(MXE_CXX))'; \
-    #  echo 'set(CMAKE_Fortran_COMPILER $(MXE_F77))'; \
-    #  echo 'set(CMAKE_RC_COMPILER $(MXE_WINDRES))'; \
-    #  echo 'set(PKG_CONFIG_EXECUTABLE $(MXE_PKG_CONFIG))'; \
-    #  echo 'set(QT_QMAKE_EXECUTABLE $(MXE_QMAKE))'; \
-    #  echo 'set(CMAKE_INSTALL_PREFIX $(HOST_PREFIX) CACHE PATH "Installation Prefix")'; \
-    #  echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \
-    #  > '$(CMAKE_TOOLCHAIN_FILE)'
+    $(MAKE) -C '$(1).build' -j '$(JOBS)'
+    $(MAKE) -C '$(1).build' -j 1 install
 endef