Comments

This is again a total breakage of -findirect-dispatch on SPARC/Linux, a
regression present on mainline and 4.5 branch. We were already there a few
months ago and the kludge I added back then:
http://gcc.gnu.org/ml/gcc-patches/2009-12/msg00339.html
was almost immediately defeated on the (then) mainline because Jakub slightly
changed the semantics of the %<S spec in order to fix PR driver/42442. See
the audit trail for a more detailed analysis.
The attached patch improves the kludge by noticing that gcj appends "main.c"
to the main class name before calling jvgenmain and then cc1. Tested on
SPARC/Linux and SPARC64/Linux, applied on the mainline and 4.5 branch.
2010-09-22 Eric Botcazou <ebotcazou@adacore.com>
PR java/44095
* config/sparc/linux.h (ASM_SPEC): Pass -K PIC if -findirect-dispatch
is specified and the suffix of the file isn't ".c".
* config/sparc/linux64.h (ASM_SPEC): Likewise.