Bug 198822 - [PATCH] Lack os support for ICC in sys/cdefs.h header
Summary: [PATCH] Lack os support for ICC in sys/cdefs.h header
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Tijl Coosemans
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-03-23 07:50 UTC by Sergey Melnikov
Modified: 2015-06-30 08:41 UTC (History)
3 users (show)

See Also:
tijl: mfc-stable10+
tijl: mfc-stable9+


Attachments
fix (747 bytes, patch)
2015-03-23 08:29 UTC, Sergey Melnikov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Melnikov 2015-03-23 07:50:22 UTC
It looks like for hictorical reasons FreeBSD's header 'sys/cdefs.h' doesn't recognize ICC as a GNU-support compiler. Thus, few important macroses aren't defined for ICC.

Details:
During '__GNUCLIKE_BUILTIN_VARARGS', '__GNUCLIKE_BUILTIN_STDARG', '__GNUCLIKE_BUILTIN_VAALIST' macroses definition pure '__GNUC_MINOR__' and '__GNUC__' macroses were used as a condition.
I propose to switch condition to '__GNUC_PREREQ__' macro and recognize ICC as a GNU-compatible compiler.

Proposed fix description:
1. Move '__GNUC_PREREQ__' macro definition to the beginning of 'sys/cdefs.h' header in order to make it available as a condition for the next point.
2. Change condition of '__GNUCLIKE_BUILTIN_*' macroses definition to '__GNUC_PREREQ__' macro usage.
Comment 1 Sergey Melnikov 2015-03-23 08:29:02 UTC
Created attachment 154696 [details]
fix
Comment 2 Ed Maste freebsd_committer freebsd_triage 2015-03-23 20:18:33 UTC
We've had some vestigial ICC support in the tree for some time, but the build infrastructure pieces were removed in r220863:

> Remove support for the Intel C Compiler from the build infrastructure.     
> This support has not worked for several years, and is not likely to work   
> again, unless Intel decides to release a native FreeBSD version of their   
> compiler. ;)

Is there a broader interest in restoring FreeBSD ICC support?
Comment 3 Sergey Melnikov 2015-03-24 10:59:45 UTC
At this point we want to restore the compatibility between ICC and system headers. In other words we do want to restore FreeBSD ICC support on user level. No other plans at this point.
Comment 4 Sergey Melnikov 2015-06-15 07:44:33 UTC
Hi guys, do you have a plan to merge my fix to FBSD trunk?
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-06-25 19:39:47 UTC
A commit references this bug:

Author: tijl
Date: Thu Jun 25 19:39:07 UTC 2015
New revision: 284858
URL: https://svnweb.freebsd.org/changeset/base/284858

Log:
  Enable the use of __builtin_va_* for ICC.

  PR:		198822
  Submitted by:	Sergey Melnikov <sergey.melnikov@intel.com>
  MFC after:	5 days

Changes:
  head/sys/sys/cdefs.h
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-06-30 08:40:35 UTC
A commit references this bug:

Author: tijl
Date: Tue Jun 30 08:39:35 UTC 2015
New revision: 284947
URL: https://svnweb.freebsd.org/changeset/base/284947

Log:
  MFC r284858:

  Enable the use of __builtin_va_* for ICC.

  PR:		198822
  Submitted by:	Sergey Melnikov <sergey.melnikov@intel.com>

Changes:
_U  stable/9/
_U  stable/9/sys/
_U  stable/9/sys/sys/
  stable/9/sys/sys/cdefs.h
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-06-30 08:40:37 UTC
A commit references this bug:

Author: tijl
Date: Tue Jun 30 08:40:16 UTC 2015
New revision: 284948
URL: https://svnweb.freebsd.org/changeset/base/284948

Log:
  MFC r284858:

  Enable the use of __builtin_va_* for ICC.

  PR:		198822
  Submitted by:	Sergey Melnikov <sergey.melnikov@intel.com>

Changes:
_U  stable/10/
  stable/10/sys/sys/cdefs.h