Mailing List Archive

1.4.0/rijndael.c/do_padlock: can't find a register in class `GENERAL_REGS' while reloading `asm' on elder gccs
Hi,

trying to build libgcrypt on RHEL4 (gcc 3.4.6) and RHEL3 (gcc 3.2.3)
fails with the above on i386 (which is register starved anyway),
x86_64 for example builds fine.

As later gcc version can build this even on i386 it looks like a gcc
shortcoming of that era. Still one would like to be able to build
libgcrypt on these distros :(

With RHEL4's gcc 3.4.6 a possible workaround is to use -O0 to gcc, but
that doesn't work with RHEL3's 3.2.3. :(

bash-2.05b# gcc -O0 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -c -o rijndael.o rijndael.c
rijndael.c: In function `do_padlock':
rijndael.c:2062: can't find a register in class `GENERAL_REGS' while reloading `asm'

Is there any workaround to get this building on older gccs? Thanks!
--
Axel.Thimm at ATrpms.net
Re: 1.4.0/rijndael.c/do_padlock: can't find a register in class `GENERAL_REGS' while reloading `asm' on elder gccs [ In reply to ]
Sunday 13 January 2008 11:01:43 tarihinde Axel Thimm şunları yazmıştı:
> Hi,
>
> trying to build libgcrypt on RHEL4 (gcc 3.4.6) and RHEL3 (gcc 3.2.3)
> fails with the above on i386 (which is register starved anyway),
> x86_64 for example builds fine.
>
> As later gcc version can build this even on i386 it looks like a gcc
> shortcoming of that era. Still one would like to be able to build
> libgcrypt on these distros :(
>
> With RHEL4's gcc 3.4.6 a possible workaround is to use -O0 to gcc, but
> that doesn't work with RHEL3's 3.2.3. :(
>
> bash-2.05b# gcc -O0 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -c -o
> rijndael.o rijndael.c rijndael.c: In function `do_padlock':
> rijndael.c:2062: can't find a register in class `GENERAL_REGS' while
> reloading `asm'
>
> Is there any workaround to get this building on older gccs? Thanks!

At least try -O2 -fomit-frame-pointer as CFLAGS so that it can optimize away
some code which can reduce register usage.

Regards,
ismail

--
Never learn by your mistakes, if you do you may never dare to try again.

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: 1.4.0/rijndael.c/do_padlock: can't find a register in class `GENERAL_REGS' while reloading `asm' on elder gccs [ In reply to ]
On Sun, 13 Jan 2008 10:01, Axel.Thimm@ATrpms.net said:

> Is there any workaround to get this building on older gccs? Thanks!

./configure --disable-padlock

should help.

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: 1.4.0/rijndael.c/do_padlock: can't find a register in class `GENERAL_REGS' while reloading `asm' on elder gccs [ In reply to ]
On Sun, Jan 13, 2008 at 01:52:39PM +0200, Ismail Dönmez wrote:
> Sunday 13 January 2008 11:01:43 tarihinde Axel Thimm şunları yazmıştı:
> > trying to build libgcrypt on RHEL4 (gcc 3.4.6) and RHEL3 (gcc 3.2.3)
> > fails with the above on i386 (which is register starved anyway),
> > x86_64 for example builds fine.
> >
> > As later gcc version can build this even on i386 it looks like a gcc
> > shortcoming of that era. Still one would like to be able to build
> > libgcrypt on these distros :(
> >
> > With RHEL4's gcc 3.4.6 a possible workaround is to use -O0 to gcc, but
> > that doesn't work with RHEL3's 3.2.3. :(
> >
> > bash-2.05b# gcc -O0 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -c -o
> > rijndael.o rijndael.c rijndael.c: In function `do_padlock':
> > rijndael.c:2062: can't find a register in class `GENERAL_REGS' while
> > reloading `asm'
> >
> > Is there any workaround to get this building on older gccs? Thanks!
>
> At least try -O2 -fomit-frame-pointer as CFLAGS so that it can optimize away
> some code which can reduce register usage.

Thanks, that did it!

On Mon, Jan 14, 2008 at 08:13:09PM +0100, Werner Koch wrote:
> > Is there any workaround to get this building on older gccs? Thanks!
>
> ./configure --disable-padlock
>
> should help.

Should I prefer this over the -fomit-frame-pointer flag?
--
Axel.Thimm at ATrpms.net