Page MenuHome GnuPG

Solaris 9 Sparc/gcc build fix
Closed, ResolvedPublic

Description

Fix for compiling on Solaris SPARC with gcc.

If sparcv8 is defined, use the SPARC v8 version of udiv_qrnnd. Without
this change, udiv_qrnnd will not be defined using the SPARC v8 udiv
instruction, and the default SPARC v7 case of defining it to be the native
gmpn_udiv_qrnnd will be used, but this does not exist on SPARC v8, so
at link time, the user will get an error about _gmpn_udiv_qrnnd being
undefined. gcc defines __sparcv8.

The attached, trivial patch fixes this.
(This patch was written by Simon Kuhn <sak8@eecs.cwru.edu> for pkgsrc in 2004. I
don't know why it was not sent upstream earlier. More details in
http://gnats.netbsd.org/26815 )

Details

Version
1.6.2

Related Objects

Event Timeline

Given that the code in question is preety old and this is the first problem
report on it, I hesitate to apply the patch as is. You you mind if I make it
netbsd specific?

Well, it was added as a bugfix for Solaris 9, not NetBSD.
http://gnats.netbsd.org/26815

I'll try finding someone who can provide more input if the patch is still needed
or not.

I didn't find anyone.
I've just removed this patch from pkgsrc.
We can come back to this later if someone shows interest and can test it.

wiz claimed this task.

sevan@NetBSD.org just reported that it is needed on Solaris 10, otherwise
linking libgcrypt.so fails with:

Undefined first referenced

symbol in file

__udiv_qrnnd ./.libs/libgcrypt.so

ld: fatal: symbol referencing errors. No output written to .libs/mpicalc

collect2: ld returned 1 exit status

So please apply the change after all.

Applied for 1.6.4 and master

werner removed a project: Restricted Project.