Mercurial > mxe-octave
changeset 3509:3350681f52f2
Don't install cross tools in host directory tree.
Don't install cross tools separately in cross-tools directory tree.
Specify cross AS, LD, and NM programs explicitly when configuring GCC.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 07 Feb 2014 12:49:14 -0500 |
parents | a6b2b4f9532e |
children | 40a589c403d6 |
files | src/build-binutils.mk src/build-gcc.mk |
diffstat | 2 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/build-binutils.mk Fri Feb 07 12:45:35 2014 -0500 +++ b/src/build-binutils.mk Fri Feb 07 12:49:14 2014 -0500 @@ -15,6 +15,13 @@ $(PKG)_DEPS := build-gcc endif +ifneq ($(MXE_NATIVE_BUILD),yes) + define $(PKG)_POST_BUILD + $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' + mv $(addprefix $(HOST_PREFIX)/bin/, ar as dlltool ld ld.bfd nm objcopy objdump ranlib strip) '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' + endef +endif + 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' | \ @@ -45,5 +52,6 @@ --disable-werror $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install - $(MAKE) -C '$(1)' -j 1 DESTDIR=$(TOP_DIR)/cross-tools install + + $($(PKG)_POST_BUILD) endef
--- a/src/build-gcc.mk Fri Feb 07 12:45:35 2014 -0500 +++ b/src/build-gcc.mk Fri Feb 07 12:49:14 2014 -0500 @@ -47,6 +47,13 @@ head -1 endef +ifneq ($(MXE_NATIVE_BUILD),yes) + define $(PKG)_POST_BUILD + $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' + mv $(addprefix $(HOST_PREFIX)/bin/, c++ g++ gcc gfortran) '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)' + endef +endif + define $(PKG)_CONFIGURE # configure gcc mkdir '$(1).build' @@ -65,6 +72,9 @@ --with-isl='$(BUILD_TOOLS_PREFIX)' \ --with-mpc='$(BUILD_TOOLS_PREFIX)' \ --with-mpfr='$(BUILD_TOOLS_PREFIX)' \ + --with-as='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-as' \ + --with-ld='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ld' \ + --with-nm='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-nm' $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") endef @@ -113,5 +123,7 @@ > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'; \ chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'; \ fi + + $($(PKG)_POST_BUILD) endef