mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
dropbear: fix -ltomcrypt -ltommath order when using system libtom libs
To prevent build failures when using system libtom libraries and linking with --as-needed, LIBTOM_LIBS should be in the order -ltomcrypt -ltommath, not the other way around, ie libs should be prepended to LIBTOM_LIBS as they are found, not appended. Note that LIBTOM_LIBS is not used when linking with the bundled libtom libs. (From OE-Core rev: 62e96283fe77469e24e8df86c6c037c92009b00a) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5637f8605f
commit
472c245cfe
@@ -17,6 +17,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
|
||||
file://0003-configure.patch \
|
||||
file://0004-fix-2kb-keys.patch \
|
||||
file://0007-dropbear-fix-for-x32-abi.patch \
|
||||
file://fix-libtomcrypt-libtommath-ordering.patch \
|
||||
file://init \
|
||||
file://dropbearkey.service \
|
||||
file://dropbear@.service \
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 2fd8d2aedad0c50cdf1e43edd2387874b720ad4c Mon Sep 17 00:00:00 2001
|
||||
From: Andre McCurdy <armccurdy@gmail.com>
|
||||
Date: Fri, 16 Sep 2016 12:18:23 -0700
|
||||
Subject: [PATCH] fix libtomcrypt/libtommath ordering
|
||||
|
||||
To prevent build failures when using system libtom libraries and
|
||||
linking with --as-needed, LIBTOM_LIBS should be in the order
|
||||
-ltomcrypt -ltommath, not the other way around, ie libs should be
|
||||
prepended to LIBTOM_LIBS as they are found, not appended.
|
||||
|
||||
Note that LIBTOM_LIBS is not used when linking with the bundled
|
||||
libtom libs.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
|
||||
---
|
||||
configure.ac | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b6abe4c..85bb8bc 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -390,16 +390,16 @@ AC_ARG_ENABLE(bundled-libtom,
|
||||
AC_MSG_NOTICE(Forcing bundled libtom*)
|
||||
else
|
||||
BUNDLED_LIBTOM=0
|
||||
- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath",
|
||||
+ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS",
|
||||
[AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] )
|
||||
- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt",
|
||||
+ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS",
|
||||
[AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
|
||||
fi
|
||||
],
|
||||
[
|
||||
BUNDLED_LIBTOM=0
|
||||
- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", BUNDLED_LIBTOM=1)
|
||||
- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", BUNDLED_LIBTOM=1)
|
||||
+ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
|
||||
+ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
|
||||
]
|
||||
)
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
||||
Reference in New Issue
Block a user