United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7150392 Linux build breaks with GCC 4.7 due to unrecognized option
JDK-7150392 : Linux build breaks with GCC 4.7 due to unrecognized option

Details
Type:
Bug
Submit Date:
2012-03-02
Status:
Resolved
Updated Date:
2012-06-12
Project Name:
JDK
Resolved Date:
2012-06-04
Component:
infrastructure
OS:
linux
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
Deepak Bhole reports:

JDK builds currently fail with GCC 4.7 due to its stricter option
checking.

GCC 4.6 and prior ignored invalid options -- GCC 4.7 does not. Certain
files in JDK supply the -mimpure-text option to GCC. This option is only
valid on SPARC[1,2]. As a result, GCC 4.7 throws an error during build
on Linux (I suppose .

This patch removes the option:
http://cr.openjdk.java.net/~dbhole/GCC-4.7-JDK8.00

1: http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/SPARC-Options.html
2: http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/i386-and-x86_002d64-Options.html

                                    

Comments
EVALUATION

This option is causing some confusion as it was listed as a GCC sparc option and so we had concerns about its need on linux-sparc, but then it was changed to a Solaris2 option in 2010:

http://gcc.gnu.org/onlinedocs/gcc/Solaris-2-Options.html#index-mimpure_002dtext-2103

http://old.nabble.com/Correctly-document-Solaris-2-options-td29851048.html

So it's applicability to linux-sparc is unclear. As we only used this option for linux builds and not Solaris builds I find this even more confusing!

It seems the reasonable way to go forward here is with this suggested fix:

http://cr.openjdk.java.net/~dbhole/GCC-4.7-JDK8.00/

which changes one "real" build file:

jdk/make/common/shared/Compiler-gcc.gmk

to delete the option, and similarly updates a swag of "sample makefiles" used by the JVMTI demos.
                                     
2012-03-02
EVALUATION

http://hg.openjdk.java.net/jdk8/build/jdk/rev/fb3a2cafc230
                                     
2012-03-22



Hardware and Software, Engineered to Work Together