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


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: check-textrel


On Mon, Feb 10, 2003 at 08:36:41PM -0800, Ulrich Drepper wrote:
> Alan Modra wrote:
> > This test breaks when cross-compiling powerpc64-linux glibc from
> > a powerpc-linux host.  Problem is that e_phoff is 64 bits while
> > pread expects a 32-bit offset.
> 
> That's no problem.  The compiler truncates the 64 bit value.  If it
> doesn't it's a compiler bug.  SO what is it?

Errm, true.  It does look like a compiler bug.

> And what about this:
> 
> +#define _XOPEN_SOURCE 500
> +#define _BSD_SOURCE 1

That's to get the pread prototype.

$ gcc -O -Wall  -include ../config.h /src/libc-current/elf/check-textrel.c -o zzz
In file included from /src/libc-current/elf/check-textrel.c:125:
/src/libc-current/elf/check-textrel.c: In function `handle_file32':
/src/libc-current/elf/check-textrel.c:62: warning: implicit declaration of function `pread'
/src/libc-current/elf/check-textrel.c:69: warning: suggest parentheses around && within ||
[snip]
> 
> That's completely unnecessary.  All of glibc is compiled with
> _GNU_SOURCE defined.

Not this file.  The above gcc command line, with the exception of -Wall
and -o was taken from my "make check" log.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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