This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [lto, build] Provide elf_getshdrstrndx replacement


On Mon, Apr 19, 2010 at 4:02 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Mon, Apr 19, 2010 at 3:55 PM, Rainer Orth
> <ro@cebitec.uni-bielefeld.de> wrote:
>> Richard Guenther <richard.guenther@gmail.com> writes:
>>
>>> I have
>>>
>>> /* Define to 1 if you have the `elf_getshdrstrndx' function. */
>>> #ifndef USED_FOR_TARGET
>>> /* #undef HAVE_ELF_GETSHDRSTRNDX */
>>> #endif
>>>
>>>
>>> /* Define to 1 if you have the `elf_getshstrndx' function. */
>>> #ifndef USED_FOR_TARGET
>>> #define HAVE_ELF_GETSHSTRNDX 1
>>> #endif
>>>
>>> and elfutils libelf.
>>
>> That one implements the gABI elf_getshstrndx AFAIK, so
>> HAVE_ELF_GETSHSTRNDX_GABI should be defined.
>>
>>> Appearantly your elf_getshdrstrnd wrapper doesn't work.
>>> elf_getshstrndx returns zero for me. ?So it appears
>>> that instead of ? 0 : -1 you should simply forward the
>>> return value.
>>
>> Which is done in the HAVE_ELF_GETSHSTRNDX_GABI case. ?Could you check
>> gcc/config.log to find out why the configure test doesn't detect this?
>
> And honza now reports
>
> ?../../gcc/lto/lto-elf.c:469:3: error: 'elf_getshstrndx' is
> ? ? ? ? ? ? ? deprecated (declared at /home/jh/trunk/libelf/lib/libelf.h:261)
>
> thus, the configure checks should probably use -Werror (which
> won't reliably work for non-gcc host compilers ...). ?Or we
> should build with -Wno-deprecated-declarations.

For reference, the following is the patch I'm testing.

Richard.

Attachment: p
Description: Binary data


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