1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Hardening: build the last 2 remaining libs with hardening flags too

Library argon2 uses a makefile without configure, so works a bit different
And GeoIP i forgot because it was in a different autoconf file.
This commit is contained in:
Bram Matthys
2026-02-23 07:17:02 +01:00
parent 4c01372e3b
commit 3e9ce77dc6
3 changed files with 10 additions and 8 deletions
+3 -2
View File
@@ -439,8 +439,9 @@ AC_DEFUN([CHECK_GEOIP_CLASSIC],
AC_MSG_RESULT(configuring GeoIP Classic library)
cd GeoIP-$geoip_classic_version
save_cflags="$CFLAGS"
CFLAGS="$orig_cflags"
export CFLAGS
CFLAGS="$orig_cflags $HARDEN_LIB_CFLAGS"
LDFLAGS="$HARDEN_LIB_LDFLAGS"
export CFLAGS LDFLAGS
./configure --prefix=$cur_dir/extras/geoip-classic --libdir=$PRIVATELIBDIR --enable-shared --disable-static || exit 1
CFLAGS="$save_cflags"
AC_MSG_RESULT(compiling GeoIP Classic library)
Vendored
+5 -4
View File
@@ -8881,10 +8881,10 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling Argon2 library" >&5
printf "%s\n" "compiling Argon2 library" >&6; }
cd argon2-$argon2_version
$ac_cv_prog_MAKER || exit 1
$ac_cv_prog_MAKER CFLAGS="$orig_cflags $HARDEN_LIB_CFLAGS" LDFLAGS="$HARDEN_LIB_LDFLAGS" || exit 1
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: installing Argon2 library" >&5
printf "%s\n" "installing Argon2 library" >&6; }
$ac_cv_prog_MAKER install PREFIX=$cur_dir/extras/argon2 || exit 1
$ac_cv_prog_MAKER install PREFIX=$cur_dir/extras/argon2 CFLAGS="$orig_cflags $HARDEN_LIB_CFLAGS" LDFLAGS="$HARDEN_LIB_LDFLAGS" || exit 1
# We need to manually copy the libs to PRIVATELIBDIR because
# there is no way to tell make install in libargon2 to do so.
# BUT FIRST, delete the old library so it becomes an unlink+create
@@ -10096,8 +10096,9 @@ printf "%s\n" "extracting GeoIP Classic library" >&6; }
printf "%s\n" "configuring GeoIP Classic library" >&6; }
cd GeoIP-$geoip_classic_version
save_cflags="$CFLAGS"
CFLAGS="$orig_cflags"
export CFLAGS
CFLAGS="$orig_cflags $HARDEN_LIB_CFLAGS"
LDFLAGS="$HARDEN_LIB_LDFLAGS"
export CFLAGS LDFLAGS
./configure --prefix=$cur_dir/extras/geoip-classic --libdir=$PRIVATELIBDIR --enable-shared --disable-static || exit 1
CFLAGS="$save_cflags"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: compiling GeoIP Classic library" >&5
+2 -2
View File
@@ -711,9 +711,9 @@ else
fi
AC_MSG_RESULT(compiling Argon2 library)
cd argon2-$argon2_version
$ac_cv_prog_MAKER || exit 1
$ac_cv_prog_MAKER CFLAGS="$orig_cflags $HARDEN_LIB_CFLAGS" LDFLAGS="$HARDEN_LIB_LDFLAGS" || exit 1
AC_MSG_RESULT(installing Argon2 library)
$ac_cv_prog_MAKER install PREFIX=$cur_dir/extras/argon2 || exit 1
$ac_cv_prog_MAKER install PREFIX=$cur_dir/extras/argon2 CFLAGS="$orig_cflags $HARDEN_LIB_CFLAGS" LDFLAGS="$HARDEN_LIB_LDFLAGS" || exit 1
# We need to manually copy the libs to PRIVATELIBDIR because
# there is no way to tell make install in libargon2 to do so.
# BUT FIRST, delete the old library so it becomes an unlink+create