- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An easy way to improve gcc compatibility is to define the "__amd64__", "__amd64", or "amd64" symbols. gcc defines the first two, along with "__x86_64__". icc only defines "__x86_64__". Interesting. Politics, anyone?
Much free software checks for __amd64__ and not __x86_64__ which is why this is an issue.
For instance
#ifdef __amd64__
do64bitStuff();
#endif
This code works as expected when compiled with gcc, but has to be modified to be
#if defined __amd64__ || defined __x86_64__
do64bitStuff();
#endif
to be compiled by icc correctly.
Much free software checks for __amd64__ and not __x86_64__ which is why this is an issue.
For instance
#ifdef __amd64__
do64bitStuff();
#endif
This code works as expected when compiled with gcc, but has to be modified to be
#if defined __amd64__ || defined __x86_64__
do64bitStuff();
#endif
to be compiled by icc correctly.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We understand that __amd64__ is used because AMD came out with the 64-bit extensions before Intel did and thus older code still uses the former #define.
However, we think x86_64 makes more sense since it is a standard across all architectures, not limited to AMD, thus it does not makes sense to continue to propagate the former.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you really need them, you could add -D__amd64__ and -D__amd64 to icc.cfg. This file should live in the same directory where the Intel64 icc binary lives, typically /opt/intel/cce//bin on Linux and Mac.
Dale
Dale
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page