This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] Make __attribute__ conditional in all installed headers
- From: Mark Wielaard <mark at klomp dot org>
- To: Ulf Hermann <ulf dot hermann at qt dot io>
- Cc: elfutils-devel at sourceware dot org
- Date: Tue, 02 May 2017 13:17:24 +0200
- Subject: Re: [PATCH] Make __attribute__ conditional in all installed headers
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
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.