# HG changeset patch # User John D # Date 1424202503 18000 # Node ID 7e15ef9bf1e52030f65684ea3f1e32a24419e98a # Parent f2776007d295b7af58a0bbddd6913243d3a4252f 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. diff -r f2776007d295 -r 7e15ef9bf1e5 dist-files.mk --- a/dist-files.mk Tue Feb 17 18:55:38 2015 -0500 +++ b/dist-files.mk Tue Feb 17 14:48:23 2015 -0500 @@ -644,6 +644,7 @@ wavpack-1-exec_prefix.patch \ wavpack.mk \ wget.mk \ + win64-nsis.patch \ winpcap-1-fixes.patch \ winpcap.mk \ wt-1-fixes.patch \ diff -r f2776007d295 -r 7e15ef9bf1e5 src/build-binutils.mk --- a/src/build-binutils.mk Tue Feb 17 18:55:38 2015 -0500 +++ b/src/build-binutils.mk Tue Feb 17 14:48:23 2015 -0500 @@ -12,11 +12,13 @@ $(PKG)_DEPS := ifneq ($(MXE_NATIVE_BUILD),yes) +ifneq ($(ENABLE_WINDOWS_64),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 +endif define $(PKG)_UPDATE $(WGET) -q -O- 'http://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \ @@ -31,9 +33,18 @@ $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ --target='$(TARGET)' \ --build='$(BUILD_SYSTEM)' \ - --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ - --disable-multilib \ - --with-sysroot='$(HOST_PREFIX)' + + ifeq ($(ENABLE_WINDOWS_64),yes) + $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ + --enable-multilib \ + --with-sysroot='$(BUILD_TOOLS_PREFIX)' \ + --enable-targets=x86_64-w64-mingw32,i686-w64-mingw32 + else + $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ + --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ + --disable-multilib \ + --with-sysroot='$(HOST_PREFIX)' + endif endif define $(PKG)_BUILD diff -r f2776007d295 -r 7e15ef9bf1e5 src/build-gcc.mk --- 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'; \ diff -r f2776007d295 -r 7e15ef9bf1e5 src/nsis.mk --- a/src/nsis.mk Tue Feb 17 18:55:38 2015 -0500 +++ b/src/nsis.mk Tue Feb 17 14:48:23 2015 -0500 @@ -16,7 +16,19 @@ $(SED) -n 's,.*