1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Merge pull request #168 from mtatton/master

[ build ] openssl static binary link fix
This commit is contained in:
rkd77 2022-05-22 13:06:50 +02:00 committed by GitHub
commit 832953e020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 184 additions and 27 deletions

View File

@ -30,6 +30,9 @@ configure() {
# Thanks rkd77 for discovery of jemmaloc needed
# to correct openssl functionality
# LIBS="-ljemalloc -lpthread -lm" \
# Update: Thanks to JF for this solution for solving
# crashes using pthread
# -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
time \
CC=$1 \
LD=$2 \
@ -47,6 +50,7 @@ configure() {
--enable-utf-8 \
--with-static \
--with-openssl \
--without-gpm \
--without-quickjs \
--disable-88-colors \
--disable-backtrace \
@ -54,7 +58,6 @@ configure() {
--disable-debug \
--disable-cgi \
--disable-combining \
--disable-gpm \
--disable-gopher \
--disable-nls \
--disable-ipv6 \
@ -165,7 +168,7 @@ set_arch() {
BIN_SUFFIX=""
CXXFLAGS=""
LDFLAGS=""
LIBS=""
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
elif [ "$1" = "win32" ]; then
ARCHIT="$1"
CC="i686-w64-mingw32-gcc"
@ -173,9 +176,9 @@ set_arch() {
MAKE_HOST="x86_64-w32-mingw32"
BIN_SUFFIX=".exe"
CXXFLAGS="-I/usr/local/include"
CXX_CUST="i686-w64-mingw32-g++"
LDFLAGS="-L/usr/local/lib"
LIBS="-lws2_32"
LIBS="-lws2_32 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
CXX_CUST="i686-w64-mingw32-g++"
elif [ "$1" = "win64" ]; then
ARCHIT="$1"
CC="x86_64-w64-mingw32-gcc"
@ -184,7 +187,7 @@ set_arch() {
BIN_SUFFIX=".exe"
CXXFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib"
LIBS="-lws2_32"
LIBS="-lws2_32 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
elif [ "$1" = "djgpp" ]; then
ARCHIT="$1"
CC="i586-pc-msdosdjgpp-gcc"
@ -202,16 +205,17 @@ set_arch() {
BIN_SUFFIX=""
CXXFLAGS=""
LDFLAGS=""
LIBS="-L../../lib/$ARCHIT"
LDFLAGS="-L/usr/local/lib"
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
elif [ "$1" = "arm64" ]; then
ARCHIT="$1"
CC="aarch64-linux-gnu-gcc"
LD="aarch64-linux-gnu-ld"
MAKE_HOST="aarch64-linux-gnu"
BIN_SUFFIX=""
CXXFLAGS=""
LDFLAGS=""
LIBS="-L../../lib/$ARCHIT"
CXXFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib"
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
elif [ "$1" = "native" ]; then
ARCHIT="$1"
CC="gcc"
@ -220,7 +224,7 @@ set_arch() {
BIN_SUFFIX=""
CXXFLAGS=""
LDFLAGS=""
LIBS=""
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
fi
}

64
docker/arm32/Dockerfile Normal file
View File

@ -0,0 +1,64 @@
#
# [ arm32 ] elinks docker development environment v0.1c
#
# [*] base system
# get latest debian
FROM debian:latest
# prepare system
RUN apt-get update && apt-get -y install bash \
rsync vim screen git make automake
# [*] source build tools
# install sources build tools and update
RUN apt-get install -y apt-src && \
grep '^deb ' /etc/apt/sources.list | sed 's/deb /deb-src /' >> /etc/apt/sources.list && \
apt-src update
# [*] install sources
# install sources for openssl and zlib1g-dev
RUN cd /root && apt-src install libssl-dev zlib1g-dev
# install dev tools [ platform dependent ]
RUN apt-get -y install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
## [*] elinks openssl development support
# build openssl library for arm32
RUN cd /root && cd `ls -d /root/openssl-*` && \
./Configure linux-armv4 \
--prefix=/usr/local \
--cross-compile-prefix=arm-linux-gnueabihf- && \
make depend && \
make && \
make install_runtime_libs && \
make install_dev
## [*} zlib sources
# build zlib library for arm32
RUN cd /root && cd `ls -d /root/zlib-*` && \
CC="arm-linux-gnueabihf-gcc" \
LD="arm-linux-gnueabihf-ldd" \
./configure --static --prefix=/usr/local && \
make && \
make install
# install sources for openssl and zlib1g-dev
RUN cd /root && apt-src install libcrypto++-dev
# build the libcrypto
RUN cd /root/libcrypto* && \
CXX="arm-linux-gnueabihf-gcc" \
LD="arm-linux-gnueabihf-ld" \
AR="arm-linux-gnueabihf-ar" \
make -f GNUmakefile-cross && \
make install
## [*] elinks sources
# get elinks source
RUN cd /root; git clone https://github.com/rkd77/elinks

2
docker/arm32/build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker build -t "elinks-arm32-dev:latest" .

4
docker/arm32/cleanup.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
docker container stop elinks-arm32-dev
docker container rm elinks-arm32-dev
#docker image rm elinks-arm32-dev

6
docker/arm32/run.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
docker run -it \
--name=elinks-arm32-dev \
-v /tmp:/tmp/host \
elinks-arm32-dev:latest \
/bin/bash

3
docker/arm32/shell.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker start elinks-arm32-dev
docker exec -it elinks-arm32-dev bash

53
docker/arm64/Dockerfile Normal file
View File

@ -0,0 +1,53 @@
#
# [ arm64 ] elinks docker development environment v0.1c
#
# [*] base system
# get latest debian
FROM debian:latest
# prepare system
RUN apt-get update && apt-get -y install bash \
rsync vim screen git make automake
# [*] source build tools
# install sources build tools and update
RUN apt-get install -y apt-src && \
grep '^deb ' /etc/apt/sources.list | sed 's/deb /deb-src /' >> /etc/apt/sources.list && \
apt-src update
# [*] install sources
# install sources for openssl and zlib1g-dev
RUN cd /root && apt-src install libssl-dev zlib1g-dev
# install dev tools [ platform dependent ]
RUN apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
## [*] elinks openssl development support
# build openssl library for arm64
RUN cd /root && cd `ls -d /root/openssl-*` && \
./Configure linux-aarch64 \
--prefix=/usr/local \
--cross-compile-prefix=aarch64-linux-gnu- && \
make depend && \
make && \
make install_runtime_libs && \
make install_dev
## [*} zlib sources
# build zlib library for arm64
RUN cd /root && cd `ls -d /root/zlib-*` && \
CC="aarch64-linux-gnu-gcc" \
LD="aarch64-linux-gnu-ldd" \
./configure --static --prefix=/usr/local && \
make && \
make install
## [*] elinks sources
# get elinks source
RUN cd /root; git clone https://github.com/rkd77/elinks

2
docker/arm64/build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
docker build -t "elinks-arm64-dev:latest" .

4
docker/arm64/cleanup.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
docker container stop elinks-arm64-dev
docker container rm elinks-arm64-dev
#docker image rm elinks-arm64-dev

6
docker/arm64/run.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
docker run -it \
--name=elinks-arm64-dev \
-v /tmp:/tmp/host \
elinks-arm64-dev:latest \
/bin/bash

3
docker/arm64/shell.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker start elinks-arm64-dev
docker exec -it elinks-arm64-dev bash

View File

@ -1,5 +1,5 @@
#
# [ win32 ] elinks docker development environment v0.1a
# [ win32 ] elinks docker development environment v0.1c
#
# [*] base system
@ -9,8 +9,7 @@ FROM debian:latest
# prepare system
RUN apt-get update && apt-get -y install bash \
rsync vim screen git make automake \
gcc-mingw-w64-i686 g++-mingw-w64-i686
rsync vim screen git make automake
# [*] source build tools
@ -24,6 +23,9 @@ RUN apt-get install -y apt-src && \
# install sources for openssl and zlib1g-dev
RUN cd /root && apt-src install libssl-dev zlib1g-dev
# install dev tools [ platform dependent ]
RUN apt-get install -y gcc-mingw-w64-i686 g++-mingw-w64-i686
# [*] elinks openssl development support
#

View File

@ -1,3 +1,4 @@
#!/bin/bash
docker container rm elinks
docker image rm elinks-dev
docker container stop elinks-win32-dev
docker container rm elinks-win32-dev
#docker image rm elinks-win32-dev

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker start elinks
docker exec -it elinks bash
docker start elinks-win32-dev
docker exec -it elinks-win32-dev bash

View File

@ -1,5 +1,5 @@
#
# [ win64 ] elinks docker development environment v0.1b
# [ win64 ] elinks docker development environment v0.1c
#
# [*] base system
@ -9,8 +9,7 @@ FROM debian:latest
# prepare system
RUN apt-get update && apt-get -y install bash \
rsync vim screen git make automake \
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
rsync vim screen git make automake
# [*] source build tools
@ -24,6 +23,9 @@ RUN apt-get install -y apt-src && \
# install sources for openssl and zlib1g-dev
RUN cd /root && apt-src install libssl-dev zlib1g-dev
# install dev tools [ platform dependent ]
RUN apt-get install -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
# [*] elinks openssl development support
# build openssl library for win64

View File

@ -1,2 +1,2 @@
#!/bin/bash
docker build -t "elinks-dev:latest" .
docker build -t "elinks-win64-dev:latest" .

View File

@ -1,3 +1,4 @@
#!/bin/bash
docker container rm elinks
docker image rm elinks-dev
docker container stop elinks-win64-dev
docker container rm elinks-win64-dev
#docker image rm elinks-win64-dev

View File

@ -1,6 +1,6 @@
#!/bin/bash
docker run -it \
--name=elinks \
--name=elinks-win64-dev \
-v /tmp:/tmp/host \
elinks-dev:latest \
elinks-win64-dev:latest \
/bin/bash

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker start elinks
docker exec -it elinks bash
docker start elinks-win64-dev
docker exec -it elinks-win64-dev bash