This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [RFC, PATCH, MIPS] Add support for O32 FPXX and program header based ABI information
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>, Rich Fuhler <Rich dot Fuhler at imgtec dot com>, "macro at codesourcery dot com" <macro at codesourcery dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 2 May 2014 06:55:16 +0000
- Subject: RE: [RFC, PATCH, MIPS] Add support for O32 FPXX and program header based ABI information
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235351E3D7 at LEMAIL01 dot le dot imgtec dot org> <Pine dot LNX dot 4 dot 64 dot 1405012202330 dot 16441 at digraph dot polyomino dot org dot uk>
> We don't want to introduce new internal interfaces using #ifdef, because
> of the risk of typos being undetected. Thus, ELF_MACHINE_NEEDS_PHDR_CHECK
> should be a macro that all architectures define to either 0 or 1, tested
> with #if not #ifdef. Or, even better, have most architectures define a
> dummy version of elf_machine_phdr_check to which the call just gets
> optimized out, so no conditional code is needed in dl-load.c at all.
The dummy implementation is probably cleaner and exposes the hook clearly
to all the other architectures. I'll hold off making this change until
someone can approve the interface so I don't have to change it everywhere.
> We don't want to introduce new uses of __builtin_expect; use
> __glibc_likely / __glibc_unlikely instead.
OK
> To avoid -Wundef warnings, and in line with the principle about avoiding
> #ifdef interfaces, make HAVE_MIPS_MODULE_FPXX_DIRECTIVE a 1/0 macro rather
> than a defined/undefined one. (Right now you have it defined/undefined
> but also test with #if, leading to warnings in the undefined case.)
My autoconf knowledge isn't brilliant. Should I do the following in the
not-supported case:
AC_DEFINE_UNQUOTED(HAVE_MIPS_MODULE_FPXX_DIRECTIVE, 0)
Or should/can I put the default in config.h.in like this:
#define HAVE_MIPS_MODULE_FPXX_DIRECTIVE 0
It looks like this will be the first config.h.in macro to be defined like
this so I'm not sure which way to go.
Regards,
Matthew