diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2020-12-06 18:18:08 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2021-01-03 12:28:02 +0100 |
commit | c95c2378c066f33c5b5bb1dadd3de366e49ee34e (patch) | |
tree | 5ec1d7c734a8edb084ed79b0ef0a27cc9e05e83e | |
parent | cd3048bcd64482689716f4f843574a7f199fcad8 (diff) | |
download | fetchmail-c95c2378c066f33c5b5bb1dadd3de366e49ee34e.tar.gz fetchmail-c95c2378c066f33c5b5bb1dadd3de366e49ee34e.tar.bz2 fetchmail-c95c2378c066f33c5b5bb1dadd3de366e49ee34e.zip |
configure.ac: fix cross-compilation with openssl
Since commit ca372c2c4fd4fa18cf035087203069e412adfa00, cross-compilation
fails on:
/data/buildroot-test/instance-0/output-1/host/bin/powerpc-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -I/data/buildroot-test/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include -I/usr/kerberos/include -L/data/buildroot-test/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/lib -o fetchmail socket.o getpass.o fetchmail.o env.o idle.o options.o daemon.o driver.o transact.o sink.o smtp.o idlist.o uid.o mxget.o md5ify.o cram.o gssapi.o opie.o interface.o netrc.o unmime.o conf.o checkalias.o uid_db.o lock.o rcfile_l.o rcfile_y.o ucs/norm_charmap.o fm_realpath.o pop3.o imap.o etrn.o odmr.o libfm.a -lintl -L/data/buildroot-test/instance-0/output-1/host/bin/../powerpc-buildroot-linux-uclibc/sysroot/usr/lib -lssl -lcrypto /usr/lib/libssl.so /usr/lib/libcrypto.so /usr/lib/libcrypto.so
/data/buildroot-test/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/powerpc-buildroot-linux-uclibc/8.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: /usr/lib/libssl.so: error adding symbols: file in wrong format
This build failure is raised because pkg-config values are overriden by
AC_LIB_LINKFLAGS which can pull libraries from the host. So, don't
unconditionally call AC_LIB_LINKFLAGS when cross-compiling. It should be
noted that AC_LIB_LINKFLAGS is used as a fallback of case pkg-config
since commit c92eb3c1895f10a9a4d3229ac883071b62db3920.
Fixes:
- http://autobuild.buildroot.org/results/1b24f0ada47ca1913321d148981364ce513465ac
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Merge request !23.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | configure.ac | 9 |
2 files changed, 7 insertions, 3 deletions
@@ -67,6 +67,7 @@ removed from a 6.5.0 or newer release.) # BUG FIXES * Fix a typo in the manual page reported by David McKelvie. +* Fix cross-compilation with openssl, by Fabrice Fontaine. -------------------------------------------------------------------------------- fetchmail-6.4.14 (released 2020-11-26, 27608 LoC): diff --git a/configure.ac b/configure.ac index 554d152c..203469b1 100644 --- a/configure.ac +++ b/configure.ac @@ -801,10 +801,13 @@ else AC_MSG_WARN(Consider re-running configure --with-ssl.) fi -AC_LIB_LINKFLAGS([crypto]) -AC_LIB_LINKFLAGS([ssl], [crypto]) +if test "$cross_compiling" != yes +then + AC_LIB_LINKFLAGS([crypto]) + AC_LIB_LINKFLAGS([ssl], [crypto]) -LIBS="$LIBS $LIBSSL $LIBCRYPTO" + LIBS="$LIBS $LIBSSL $LIBCRYPTO" +fi AC_MSG_NOTICE([LIBS:] "$LIBS") case "$LIBS" in *-lssl*|*libssl*) |