I cannot emerge dev-libs/openssl-1.0.1a on my MIPS64 system with n32 ABI. The build fails on linking libcrypt.so with this error message: + mips64el-unknown-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -Wall -O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop -fno-strict-aliasing -Wa,--noexecstack -o openssl openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o -L.. -lssl -L.. -lcrypto -ldl -lz ../libcrypto.so: undefined reference to `OPENSSL_ia32cap_P' collect2: ld returned 1 exit status make[2]: *** [link_app.gnu] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-libs/openssl-1.0.1a/work/openssl-1.0.1a/apps' This is my toolchain settings: CFLAGS="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop" CXXFLAGS="$CFLAGS" LDFLAGS="-Wl,-O1 -Wl,--as-needed" CHOST="mips64el-unknown-linux-gnu" I found similar report for ARM on openssl-dev list (http://www.mail-archive.com/openssl-dev@openssl.org/msg30854.html) which refers to committed patch <http://cvs.openssl.org/chngview?cn=22455> which is not part of dev-libs/openssl-1.0.1a. I have not yet tried the patch because I have no idea how secure the change is.
I confirm the patch applies cleanly and allows to link the library.
should be all set now in the tree; thanks for the report! Commit message: Add fix from upstream for building on non-x86 arches http://sources.gentoo.org/dev-libs/openssl/files/openssl-1.0.1a-hmac-ia32cap.patch?rev=1.1 http://sources.gentoo.org/dev-libs/openssl/openssl-1.0.1a.ebuild?r1=1.2&r2=1.3