JDK-8003591 : Abstract_VM_Version::internal_vm_info_string needs to stringify FLOAT_ARCH for ease of use
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs24,hs25
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-11-18
  • Updated: 2014-06-26
  • Resolved: 2012-11-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Description
 Abstract_VM_Version::internal_vm_info_string allows the version string to contain an optional FLOAT_ARCH component that can be set externally by invoking the compiler with -DFLOAT_ARCH=...

At present the code assumes/requires that FLOAT_ARCH is set to a string literal, hence in normal invocation you would have to invoke the compiler as:

gcc -DFLOAT_ARCH='"my-float-arch"'

However if the compiler is invoked by a makefile, and you try to set this via a make variable, or even by a shell variable that invokes make from a script, then you need to use multiple levels of "escape" characters to ensure that the final result is a string literal. This is impractical in general.

A simpler solution is to change  Abstract_VM_Version::internal_vm_info_string to not expect a string literal and to stringify it using the XSTR macro (already used elsewhere in the VM_version code).