From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Neutron Soutmun <neo.neutron@gmail.com>
Cc: Jan Engelhardt <jengelh@inai.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] libmnl: Failed to build with clang, incompatible EXPORT_SYMBOL(x) macro
Date: Thu, 1 Oct 2015 12:15:15 +0200 [thread overview]
Message-ID: <20151001101515.GA2313@salvia> (raw)
In-Reply-To: <CAMQP0s=TACNduhH+_w0yWLtHnS5rUaQXXvKOfoVR7Mqz2ZYDhA@mail.gmail.com>
On Thu, Oct 01, 2015 at 04:30:23PM +0700, Neutron Soutmun wrote:
> On Thu, Oct 1, 2015 at 4:20 PM, Jan Engelhardt <jengelh@inai.de> wrote:
> >
> > On Thursday 2015-10-01 00:12, Pablo Neira Ayuso wrote:
> >>On Fri, Sep 25, 2015 at 11:07:45AM +0700, Neutron Soutmun wrote:
> >>> The EXPORT_SYMBOL(x) macro causes clang compile error and warning
> >>> messges:
> >>> error, "note: previous definition is here"
> >>> warning, "warning: attribute declaration must precede definition
> >>> [-Wignored-attributes]"
> >>> See: [1]
> >>>
> >>> This proposed patch has been prepared to fix this error which make the
> >>> EXPORT_SYMBOL macro define a precede definition of an attribute
> >>> declaration. This approach is both compatible with gcc and clang.
> >>
> >>We have more libraries using this approach, which resembles kernel
> >>coding. So we would need to update them all, which is a bit annoying.
> >
> > If you use an export map (-Wl,--version-script=), you don't strictly
> > need to have any of the EXPORT_SYMBOL tags in the C source.
>
> +1
That sounds as a smaller patch, please send it to me for the existing
libraries that we have. Thanks.
next prev parent reply other threads:[~2015-10-01 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 4:07 [PATCH] libmnl: Failed to build with clang, incompatible EXPORT_SYMBOL(x) macro Neutron Soutmun
2015-09-30 22:12 ` Pablo Neira Ayuso
2015-10-01 3:15 ` Neutron Soutmun
2015-10-01 9:20 ` Jan Engelhardt
2015-10-01 9:30 ` Neutron Soutmun
2015-10-01 10:15 ` Pablo Neira Ayuso [this message]
2015-10-01 10:29 ` Neutron Soutmun
2015-10-01 11:12 ` Neutron Soutmun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151001101515.GA2313@salvia \
--to=pablo@netfilter.org \
--cc=jengelh@inai.de \
--cc=neo.neutron@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).