Mailing List Archive

solaris fixes
Apologies if these already got mentioned for the next release.. I don't think I
can be too specific about these (ITAR grumble grumble), else I'd just attach
the patches. But I think it should be pretty clear what needs fixing.

checks/mds.test: the $(foo) syntax requires bash. Using `foo` works fine
in this case because there are no really weird shell
expansions inside.
checks/run-gpg: solaris fgrep cannot take patterns from stdin. I moved
the patterns to a file "run-gpg.patterns" and -f that
instead of using "-f -" and a here-doc.
cipher/tiger.c: the byte array in TIGER_CONTEXT is accessed as a 64 bit
quantity at some point. This crashes processors that require
64 bit alignment on those accesses. Shuffling the members
to allow buf[] to be aligned solves the problem.

That's it for the fixes that shouldn't break anything else. The key generation
timeout in checks/genkey1024.test is too fast for my machine by a factor of 5
(sigh.. and I thought UltraSparcs were supposed to be fast..). I still haven't
come up with a portable way of dealing with the missing __muldi3. Maybe just
throw in a dummy multiply (of the same type used in.. was it tiger.c? one of
the extension modules.. u32 * u32?) in g10.c somewhere and hope it doesn't get
optimized away?

thanks,
-Brian
Re: solaris fixes [ In reply to ]
Brian Warner <warner@lothar.com> writes:
>
> checks/mds.test: the $(foo) syntax requires bash. Using `foo` works fine
> in this case because there are no really weird shell
> expansions inside.

Done. And I learned that Solaris does not have a POSIX shell.

> checks/run-gpg: solaris fgrep cannot take patterns from stdin. I moved
> the patterns to a file "run-gpg.patterns" and -f that
> instead of using "-f -" and a here-doc.

Done.

> cipher/tiger.c: the byte array in TIGER_CONTEXT is accessed as a 64 bit
> quantity at some point. This crashes processors that require
> 64 bit alignment on those accesses. Shuffling the members
> to allow buf[] to be aligned solves the problem.

Done but not tested (I think it worked on an Alpha with disabled
alignment emulation)

> timeout in checks/genkey1024.test is too fast for my machine by a factor of 5

Increased.

> come up with a portable way of dealing with the missing __muldi3. Maybe just
> throw in a dummy multiply (of the same type used in.. was it tiger.c? one of
> the extension modules.. u32 * u32?) in g10.c somewhere and hope it doesn't get

I have put:

{ /* a kludge to pull in the __muldi3 for Solaris */
volatile u32 a = (u32)md,
volatile u32 b = 42;
volatile u64 c;
c = a * b;
}

into cipher/md.c:md_start_debug()


Werner
Re: solaris fixes [ In reply to ]
On Sep 23, 12:46pm, Werner Koch wrote:
> Brian Warner <warner@lothar.com> writes:
> >
> > checks/mds.test: the $(foo) syntax requires bash. Using `foo` works fine
> > in this case because there are no really weird shell
> > expansions inside.
>
> Done. And I learned that Solaris does not have a POSIX shell.

Solaris /bin/sh doesn't support $(foo) but /bin/ksh does. On Irix 6.5,
even though /bin/ksh and /bin/sh are linked together, that $(foo) syntax
is one of the few things that are deliberately disabled when /bin/sh is
invoked.



Another FYI: I found that the "-rdynamic" flag is not recognized on
Solaris gcc by default. Instead, with a gcc that is configured to use
GNU's assembler and linker, I had to use -Wl,-export-dynamic which is
apparently what -rdynamic translates into on Linux. Without that,
the --load-extension feature doesn't work. On the other hand, if
gcc is configured to use the Solaris assembler and linker, --load-extension
works even though -rdynamic is ignored. Brian told me that many gcc
installations on Solaris that he's familiar with are configured to
use the Solaris assembler and linker by default. It was not that way
on my system, but I could force gcc to use them with -B/usr/ccs/bin/.

- Dave Dykstra