[PATCH] Make __attribute__ conditional in all installed headers

Mark Wielaard mark@klomp.org
Tue May 2 11:56:00 GMT 2017

On Thu, 2017-04-20 at 15:55 +0200, Ulf Hermann wrote:
> __attribute__ is a GNU extension. If we want to link against the
> libraries using a different compiler, it needs to be disabled. It was
> already disabled in libdw.h, and this patch extends this to the other
> headers. We move the defines to libelf.h as that is included in all
> the others.

Looks like a nice cleanup in general.

My only concern was that libelf.h is a "more" public header than libdw.h
and so the macros could in theory clash with other code. But I couldn't
find any other code that uses them except elfutils code itself. And if
there was any then we already exported them through libdw.h anyway. It
does add another explicit dependency between elfutils libdw and elfutils
libelf, but given that libdw already does have some dependencies on
elfutils libelf internals I don't think that matters.

Applied to master.



More information about the Elfutils-devel mailing list