Skip to content

Commit 4c1a6e0

Browse files
author
Lutz Jänicke
committed
Apply mingw patches as supplied by Roumen Petrov an Alon Bar-Lev
PR: 1552 Submitted by: Roumen Petrov <[email protected]>, "Alon Bar-Lev" <[email protected]>
1 parent 6e6ada1 commit 4c1a6e0

31 files changed

+86
-56
lines changed

.cvsignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ libssl.pc
2020
*.flc
2121
semantic.cache
2222
Makefile
23+
*.dll*

Configure

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ my %table=(
494494
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32",
495495

496496
# MinGW
497-
"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a",
497+
"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
498498

499499
# UWIN
500500
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
@@ -1192,13 +1192,16 @@ if (!$no_shared)
11921192

11931193
if (!$IsMK1MF)
11941194
{
1195+
# add {no-}static-engine to options to allow mkdef.pl to work without extra arguments
11951196
if ($no_shared)
11961197
{
11971198
$openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n";
1199+
$options.=" static-engine";
11981200
}
11991201
else
12001202
{
12011203
$openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
1204+
$options.=" no-static-engine";
12021205
}
12031206
}
12041207

Makefile.org

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,16 @@ install_sw:
534534
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
535535
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
536536
fi ); \
537+
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
538+
( case $$i in \
539+
*crypto*) i=libeay32.dll;; \
540+
*ssl*) i=ssleay32.dll;; \
541+
esac; \
542+
echo installing $$i; \
543+
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
544+
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
545+
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
546+
fi; \
537547
fi; \
538548
done; \
539549
( here="`pwd`"; \

Makefile.shared

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,26 +248,35 @@ link_o.cygwin:
248248
INHIBIT_SYMLINKS=yes; \
249249
SHLIB=cyg$(LIBNAME); \
250250
base=-Wl,--enable-auto-image-base; \
251+
deffile=; \
251252
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
252-
SHLIB=$(LIBNAME); base=; \
253+
SHLIB=$(LIBNAME)eay32; base=; \
254+
if test -f $(LIBNAME)eay32.def; then \
255+
deffile=$(LIBNAME)eay32.def; \
256+
fi; \
253257
fi; \
254258
SHLIB_SUFFIX=.dll; \
255259
LIBVERSION="$(LIBVERSION)"; \
256260
SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \
257261
ALLSYMSFLAGS='-Wl,--whole-archive'; \
258262
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
259-
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-s,-Bsymbolic"; \
263+
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base $$deffile -Wl,-s,-Bsymbolic"; \
260264
$(LINK_SO_O)
265+
#for mingw target if def-file is in use dll-name should match library-name
261266
link_a.cygwin:
262267
@ $(CALC_VERSIONS); \
263268
INHIBIT_SYMLINKS=yes; \
264269
SHLIB=cyg$(LIBNAME); SHLIB_SOVER=-$(LIBVERSION); SHLIB_SUFFIX=.dll; \
265270
dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \
266271
base=-Wl,--enable-auto-image-base; \
267272
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
268-
SHLIB=$(LIBNAME); SHLIB_SOVER=32; \
273+
case $(LIBNAME) in \
274+
crypto) SHLIB=libeay;; \
275+
ssl) SHLIB=ssleay;; \
276+
esac; \
277+
SHLIB_SOVER=32; \
269278
extras="$(LIBNAME).def"; \
270-
$(PERL) util/mkdef.pl 32 $(LIBNAME) > $$extras; \
279+
$(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \
271280
base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
272281
fi; \
273282
dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \

apps/.cvsignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ der_chop.bak
55
CA.pl
66
*.flc
77
semantic.cache
8+
*.dll

crypto/.cvsignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ opensslconf.h
44
Makefile.save
55
*.flc
66
semantic.cache
7-
x86cpuid-elf.s
8-
x86_64cpuid.s
7+
*cpuid.s
8+
uplink-cof.s

crypto/aes/.cvsignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ lib
22
Makefile.save
33
*.flc
44
semantic.cache
5-
ax86-elf.s
6-
aes-x86_64.s
5+
aes-*.s

crypto/bf/.cvsignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ lib
22
Makefile.save
33
*.flc
44
semantic.cache
5-
bx86-elf.s
5+
bf-*.s

crypto/bn/.cvsignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ lib
22
Makefile.save
33
*.flc
44
semantic.cache
5-
co86-elf.s
6-
bn86-elf.s
7-
mo86-elf.s
8-
x86_64-mont.s
5+
co-*.s
6+
bn-*.s
7+
*-mont.s

crypto/camellia/.cvsignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
lib
2+
Makefile.save

0 commit comments

Comments
 (0)