Gentoo Archives: gentoo-alt

From: Matt Michalowski <me@××××××××.au>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Re: [prefix] a few missing things for smooth x86-linux bootstrap
Date: Thu, 19 Apr 2007 04:54:52
Message-Id: 4626F60C.3080603@mattm.id.au
In Reply to: Re: [gentoo-alt] Re: [prefix] a few missing things for smooth x86-linux bootstrap by Fabian Groffen
Fabian Groffen wrote:
> On 19-04-2007 00:27:36 +1000, Matt Michalowski wrote: > >> Michael Haubenwallner wrote: >> >>> Ah yes, one more: >>> dev-libs/openssl-0.9.8e does not build on x86-linux, but 0.9.8d does. >>> So please remove that keyword by now, thanks! >>> >>> >> It builds for me on x86-linux, with CFLAGS simply set to "-O2 -march=i686". >> It breaks, as you pointed out the other week, with -g. >> > > So I better unmask and strip the -g flag? Feels awkward, I prefer to > keep it in p.mask for now. > >
Yeah, I agree it would be awkward. I've done some further investigating, and I was wrong about it being "-g", it's having no optimizations turned on: (-O0) # dhcp213:.../work/openssl-0.9.8e/crypto/engine# i686-pc-linux-gnu-gcc -I.. -I../.. -I../../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -Wall -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -Wa,--noexecstack -c -o eng_padlock.o eng_padlock.c -march=i686 -O0 eng_padlock.c: In function 'padlock_xcrypt_ecb': eng_padlock.c:445: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' where as: (-O1 -g) # dhcp213:.../work/openssl-0.9.8e/crypto/engine# i686-pc-linux-gnu-gcc -I.. -I../.. -I../../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -Wall -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -Wa,--noexecstack -c -o eng_padlock.o eng_padlock.c -O1 -g compiles fine. Now for my $0.02. eng_padlock is for VIA Padlock hardware support (hence its ASM implementation), which I don't imagine is many x86 users let alone prefix portage x86 users (I could be wrong :) ). It's pretty easy to disable the VIA support, and OpenSSL will still function without it. I've attached a patch. Maybe haubi will have some better ideas. Matt.

Attachments

File name MIME type
openssl-0.9.8e-novia.patch text/x-patch

Replies

Subject Author
Re: [gentoo-alt] Re: [prefix] a few missing things for smooth x86-linux bootstrap Michael Haubenwallner <michael.haubenwallner@×××××××.at>