United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 8003591 Abstract_VM_Version::internal_vm_info_string needs to stringify FLOAT_ARCH for ease of use
8003591 : Abstract_VM_Version::internal_vm_info_string needs to stringify FLOAT_ARCH for ease of use

Details
Type:
Enhancement
Submit Date:
2012-11-18
Status:
Resolved
Updated Date:
2013-04-30
Project Name:
JDK
Resolved Date:
2012-11-22
Component:
hotspot
OS:
Sub-Component:
runtime
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs24,hs25
Fixed Versions:
hs25

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

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).
                                    

Comments
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/6b881a6b0665
User:  amurillo
Date:  2012-12-01 02:59:09 +0000

                                     
2012-12-01
URL:   http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/6b881a6b0665
User:  dholmes
Date:  2012-11-22 04:33:40 +0000

                                     
2012-11-22



Hardware and Software, Engineered to Work Together