Mercurial > mxe-octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
3803:f2776007d295 | 3804:7e15ef9bf1e5 |
---|---|
22 $(PKG)_STATIC_FLAG := --static | 22 $(PKG)_STATIC_FLAG := --static |
23 endif | 23 endif |
24 | 24 |
25 ifeq ($(MXE_SYSTEM),mingw) | 25 ifeq ($(MXE_SYSTEM),mingw) |
26 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ | 26 $(PKG)_SYSDEP_CONFIGURE_OPTIONS := \ |
27 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ | |
28 --enable-version-specific-runtime-libs \ | 27 --enable-version-specific-runtime-libs \ |
29 --with-gcc \ | 28 --with-gcc \ |
30 --with-gnu-ld \ | 29 --with-gnu-ld \ |
31 --with-gnu-as \ | 30 --with-gnu-as \ |
32 --disable-nls \ | 31 --disable-nls \ |
33 --without-x \ | 32 --without-x \ |
34 --disable-win32-registry \ | 33 --disable-win32-registry \ |
35 --with-native-system-header-dir='/include' \ | |
36 --enable-threads=win32 | 34 --enable-threads=win32 |
37 ifneq ($(TARGET),x86_64-w64-mingw32) | 35 ifneq ($(TARGET),x86_64-w64-mingw32) |
38 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ | 36 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ |
37 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ | |
38 --with-native-system-header-dir='/include' \ | |
39 --disable-sjlj-exceptions | 39 --disable-sjlj-exceptions |
40 else | |
41 define $(PKG)_PRE_BUILD | |
42 echo "Shortcuts" | |
43 # create shortcuts | |
44 if ! [ -L $(HOST_PREFIX)/lib64 ]; then \ | |
45 ln -s $(HOST_PREFIX)/lib $(HOST_PREFIX)/lib64; \ | |
46 fi | |
47 if ! [ -d $(HOST_PREFIX)/lib32 ]; then \ | |
48 mkdir -p $(HOST_PREFIX)/lib32; \ | |
49 fi | |
50 if ! [ -L $(BUILD_TOOLS_PREFIX)/mingw ]; then \ | |
51 ln -s $(HOST_PREFIX) $(BUILD_TOOLS_PREFIX)/mingw; \ | |
52 fi | |
53 endef | |
40 endif | 54 endif |
41 define $(PKG)_BUILD_SYSTEM_RUNTIME | 55 define $(PKG)_BUILD_SYSTEM_RUNTIME |
42 # build standalone gcc | 56 # build standalone gcc |
43 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc | 57 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc |
44 $(MAKE) -C '$(1).build' -j 1 install-gcc | 58 $(MAKE) -C '$(1).build' -j 1 install-gcc |
58 | 72 |
59 ifneq ($(MXE_NATIVE_BUILD),yes) | 73 ifneq ($(MXE_NATIVE_BUILD),yes) |
60 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ | 74 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ |
61 --target='$(TARGET)' \ | 75 --target='$(TARGET)' \ |
62 --build='$(BUILD_SYSTEM)' \ | 76 --build='$(BUILD_SYSTEM)' \ |
63 --with-sysroot='$(HOST_PREFIX)' \ | |
64 --with-as='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-as' \ | 77 --with-as='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-as' \ |
65 --with-ld='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ld' \ | 78 --with-ld='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ld' \ |
66 --with-nm='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-nm' | 79 --with-nm='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-nm' |
80 | |
81 ifeq ($(ENABLE_WINDOWS_64),yes) | |
82 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(BUILD_TOOLS_PREFIX)' \ | |
83 --enable-multilib --with-host-libstdcxx="-lstdc++ -lsupc++" --with-system-zlib \ | |
84 --enable-64bit --enable-fully-dynamic-string | |
85 else | |
86 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(HOST_PREFIX)' \ | |
87 --disable-multilib | |
88 endif | |
89 else | |
90 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ | |
91 --disable-multilib | |
67 endif | 92 endif |
68 | 93 |
69 define $(PKG)_UPDATE | 94 define $(PKG)_UPDATE |
70 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ | 95 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ |
71 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ | 96 $(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \ |
77 # configure gcc | 102 # configure gcc |
78 mkdir '$(1).build' | 103 mkdir '$(1).build' |
79 cd '$(1).build' && '$(1)/configure' \ | 104 cd '$(1).build' && '$(1)/configure' \ |
80 --prefix='$(BUILD_TOOLS_PREFIX)' \ | 105 --prefix='$(BUILD_TOOLS_PREFIX)' \ |
81 --enable-languages='c,c++,fortran' \ | 106 --enable-languages='c,c++,fortran' \ |
82 --disable-multilib \ | |
83 --disable-libsanitizer \ | 107 --disable-libsanitizer \ |
84 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ | 108 $($(PKG)_SYSDEP_CONFIGURE_OPTIONS) \ |
85 $(ENABLE_SHARED_OR_STATIC) \ | 109 $(ENABLE_SHARED_OR_STATIC) \ |
86 --disable-libgomp \ | 110 --disable-libgomp \ |
87 --with-cloog='$(BUILD_TOOLS_PREFIX)' \ | 111 --with-cloog='$(BUILD_TOOLS_PREFIX)' \ |
91 --with-mpfr='$(BUILD_TOOLS_PREFIX)' \ | 115 --with-mpfr='$(BUILD_TOOLS_PREFIX)' \ |
92 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") | 116 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") |
93 endef | 117 endef |
94 | 118 |
95 define $(PKG)_BUILD | 119 define $(PKG)_BUILD |
120 $($(PKG)_PRE_BUILD) | |
121 | |
96 $($(PKG)_CONFIGURE) | 122 $($(PKG)_CONFIGURE) |
97 | 123 |
98 $($(PKG)_BUILD_SYSTEM_RUNTIME) | 124 $($(PKG)_BUILD_SYSTEM_RUNTIME) |
99 | 125 |
100 # build rest of gcc | 126 # build rest of gcc |
103 | 129 |
104 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a ]; then \ | 130 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a ]; then \ |
105 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \ | 131 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \ |
106 fi | 132 fi |
107 | 133 |
134 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a ]; then \ | |
135 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib32/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/32/libgcc_s.a; \ | |
136 fi | |
137 | |
138 | |
108 # create pkg-config script | 139 # create pkg-config script |
109 if [ '$(MXE_NATIVE_BUILD)' = 'no' ]; then \ | 140 if [ '$(MXE_NATIVE_BUILD)' = 'no' ]; then \ |
110 (echo '#!/bin/sh'; \ | 141 (echo '#!/bin/sh'; \ |
111 echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(HOST_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \ | 142 echo 'PKG_CONFIG_PATH="$$PKG_CONFIG_PATH_$(subst -,_,$(TARGET))" PKG_CONFIG_LIBDIR='\''$(HOST_LIBDIR)/pkgconfig'\'' exec pkg-config $($(PKG)_STATIC_FLAG) "$$@"') \ |
112 > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'; \ | 143 > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'; \ |