comparison src/build-gcc.mk @ 4606:86c3c1fd16f1

build-gcc, native-gcc: build with --enable-threads=posix * build-gcc.mk, native-gcc.mk: Use --enable-threads=posix. Update build rules. Disable multilib (no longer needed for nsis).
author John W. Eaton <jwe@octave.org>
date Mon, 26 Feb 2018 10:37:40 -0500
parents 0e56fe2d2ef5
children 0539bcde3fa8
comparison
equal deleted inserted replaced
4605:a62c4469e2aa 4606:86c3c1fd16f1
29 --with-gnu-ld \ 29 --with-gnu-ld \
30 --with-gnu-as \ 30 --with-gnu-as \
31 --disable-nls \ 31 --disable-nls \
32 --without-x \ 32 --without-x \
33 --disable-win32-registry \ 33 --disable-win32-registry \
34 --enable-threads=win32 34 --enable-threads=posix
35 ifneq ($(TARGET),x86_64-w64-mingw32) 35 ifneq ($(TARGET),x86_64-w64-mingw32)
36 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ 36 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
37 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \ 37 --libdir='$(BUILD_TOOLS_PREFIX)/lib' \
38 --with-native-system-header-dir='/include' \ 38 --with-native-system-header-dir='/include' \
39 --disable-sjlj-exceptions 39 --disable-sjlj-exceptions
51 ln -s $(HOST_PREFIX) $(BUILD_TOOLS_PREFIX)/mingw; \ 51 ln -s $(HOST_PREFIX) $(BUILD_TOOLS_PREFIX)/mingw; \
52 fi 52 fi
53 endef 53 endef
54 endif 54 endif
55 define $(PKG)_BUILD_SYSTEM_RUNTIME 55 define $(PKG)_BUILD_SYSTEM_RUNTIME
56 # install mingw-w64 headers
57 $(call PREPARE_PKG_SOURCE,mingw-w64,$(1))
58 mkdir '$(1).headers'
59 cd '$(1).headers' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \
60 --host='$(TARGET)' \
61 --prefix='$(HOST_PREFIX)' \
62 --enable-sdk=all \
63 --enable-idl \
64 --enable-secure-api \
65 $(mingw-w64-headers_CONFIGURE_OPTS)
66 $(MAKE) -C '$(1).headers' install
67
56 # build standalone gcc 68 # build standalone gcc
69 $($(PKG)_CONFIGURE)
57 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc 70 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc
58 $(MAKE) -C '$(1).build' -j 1 install-gcc 71 $(MAKE) -C '$(1).build' -j 1 install-gcc
59 72
60 # build mingw-w64-crt 73 # build mingw-w64-crt
61 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,mingw-w64,$(TAR))
62 $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/mingw-w64-*.patch)),
63 (cd '$(1)/$(mingw-w64_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH))
64 $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/$(MXE_SYSTEM)-mingw-w64-*.patch)),
65 (cd '$(1)/$(mingw-w64_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH))
66 mkdir '$(1).crt-build' 74 mkdir '$(1).crt-build'
67 cd '$(1).crt-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-crt/configure' \ 75 cd '$(1).crt-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-crt/configure' \
68 --host='$(TARGET)' \ 76 --host='$(TARGET)' \
69 --prefix='$(HOST_PREFIX)' \ 77 --prefix='$(HOST_PREFIX)' \
70 --with-sysroot='$(HOST_PREFIX)' 78 --with-sysroot='$(HOST_PREFIX)'
71 $(MAKE) -C '$(1).crt-build' -j '$(JOBS)' || $(MAKE) -C '$(1).crt-build' -j '$(JOBS)' 79 $(MAKE) -C '$(1).crt-build' -j '$(JOBS)' || $(MAKE) -C '$(1).crt-build' -j '$(JOBS)'
72 $(MAKE) -C '$(1).crt-build' -j 1 install 80 $(MAKE) -C '$(1).crt-build' -j 1 install
81
82 # build posix threads
83 mkdir '$(1).pthreads'
84 cd '$(1).pthreads' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-libraries/winpthreads/configure' \
85 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
86 --prefix='$(HOST_PREFIX)' \
87 $(ENABLE_SHARED_OR_STATIC)
88 $(MAKE) -C '$(1).pthreads' -j '$(JOBS)' || $(MAKE) -C '$(1).pthreads' -j '$(JOBS)'
89 $(MAKE) -C '$(1).pthreads' -j 1 install
73 endef 90 endef
74 endif 91 endif
75 92
76 ifneq ($(MXE_NATIVE_BUILD),yes) 93 ifneq ($(MXE_NATIVE_BUILD),yes)
77 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \ 94 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += \
81 --with-ld='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ld' \ 98 --with-ld='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ld' \
82 --with-nm='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-nm' 99 --with-nm='$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-nm'
83 100
84 ifeq ($(ENABLE_WINDOWS_64),yes) 101 ifeq ($(ENABLE_WINDOWS_64),yes)
85 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(BUILD_TOOLS_PREFIX)' \ 102 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(BUILD_TOOLS_PREFIX)' \
86 --enable-multilib --with-host-libstdcxx="-lstdc++" --with-system-zlib \ 103 --disable-multilib --with-host-libstdcxx="-lstdc++" --with-system-zlib \
87 --enable-64bit --enable-fully-dynamic-string 104 --enable-64bit --enable-fully-dynamic-string
88 else 105 else
89 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(HOST_PREFIX)' \ 106 $(PKG)_SYSDEP_CONFIGURE_OPTIONS += --with-sysroot='$(HOST_PREFIX)' \
90 --disable-multilib 107 --disable-multilib
91 endif 108 endif
120 endef 137 endef
121 138
122 define $(PKG)_BUILD 139 define $(PKG)_BUILD
123 $($(PKG)_PRE_BUILD) 140 $($(PKG)_PRE_BUILD)
124 141
125 $($(PKG)_CONFIGURE)
126
127 $($(PKG)_BUILD_SYSTEM_RUNTIME) 142 $($(PKG)_BUILD_SYSTEM_RUNTIME)
128 143
129 # build rest of gcc 144 # build rest of gcc
130 $(MAKE) -C '$(1).build' -j '$(JOBS)' 145 $(MAKE) -C '$(1).build' -j '$(JOBS)'
131 $(MAKE) -C '$(1).build' -j 1 install 146 $(MAKE) -C '$(1).build' -j 1 install