Optimize binary size
- Use the gcc "-s" option when compiling Libreswan. This reduces binary size by ~80%.
This commit is contained in:
parent
4422bea6a4
commit
61025818bb
@ -200,7 +200,7 @@ bigecho "Compiling and installing Libreswan, please wait..."
|
|||||||
cd "libreswan-$SWAN_VER" || exit 1
|
cd "libreswan-$SWAN_VER" || exit 1
|
||||||
[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in
|
[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in
|
||||||
cat > Makefile.inc.local <<'EOF'
|
cat > Makefile.inc.local <<'EOF'
|
||||||
WERROR_CFLAGS=-w
|
WERROR_CFLAGS=-w -s
|
||||||
USE_DNSSEC=false
|
USE_DNSSEC=false
|
||||||
EOF
|
EOF
|
||||||
if [ "$SWAN_VER" = "3.32" ] || ! grep -qs 'VERSION_CODENAME=' /etc/os-release; then
|
if [ "$SWAN_VER" = "3.32" ] || ! grep -qs 'VERSION_CODENAME=' /etc/os-release; then
|
||||||
|
@ -174,7 +174,7 @@ bigecho "Compiling and installing Libreswan, please wait..."
|
|||||||
cd "libreswan-$SWAN_VER" || exit 1
|
cd "libreswan-$SWAN_VER" || exit 1
|
||||||
[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in
|
[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in
|
||||||
cat > Makefile.inc.local <<'EOF'
|
cat > Makefile.inc.local <<'EOF'
|
||||||
WERROR_CFLAGS=-w
|
WERROR_CFLAGS=-w -s
|
||||||
USE_DNSSEC=false
|
USE_DNSSEC=false
|
||||||
EOF
|
EOF
|
||||||
echo "USE_DH2=true" >> Makefile.inc.local
|
echo "USE_DH2=true" >> Makefile.inc.local
|
||||||
|
@ -206,7 +206,7 @@ bigecho "Compiling and installing Libreswan, please wait..."
|
|||||||
cd "libreswan-$SWAN_VER" || exit 1
|
cd "libreswan-$SWAN_VER" || exit 1
|
||||||
[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in
|
[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in
|
||||||
cat > Makefile.inc.local <<'EOF'
|
cat > Makefile.inc.local <<'EOF'
|
||||||
WERROR_CFLAGS=-w
|
WERROR_CFLAGS=-w -s
|
||||||
USE_DNSSEC=false
|
USE_DNSSEC=false
|
||||||
EOF
|
EOF
|
||||||
echo "USE_DH2=true" >> Makefile.inc.local
|
echo "USE_DH2=true" >> Makefile.inc.local
|
||||||
|
@ -220,7 +220,7 @@ bigecho "Compiling and installing Libreswan, please wait..."
|
|||||||
|
|
||||||
cd "libreswan-$SWAN_VER" || exit 1
|
cd "libreswan-$SWAN_VER" || exit 1
|
||||||
cat > Makefile.inc.local <<'EOF'
|
cat > Makefile.inc.local <<'EOF'
|
||||||
WERROR_CFLAGS=-w
|
WERROR_CFLAGS=-w -s
|
||||||
USE_DNSSEC=false
|
USE_DNSSEC=false
|
||||||
USE_DH2=true
|
USE_DH2=true
|
||||||
USE_NSS_KDF=false
|
USE_NSS_KDF=false
|
||||||
|
@ -184,7 +184,7 @@ bigecho "Compiling and installing Libreswan, please wait..."
|
|||||||
|
|
||||||
cd "libreswan-$SWAN_VER" || exit 1
|
cd "libreswan-$SWAN_VER" || exit 1
|
||||||
cat > Makefile.inc.local <<'EOF'
|
cat > Makefile.inc.local <<'EOF'
|
||||||
WERROR_CFLAGS=-w
|
WERROR_CFLAGS=-w -s
|
||||||
USE_DNSSEC=false
|
USE_DNSSEC=false
|
||||||
USE_DH2=true
|
USE_DH2=true
|
||||||
USE_NSS_KDF=false
|
USE_NSS_KDF=false
|
||||||
|
@ -233,7 +233,7 @@ bigecho "Compiling and installing Libreswan, please wait..."
|
|||||||
|
|
||||||
cd "libreswan-$SWAN_VER" || exit 1
|
cd "libreswan-$SWAN_VER" || exit 1
|
||||||
cat > Makefile.inc.local <<'EOF'
|
cat > Makefile.inc.local <<'EOF'
|
||||||
WERROR_CFLAGS=-w
|
WERROR_CFLAGS=-w -s
|
||||||
USE_DNSSEC=false
|
USE_DNSSEC=false
|
||||||
USE_DH2=true
|
USE_DH2=true
|
||||||
USE_NSS_KDF=false
|
USE_NSS_KDF=false
|
||||||
|
Loading…
Reference in New Issue
Block a user