@@ -166,11 +166,9 @@ $(DOC_DIR)/%: src/doc/%
166
166
@mkdir -p $(@D )
167
167
cp $< $@
168
168
169
- ifdef CFG_ENABLE_NIGHTLY
170
-
171
169
OPENSSL_OS_x86_64-unknown-linux-gnu := linux-x86_64
172
170
OPENSSL_OS_x86_64-unknown-linux-musl := linux-x86_64
173
- OPENSSL_OS_i686-unknown-linux-gnu := linux-x32
171
+ OPENSSL_OS_i686-unknown-linux-gnu := linux-elf
174
172
OPENSSL_OS_arm-unknown-linux-gnueabi := linux-armv4
175
173
OPENSSL_OS_arm-unknown-linux-gnueabihf := linux-armv4
176
174
OPENSSL_OS_armv7-unknown-linux-gnueabihf := linux-armv4
@@ -194,7 +192,12 @@ OPENSSL_AR_armv7-unknown-linux-gnueabihf := armv7-linux-gnueabihf-ar
194
192
OPENSSL_AR_x86_64-unknown-freebsd := x86_64-unknown-freebsd10-ar
195
193
OPENSSL_AR_x86_64-unknown-netbsd := x86_64-unknown-netbsd-ar
196
194
195
+ SETARCH_i686-unknown-linux-gnu := setarch i386
196
+ OPENSSL_CFLAGS_i686-unknown-linux-gnu := -m32
197
+
197
198
define BUILD_OPENSSL
199
+ ifdef OPENSSL_OS_$(1)
200
+ ifdef CFG_ENABLE_NIGHTLY
198
201
OPENSSL_INSTALL_$(1) := $$(CFG_BUILD_DIR ) /target/openssl/$(1 ) -install
199
202
200
203
target/openssl/$(1 ) .stamp : target/openssl/openssl-$$(OPENSSL_VERS ) .tar.gz \
@@ -204,8 +207,8 @@ target/openssl/$(1).stamp: target/openssl/openssl-$$(OPENSSL_VERS).tar.gz \
204
207
(cd target/openssl/$( 1) && \
205
208
CC=$$(OPENSSL_CC_$(1 ) ) \
206
209
AR=$$(OPENSSL_AR_$(1 ) ) \
207
- ./Configure --prefix=$$(OPENSSL_INSTALL_$(1 ) ) \
208
- no-dso $$(OPENSSL_OS_$(1 ) ) -fPIC && \
210
+ $$( SETARCH_ $( 1 ) ) ./Configure --prefix=$$(OPENSSL_INSTALL_$(1 ) ) \
211
+ no-dso $$(OPENSSL_OS_$(1 ) ) -fPIC $$( OPENSSL_CFLAGS_ $( 1 ) ) && \
209
212
$(MAKE ) -j10 && \
210
213
$(MAKE ) install)
211
214
touch $$@
@@ -215,9 +218,19 @@ cargo-$(1): export OPENSSL_STATIC := 1
215
218
cargo-$(1 ) : export OPENSSL_ROOT_DIR := $$(OPENSSL_INSTALL_$(1 ) )
216
219
cargo-$(1 ) : export OPENSSL_LIB_DIR := $$(OPENSSL_INSTALL_$(1 ) ) /lib
217
220
cargo-$(1 ) : export OPENSSL_INCLUDE_DIR := $$(OPENSSL_INSTALL_$(1 ) ) /include
221
+ test-unit-$(1 ) : export OPENSSL_STATIC := 1
222
+ test-unit-$(1 ) : export OPENSSL_ROOT_DIR := $$(OPENSSL_INSTALL_$(1 ) )
223
+ test-unit-$(1 ) : export OPENSSL_LIB_DIR := $$(OPENSSL_INSTALL_$(1 ) ) /lib
224
+ test-unit-$(1 ) : export OPENSSL_INCLUDE_DIR := $$(OPENSSL_INSTALL_$(1 ) ) /include
218
225
219
226
# build libz statically into the cargo we're producing
220
227
cargo-$(1 ) : export LIBZ_SYS_STATIC := 1
228
+ else
229
+ target/openssl/$(1 ) .stamp :
230
+ endif
231
+ else
232
+ target/openssl/$(1 ) .stamp :
233
+ endif
221
234
endef
222
235
223
236
$(foreach target,$(CFG_TARGET),$(eval $(call BUILD_OPENSSL,$(target))))
@@ -229,12 +242,6 @@ target/openssl/openssl-$(OPENSSL_VERS).tar.gz: | target/openssl/
229
242
230
243
target/openssl/ :
231
244
mkdir -p $(@ )
232
- else
233
- define BUILD_OPENSSL
234
- target/openssl/$(1 ) .stamp:
235
- endef
236
- $(foreach target,$(CFG_TARGET),$(eval $(call BUILD_OPENSSL,$(target))))
237
- endif
238
245
239
246
# === Distribution
240
247
0 commit comments