This is the mail archive of the libc-alpha@sourceware.org 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: [RFC, PATCH, MIPS] Add support for O32 FPXX and program header based ABI information


> 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


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