Re: [gtk-list] Re: Poblem compiling Glib 1.2.4
- From: Kevin Handy <kth srv net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Poblem compiling Glib 1.2.4
- Date: Wed, 25 Aug 1999 09:32:18 -0600
I got the FAQ out of the source code for GCC-2.95.1, and seems
to be available at http://egcs.cygnus.com/faq.html , but the
section in question reads as follows:
FD_ZERO macro
The FD_ZERO macro in (e.g.) libc-5.4.46 is incorrect. It uses
[72]invalid asm clobbers. The following rewrite by Ulrich Drepper
<drepper@cygnus.com> should fix this for glibc 2.0:
# define __FD_ZERO(fdsetp) \
do { \
int __d0, __d1; \
__asm__ __volatile__ ("cld; rep; stosl" \
: "=m" (((__fd_mask *) \
(fdsetp))[__FDELT (__FD_SETSIZE)]), \
"=&c" (__d0), "=&D" (__d1) \
: "a" (0), "1" (sizeof (__fd_set) \
/ sizeof (__fd_mask)), \
"2" ((__fd_mask *) (fdsetp)) \
: "memory"); \
} while (0)
The error generated reads
make[2]: Entering directory `/home/kevin/glib-1.2.4'
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-DG_LOG_DOMAIN...
rm -f .libs/gerror.lo
gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2
-Wall -o...
gerror.c: In function `stack_trace':
gerror.c:247: Invalid `asm' statement:
gerror.c:247: fixed or forbidden register 2 (cx) was spilled for class
CREG.
make[2]: *** [gerror.lo] Error 1
make[2]: Leaving directory `/home/kevin/glib-1.2.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kevin/glib-1.2.4'
make: *** [all-recursive-am] Error 2
(A couple of the lines are cut off because of the screen width, but you
should
be able to figure them out)
Tim Janik wrote:
>
> On Tue, 24 Aug 1999, Kevin Handy wrote:
>
> > When compiling Glib 1.2.4 on a RedHat 5.2 system with gcc 2.95.1,
> > I got an error about FD_ZERO used in gerror.c.
> >
> > In the GCC-2.95.1 FAQ file, it states that the FD_ZERO macro
> > supplied with libc-5.4.46 is incorrect (invalid asm clobbers)
> > and gives replacement code for it. Using that code makes the
> > compile work.
> >
> > Is it possible to add a test in the configure to test for
> > the bad FD_ZERO code? I don't know if it is broken only for
> > gcc-2.95.1, or for previous versions also, the FAQ is not
> > specific.
> >
> > Just thought I ought to give a warning about this in case anyone
> > else tries this.
>
> could you post the exact error you are getting and give an URL
> for that FAQ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]