This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix build with GCC 4


On Sat, Mar 05, 2005 at 03:30:00PM +0100, Andreas Schwab wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
> 
> > --- libc/sysdeps/i386/dl-machine.h.jj	2005-02-16 20:16:33.000000000 -0500
> > +++ libc/sysdeps/i386/dl-machine.h	2005-03-04 16:50:32.313591897 -0500
> > @@ -301,9 +301,7 @@ elf_machine_plt_value (struct link_map *
> >  
> >  /* The i386 never uses Elf32_Rela relocations for the dynamic linker.
> >     Prelinked libraries may use Elf32_Rela though.  */
> > -#ifdef RTLD_BOOTSTRAP
> > -# define ELF_MACHINE_NO_RELA 1
> > -#endif
> > +#define ELF_MACHINE_NO_RELA (defined RTLD_BOOTSTRAP)
> 
> Does gcc guarantee that this works (which would be an extension wrt the C
> standard)?

It certainly works with all GCC's I've tried: 2.96-RH, 3.2.3, 3.3.4, 3.4.3,
4.0 branch, HEAD.
And because this is an internal header, if it stops working in some future
compiler version, then we can change it.
FYI, glibc already uses this in _G_config.h:
$ find . -name \*.[chS] | xargs grep _G_HAVE_ST_BLKSIZE
./sysdeps/gnu/_G_config.h:#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
./sysdeps/generic/_G_config.h:#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
./sysdeps/mach/hurd/_G_config.h:#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
./libio/libio.h:#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
$ find . -name \*.[chS] | xargs grep _IO_HAVE_ST_BLKSIZE
./libio/wfiledoalloc.c:#if _IO_HAVE_ST_BLKSIZE
./libio/libio.h:#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
./libio/filedoalloc.c:#if _IO_HAVE_ST_BLKSIZE

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]