summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2013-12-23 21:52:20 +1300
committerGary V. Vaughan <gary@gnu.org>2014-01-02 12:06:30 +1300
commit564d58222c58acaabf435a99d5e0acf32572bbe6 (patch)
tree110c9647fd2935367d27f708384aad04029808d6 /tests
parent8d285ed54b9b9b307e8fe1a25ba9e624eab93b8d (diff)
downloadlibtool-564d58222c58acaabf435a99d5e0acf32572bbe6.tar.gz
tests: gcj cannot reliably compile directly to .o from .java
Some 4.3.x and 4.4.x releases of gcj insert a spurious 'dummy' symbol into every object file when compiling directly from .java to .o: * tests/convenience.at (GCJ): make .class files from .java sources first, and then compile those to native objects. This works around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143 Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/convenience.at12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/convenience.at b/tests/convenience.at
index b0d4b59f..94ba1196 100644
--- a/tests/convenience.at
+++ b/tests/convenience.at
@@ -259,8 +259,16 @@ public class A$i {
};
EOF
- $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.java
- $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.java
+ # Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
+ # Some 4.3.x and 4.4.x releases of gcj insert a spurious dummy symbol
+ # into every object file when compiling directly from .java to .o, so
+ # we have to make .class files first, and then compile those to native
+ # objects:
+ $GCJ $GCJFLAGS -C foo$i.java
+ $GCJ $GCJFLAGS -C A$i.java
+
+ $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.class
+ $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.class
$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba$i.la A$i.lo
done
AT_CHECK([$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist],