Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

__symver__ not supported

Sachs__Stephen
Beginner
714 Views

It looks like icc (2021.7.0) does not recognize __attribute__(__symver__) although __GNUC__ is set. This attrtibute has been added to GCC10. A simple test is here: https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/ipa/symver1.c

 
I have come around this as xz has added this syntax to version 5.2.7. They check for GCC through __GNUC__ and __GNUC_MINOR__. As icc identifies to be GNUC >=10.0, they use the new syntax.
 
Compiler message:
common/hardware_cputhreads.c(21): warning #1292: unknown attribute "__symver__"
 
I have verified that the symbol version is not added to the object file.
0 Kudos
5 Replies
NoorjahanSk_Intel
Moderator
686 Views

Hi,


Thanks for reaching out to us.


This attribute is specific to GCC at this moment. There is no support for this attribute in ICC/ICX.

Could you please try using the asm snippets in the code, e.g. _asm_(".symver foo_v1, foo@v1");? as this is an alternative to be used.


Thanks & Regards,

Noorjahan.


0 Kudos
Sachs__Stephen
Beginner
678 Views

Hi Noorjahan,

 

Thanks for your answer.  The compiler  sets __GNUC__ and __GNUC_MINOR__. This is picked up by the preprocessor macro to identify GCC>=10.0. Wouldn't it make sense to only identify as GCC>=10.0 if the new syntax is not supported?

 

Thanks,

Stephen.

0 Kudos
NoorjahanSk_Intel
Moderator
590 Views

Hi,

 

Thanks for reporting the issue. We are also able to reproduce the issue and we have forwarded it to the concerned development team.

This feature will be supported by icx, so We recommend you migrate to icx as the classic compiler(icc/icl) is deprecated now and will be removed in Intel oneAPI 2023.

At this moment there is no visibility of when it will be implemented and available for use, please refer release notes of the icx compiler to get the updates. Please let me know if we can go ahead and close this case.

https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-dpc-c-compiler-release-notes.html

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
Sachs__Stephen
Beginner
580 Views

Hi Noorjahan,

 

Yes you can close it. I contacted the xz developers and they assured me they will check for __INTEL_COMPILER before using the new GCC syntax starting from xz version 5.2.8.

 

Thanks,

Stephen.

 

0 Kudos
NoorjahanSk_Intel
Moderator
557 Views

Hi,


Thanks for the confirmation.

As this issue has been resolved, we will no longer respond to this thread. If you need any additional information, please post a new question


Thanks & Regards,

Noorjahan.


0 Kudos
Reply