Skip to content

Commit

Permalink
Avoid empty translation unit
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq committed Dec 26, 2023
1 parent 5eeffce commit fadaf32
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ fi

awk '/LIBRESSL_VERSION_TEXT/ {print $4}' < include/openssl/opensslv.h | cut -d\" -f1 > VERSION
echo "LibreSSL version `cat VERSION`"
TOUCH_EMPTY='echo "/* empty */" >'

# copy libcrypto source
echo copying libcrypto source
rm -f crypto/*.c crypto/*.h
touch crypto/empty.c
$TOUCH_EMPTY crypto/empty.c
for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do
dir=`dirname $i`
mkdir -p crypto/$dir
Expand Down Expand Up @@ -311,7 +312,7 @@ done
# copy libtls source
echo copying libtls source
rm -f tls/*.c tls/*.h libtls/src/*.c libtls/src/*.h
touch tls/empty.c
$TOUCH_EMPTY tls/empty.c
for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do
if [ -e $libtls_src/$i ]; then
$CP $libtls_src/$i tls
Expand Down Expand Up @@ -357,7 +358,7 @@ done
# copy libssl source
echo "copying libssl source"
rm -f ssl/*.c ssl/*.h
touch ssl/empty.c
$TOUCH_EMPTY ssl/empty.c
for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do
dir=`dirname $i`
mkdir -p ssl/$dir
Expand All @@ -368,7 +369,7 @@ $GREP '^[A-Za-z0-9_]' < $libssl_src/Symbols.list > ssl/ssl.sym

# copy libcrypto tests
echo "copying tests"
touch tests/empty.c
$TOUCH_EMPTY tests/empty.c
for i in `find $libcrypto_regress -name '*.c'`; do
$CP "$i" tests
done
Expand Down

0 comments on commit fadaf32

Please sign in to comment.