mirror of
https://github.com/libressl/portable.git
synced 2026-01-17 21:51:17 +01:00
Remove the dist-win compilation script
With the CMake version of building for windows there is support for building with MINGW, clang, and Visual Studio. CMake can build for MINGW using the regular method of autogen and CMake. Removing this makes it a bit simpler to get an overview of how to build for windows. Reducing confusion.
This commit is contained in:
@@ -41,25 +41,3 @@ use the new ABI.
|
||||
|
||||
64-bit systems always have a 64-bit time_t and are not affected by this
|
||||
problem.
|
||||
|
||||
# Using Libressl with Visual Studio
|
||||
|
||||
A script for generating ready-to-use .DLL and static .LIB files is included in
|
||||
the source repository at
|
||||
https://github.com/libressl/portable/blob/master/dist-win.sh
|
||||
|
||||
This script uses mingw-w64 to build LibreSSL and then uses Visual Studio tools
|
||||
to generate compatible library import files ready-to-use with Visual
|
||||
Studio projects. Static and dynamic libraries are included. The script uses
|
||||
cv2pdb to generate Visual Studio and windbg compatible debug files. cv2pdb is a
|
||||
tool developed for the D language and can be found here:
|
||||
https://github.com/rainers/cv2pdb
|
||||
|
||||
The mingw-w64 code is largely, but not 100%, compatible with code built from
|
||||
Visual Studio. Notably, FILE * pointers cannot be shared between code built for
|
||||
Mingw-w64 and Visual Studio.
|
||||
|
||||
As of LibreSSL 2.2.2, Visual Studio Native builds can also be produced using
|
||||
CMake. This produces ABI-compatible libraries for linking with native code
|
||||
generated by Visual Studio. Currently tested versions are VS 2019 and 2022,
|
||||
though earlier versions may work as well.
|
||||
|
||||
48
dist-win.sh
48
dist-win.sh
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
export PATH=/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 12.0/VC/bin:$PATH
|
||||
VERSION=`cat VERSION`
|
||||
DIST=libressl-$VERSION-windows
|
||||
|
||||
rm -fr $DIST
|
||||
mkdir -p $DIST
|
||||
autoreconf -i
|
||||
|
||||
for ARCH in X86 X64; do
|
||||
|
||||
if [ $ARCH = X86 ]; then
|
||||
HOST=i686-w64-mingw32
|
||||
ARCHDIR=x86
|
||||
else
|
||||
HOST=x86_64-w64-mingw32
|
||||
ARCHDIR=x64
|
||||
fi
|
||||
|
||||
echo Building for $HOST
|
||||
|
||||
CC=$HOST-gcc ./configure --host=$HOST --with-openssldir=c:/libressl/ssl
|
||||
make clean
|
||||
PATH=$PATH:/usr/$HOST/sys-root/mingw/bin \
|
||||
make -j 4 check
|
||||
make -j 4 install DESTDIR=`pwd`/stage-$ARCHDIR
|
||||
|
||||
mkdir -p $DIST/$ARCHDIR
|
||||
if [ ! -e $DIST/include ]; then
|
||||
cp -r stage-$ARCHDIR/usr/local/include $DIST
|
||||
fi
|
||||
|
||||
cp stage-$ARCHDIR/usr/local/bin/* $DIST/$ARCHDIR
|
||||
|
||||
for i in libcrypto libssl libtls; do
|
||||
DLL=$(basename `ls -1 $DIST/$ARCHDIR/$i*.dll`|cut -d. -f1)
|
||||
echo EXPORTS > $DLL.def
|
||||
dumpbin /exports $DIST/$ARCHDIR/$DLL.dll | \
|
||||
awk '{print $4}' | awk 'NF' |tail -n +9 >> $DLL.def
|
||||
lib /MACHINE:$ARCH /def:$DLL.def /out:$DIST/$ARCHDIR/$DLL.lib
|
||||
cv2pdb $DIST/$ARCHDIR/$DLL.dll
|
||||
done
|
||||
done
|
||||
|
||||
zip -r $DIST.zip $DIST
|
||||
Reference in New Issue
Block a user