Date: Fri, 21 Oct 2011 05:21:45 +0400
From: Solar Designer <solar@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: mpc, gmp, mpfr, gcc .specs
Vasiliy,
Thank you for fixing glibc! I've distworld'ed the commits so far - so
they're seen via anoncvs, cvsweb, and in native.tar.gz now.
On Thu, Oct 20, 2011 at 05:53:33PM +0400, Vasiliy Kulikov wrote:
> These are spec files for gcc 4.6.1 and its dependencies.
> On testing 32 and 64 bit systems they pass rebuild world.
Great!
> I think we may commit it
Yes, but I have a concern about this - see below.
> and add compat support afterwards.
You mean gcc 3.4.5's libstd++ binaries, right?
So, my concern is about this:
> # Important for %ix86:
> # This rpm has to be build on a CPU with sse2 support like Pentium 4 !
Why? Is this for build-time tests of optional SSE2-specific code that
gets compiled in? Does the installed package nevertheless work on CPUs
lacking SSE2? If these guesses are correct, then can we skip such tests
when building on a CPU lacking SSE2, please? (BTW, this is what John
the Ripper does - it includes SSE2 code in its i686 builds, but when
building on a CPU lacking SSE2, that code remains untested, yet linked
in. Then at runtime it similarly only uses the SSE2 code if the actual
CPU has SSE2.)
If the resulting package actually requires SSE2 (rather than merely
supports it if present), then that's a bigger problem, which I think we
would also want to address.
> Summary: A GNU arbitrary precision librar.
Lost "y". ;-)
> ./configure --build=%_build --host=%_host \
> --program-prefix=%?_program_prefix \
Excessive indentation, I think. (Use one tab here.)
> mkdir %buildroot%_libdir/sse2
> install -m 755 .libs/libgmp.so.*.* %buildroot%_libdir/sse2
...
What programs will access the sse2/ subdirectory? How will they know to
look for it? Is this possibly something that will start working for us
for real once we update glibc (dynamic linker)?
> %check
> %ifnarch ppc
> cd base
> export LD_LIBRARY_PATH=`pwd`/.libs
> %__make check
> cd ..
> %endif
> %ifarch %ix86
> cd build-sse2
> export LD_LIBRARY_PATH=`pwd`/.libs
> %__make check
> cd ..
> %endif
So we need to somehow skip the second "%__make check" when the build
host CPU lacks SSE2. Perhaps just add a grep over /proc/cpuinfo in here?
(In JtR, this logic is included right in the compiled program.)
> %preun devel
> if [ $1 = 0 ]; then
We use "-eq" in such places.
> %description
>
> MPC is a C library for the arithmetic of complex numbers with
Extra empty line.
> %changelog
> * Mon Sep 05 2011 Vasiliy Kulikov <segoon-at-owl.openwall.com> xxx-owl1
> - Updated to xxx.
Please write a valid entry here before committing.
gcc.spec will need lots of cleanups, but it's OK to make them after your
initial commit.
Thanks,
Alexander