qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adel Boutros <Adelbout...@live.com>
Subject Re: [Proton-c 0.14.0] [Solaris SunStudio 12.1] Definition of __attribute__ macro
Date Fri, 07 Oct 2016 07:22:48 GMT
Thank you Cliff and Andrew,

Indeed, I had not seen the 2nd part about the default hidden visibility.

After some digging, I have found the equivalent for both parts on SunStudio. I will try to
apply it and let you know how it goes.

"-fvisibility=hidden"                              : -xldscope=hidden

"__attribute ((visibility ("default")))" : __global



From: Andrew Stitcher <astitcher@redhat.com>
Sent: Thursday, October 6, 2016 4:03:55 PM
To: users@qpid.apache.org
Subject: Re: [Proton-c 0.14.0] [Solaris SunStudio 12.1] Definition of __attribute__ macro

On Wed, 2016-10-05 at 08:03 +0000, Adel Boutros wrote:
> Hello,
> We are trying to compile Proton on Solaris. We have stumbled upon the
> usage of macro (__attribute__) which is only available in GCC and not
> on SunStudio.

In this case the simplest thing to do I believe is turn off symbol
hiding (there is a build option for this)

> In proton-c/bindings/cpp/include/proton/internal/export.hpp:
> #  define PN_CPP_EXPORT __attribute ((visibility ("default")))
> Checking GCC definition of "__attribute " and "visibility", it seems
> that default visibility does nothing because it is the default
> behavior.
> Is there a reason for this definition? If not, can we safely define
> PN_CPP_EXPORT and PN_CPP_CLASS_IMPORT  to empty macro in that case in
> the "#else" part?

I think this in conjunction with turning off symbol hiding will be
fine. Obviously you will then have many more symbols exported than
necessary - you may want to look into a linker symbol map for proton-c
to cut them down again to the ones actually needed.


To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message