comparison src/build-gcc.mk @ 4615:0539bcde3fa8

build-gcc.mk: fix build rules error on non-Windows systems
author John W. Eaton <jwe@octave.org>
date Mon, 05 Mar 2018 12:49:29 -0500
parents 86c3c1fd16f1
children b864dc772f15
comparison
equal deleted inserted replaced
4614:5e4c8c571527 4615:0539bcde3fa8
50 if ! [ -L $(BUILD_TOOLS_PREFIX)/mingw ]; then \ 50 if ! [ -L $(BUILD_TOOLS_PREFIX)/mingw ]; then \
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)_INSTALL_SYSTEM_HEADERS
56 $($(PKG)_PRE_BUILD)
56 # install mingw-w64 headers 57 # install mingw-w64 headers
57 $(call PREPARE_PKG_SOURCE,mingw-w64,$(1)) 58 $(call PREPARE_PKG_SOURCE,mingw-w64,$(1))
58 mkdir '$(1).headers' 59 mkdir '$(1).headers'
59 cd '$(1).headers' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \ 60 cd '$(1).headers' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \
60 --host='$(TARGET)' \ 61 --host='$(TARGET)' \
62 --enable-sdk=all \ 63 --enable-sdk=all \
63 --enable-idl \ 64 --enable-idl \
64 --enable-secure-api \ 65 --enable-secure-api \
65 $(mingw-w64-headers_CONFIGURE_OPTS) 66 $(mingw-w64-headers_CONFIGURE_OPTS)
66 $(MAKE) -C '$(1).headers' install 67 $(MAKE) -C '$(1).headers' install
67 68 endef
69 define $(PKG)_BUILD_SYSTEM_RUNTIME
68 # build standalone gcc 70 # build standalone gcc
69 $($(PKG)_CONFIGURE)
70 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc 71 $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc
71 $(MAKE) -C '$(1).build' -j 1 install-gcc 72 $(MAKE) -C '$(1).build' -j 1 install-gcc
72 73
73 # build mingw-w64-crt 74 # build mingw-w64-crt
74 mkdir '$(1).crt-build' 75 mkdir '$(1).crt-build'
135 --with-mpfr='$(BUILD_TOOLS_PREFIX)' \ 136 --with-mpfr='$(BUILD_TOOLS_PREFIX)' \
136 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") 137 $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'")
137 endef 138 endef
138 139
139 define $(PKG)_BUILD 140 define $(PKG)_BUILD
140 $($(PKG)_PRE_BUILD) 141 # Windows only.
142 $($(PKG)_INSTALL_SYSTEM_HEADERS)
141 143
144 # All systems.
145 $($(PKG)_CONFIGURE)
146
147 # Windows only.
142 $($(PKG)_BUILD_SYSTEM_RUNTIME) 148 $($(PKG)_BUILD_SYSTEM_RUNTIME)
143 149
144 # build rest of gcc 150 # Build rest of gcc.
145 $(MAKE) -C '$(1).build' -j '$(JOBS)' 151 $(MAKE) -C '$(1).build' -j '$(JOBS)'
146 $(MAKE) -C '$(1).build' -j 1 install 152 $(MAKE) -C '$(1).build' -j 1 install
147 153
148 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a ]; then \ 154 if [ -f $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a ]; then \
149 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \ 155 mv $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/lib/libgcc_s.a $(BUILD_TOOLS_PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/libgcc_s.a; \