United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7041156 : gcc 4.6 doesn't recognise -export-dynamic option

Details
Type:
Bug
Submit Date:
2011-05-02
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-05-16
Component:
hotspot
OS:
linux
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs21 (b12)

Related Reports
Backport:

Sub Tasks

Description
Need support for building hotspot with gcc 4.6. gcc 4.6 changed how arguments are handled. It now treats -export-dynamic as it treats any other -efoo option: it thinks xport-dynamic is the entry point and passes this information to the linker. Since -export-dynamic is not passed to the linker, not all symbols will be exported by the linker. The bfd-based linker, given the invalid entry point xport-dynamic, simply ignores it. The gold linker, however, crashes causing the build to fail.

Since -export-dynamic is a linker option, the correct way to pass it is using -Wl,-export-dynamic (or -Xlinker -export-dynamic). We have had this patch in IcedTea6 for a while now, but it would be nice if this was in OpenJDK too.

                                    

Comments
EVALUATION

gcc 4.6 changed how arguments are handled. It now treats -export-dynamic as it treats any other -efoo option: it thinks xport-dynamic is the entry point and passes this information to the linker. Since -export-dynamic is not passed to the linker, not all symbols will be exported by the linker. The bfd-based linker, given the invalid entry point xport-dynamic, simply ignores it. The gold linker, however, crashes causing the build to fail.
                                     
2011-05-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/250642c729b4
                                     
2011-05-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/250642c729b4
                                     
2011-05-04



Hardware and Software, Engineered to Work Together