Mercurial > mxe-octave
diff src/build-gcc.mk @ 3804:7e15ef9bf1e5
Update build-gcc, nsis to compile when in w64 mode.
* src/build-binutils.mk: add windows 64 conditionals to binutils to compile multilib
* src/build-gcc.mk:add windows 64 conditionals to gcc to compile multilib
* src/nsis.mk: add PKG_BUILD target for windows 64
* src/win64-nsis.patch: new file.
* dist-files.mk: add reference to win64-nsis.patch.
author | John D |
---|---|
date | Tue, 17 Feb 2015 14:48:23 -0500 |
parents | eba1c6e9cbb8 |
children | 7da91c8c58f9 |
line wrap: on
line diff
--- a/src/build-gcc.mk Tue Feb 17 18:55:38 2015 -0500 +++ b/src/build-gcc.mk Tue Feb 17 14:48:23 2015 -0500 @@ -24,7 +24,6 @@ ifeq ($(MXE_SYSTEM),mingw) $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ - --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ --enable-version-specific-runtime-libs \ --with-gcc \ --with-gnu-ld \ @@ -32,11 +31,26 @@ --disable-nls \ --without-x \ --disable-win32-registry \ - --with-native-system-header-dir='/include' \ --enable-threads=win32 ifneq ($(TARGET),x86_64-w64-mingw32) $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ + --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ + --with-native-system-header-dir='/include' \ --disable-sjlj-exceptions + else + define $(PKG)_PRE_BUILD + echo "Shortcuts" + # create shortcuts + if ! [ -L $(HOST_PREFIX)/lib64 ]; then \ + ln -s $(HOST_PREFIX)/lib $(HOST_PREFIX)/lib64; \ + fi + if ! [ -d $(HOST_PREFIX)/lib32 ]; then \ + mkdir -p $(HOST_PREFIX)/lib32; \ + fi + if ! [ -L $(BUILD_TOOLS_PREFIX)/mingw ]; then \ + ln -s $(HOST_PREFIX) $(BUILD_TOOLS_PREFIX)/mingw; \ + fi + endef endif define $(PKG)_BUILD_SYSTEM_RUNTIME # build standalone gcc @@ -60,10 +74,21 @@ $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ --target='$(TARGET)' \ --build='$(BUILD_SYSTEM)' \ - --with-sysroot='$(HOST_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' + + ifeq ($(ENABLE_WINDOWS_64),yes) + $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(BUILD_TOOLS_PREFIX)' \ + --enable-multilib --with-host-libstdcxx="-lstdc++ -lsupc++" --with-system-zlib \ + --enable-64bit --enable-fully-dynamic-string + else + $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(HOST_PREFIX)' \ + --disable-multilib + endif +else + $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ + --disable-multilib endif define $(PKG)_UPDATE @@ -79,7 +104,6 @@ cd '$(1).build' && '$(1)/configure' \ --prefix='$(BUILD_TOOLS_PREFIX)' \ --enable-languages='c,c++,fortran' \ - --disable-multilib \ --disable-libsanitizer \ $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ $(ENABLE_SHARED_OR_STATIC) \ @@ -93,6 +117,8 @@ endef define $(PKG)_BUILD + $($(PKG)_PRE_BUILD) + $($(PKG)_CONFIGURE) $($(PKG)_BUILD_SYSTEM_RUNTIME) @@ -105,6 +131,11 @@ mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \ fi + if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a ]; then \ + mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/32/libgcc_s.a; \ + fi + + # create pkg-config script if [ '$(MXE_NATIVE_BUILD)' = 'no' ]; then \ (echo '#!/bin/sh'; \