This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190249 - use compiler release version to determine OSS compiler version
Summary: use compiler release version to determine OSS compiler version
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Toolchain (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 21:36 UTC by Thomas Preisler
Modified: 2014-04-14 14:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2010-09-08 21:36:50 UTC
We should use the compiler release version number to safely and reliably detect the version of a OSS compiler. The compiler team has agreed to increase this number in every release including in express releases enabling us to safely distinguish all releases. Moreover the release number will always increase so if we see a larger number than we already have identified, we know it is a future release (as opposite to an older release) giving us an opportunity to safely handle future releases. Because older release didn't follow this pattern we cannot use this number to detect previous release.

The algorithm we should use for Spica express (currently in sstrunk) is

0x5120                          => OSSXSpica
<number> > 0x5120 => future release. Name it OracleSolarisStudio and assume same
                                              capabilities as 0x5120

Past express release, the algorithm should look like this:

0x5120                          => OSSXSpica
0x5130                          => OracleSolarisStudio12.3 (guessing the name here)
<number> > 0x5130 => future release. Name it OracleSolarisStudio and assume same
                                              capabilities as 0x5130

and so on. 

Note: Fortran uses different numbers.

How to get this version from the compilers:

Use these macros:
 cc  __SUNPRO_C=0x5110
 CC  __SUNPRO_CC=0x5110
 f77 __SUNPRO_F95=0x850
 f90 __SUNPRO_F95=0x850
 f95 __SUNPRO_F95=0x850 

Which can be obtained from:
cc: -xdryrun xxx.c
CC: -xdryrun xxx.cc, or -xdumpmacros -E xxx.cc
f77, f90, f95: -dryrun xxx.F <=== capital F is important!
Comment 1 Alexander Pepin 2010-11-03 17:58:55 UTC
Converted to enhancement.