Build failure with new functions introduced in fix for 4957990

Andrew John Hughes gnu_andrew at
Mon Sep 21 15:39:10 PDT 2009

This changeset:

was promoted as part of b72 and fixes  It's nice
to see a long-running bug being resolved, but unfortunately I've run
into an issue with the fix.

In markSweep.hpp and psParallelCompact.hpp, two new functions are introduced:

+ static void follow_mdo_weak_refs();
+ static void revisit_mdo(ParCompactionManager* cm, DataLayout* p);

However, in markSweep.cpp and psParallelCompact.cpp, these are only
implemented conditionally:

+#if ( defined(COMPILER1) || defined(COMPILER2) )
+void MarkSweep::revisit_mdo(DataLayout* p) {
+ _revisit_mdo_stack->push(p);

If neither COMPILER1 nor COMPILER2 are defined (as is the case with
building Gary Benson's zero port:
for example), then the build now fails:

Linking launcher...
undefined reference to
`PSParallelCompact::revisit_mdo(ParCompactionManager*, DataLayout*)'
undefined reference to `MarkSweep::revisit_mdo(DataLayout*)'
undefined reference to `MarkSweep::follow_mdo_weak_refs()'
undefined reference to `PSParallelCompact::follow_mdo_weak_refs()'
collect2: ld returned 1 exit status

The obvious fix that springs to mind is to add an #else block that
implements these with ShouldNotCallThis() as in this webrev:

but I'm not sure if that's the correct fix.

Any ideas?

Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (

Support Free Java!
Contribute to GNU Classpath and the OpenJDK

PGP Key: 94EFD9D8 (
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

More information about the hotspot-dev mailing list