Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383865 - dev-libs/libgcrypt: fix symbol prefix behavior when cross-compiling
Summary: dev-libs/libgcrypt: fix symbol prefix behavior when cross-compiling
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Crypto team [DISABLED]
Depends on:
Reported: 2011-09-20 21:11 UTC by SpanKY
Modified: 2014-01-24 21:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2011-09-20 21:11:28 UTC
ok to commit ?

@@ -4,6 +4,8 @@
+inherit toolchain-funcs
 DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
@@ -18,6 +20,19 @@
 src_configure() {
+       if tc-is-cross-compiler ; then
+               # The libgcrypt configure code is really stupid and assumes
+               # that you have an underscore symbol whenever you cross-compile.
+               # Ask gcc to see what it does instead.
+               local symprefix=$($(tc-getCPP) -E - <<<__USER_LABEL_PREFIX__ | tail -1)
+               case ${symprefix} in
+               __USER_LABEL_PREFIX__) ;; # nothing we can do here
+               "") export ac_cv_sys_symbol_underscore=no ;;
+               _)  export ac_cv_sys_symbol_underscore=yes ;;
+               *)  die "unknown symbol prefix: ${symprefix}" ;;
+               esac
+       fi
        # --disable-padlock-support for bug #201917
        econf \
                --disable-padlock-support \
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-09-20 21:24:19 UTC
nack, this is not upstreamable and we'd have to keep it forever this way — can you get to the source of the trouble, or can you wait for Thursday for me to look at it?
Comment 2 SpanKY gentoo-dev 2011-09-20 22:07:48 UTC
working with upstream gnupg is like pulling teeth.  things are working in parallel, not serial, to get resolved.  so i'm not going to sit around and see what the gnupg peeps feel like using while the ebuilds stay broken.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-09-22 14:19:41 UTC
Fixed to use libtool's macro to do the same thing. If that leads to wrong results, fix libtool, don't hack libgcrypt.
Comment 4 SpanKY gentoo-dev 2011-09-22 22:04:46 UTC
your change is incomplete.  the broken code in acinclude.m4 still remains.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-09-22 22:21:16 UTC
The acinclude.m4 code is dead code since it's not called, and I've sent the removal of it upstream, so the issue is solved as the code is never hit.

Please refrain from reopening.