summaryrefslogtreecommitdiff
path: root/java/ecj-bootstrap/files/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'java/ecj-bootstrap/files/build.sh')
-rw-r--r--java/ecj-bootstrap/files/build.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/java/ecj-bootstrap/files/build.sh b/java/ecj-bootstrap/files/build.sh
index aa8b03563348..fb9722a52772 100644
--- a/java/ecj-bootstrap/files/build.sh
+++ b/java/ecj-bootstrap/files/build.sh
@@ -5,13 +5,24 @@
# http://fedora.redhat.com/download/mirrors.html
# Bootstrapping is 3 parts:
+ # 0. Patch ecj.zip
# 1. Build ecj with gcj -C
# 2. Build ecj with gcj-built ecj ("javac")
# 3. Re-build ecj with output of 2.
-
+
+ # Patch ecj.zip first
+ rm -rf tmp
+ mkdir tmp
+ unzip -qq -d tmp jdtcoresrc/src/ecj.zip
+ cd tmp
+ patch < ../../files/ecj-patch-Main.java
+ zip -r ../jdtcoresrc/src/ecj.zip *
+ cd ..
+
# Unzip the "stable compiler" source into a temp dir and build it.
# Note: we don't want to build the CompilerAdapter.
+ rm -rf ecj-bootstrap-tmp
mkdir ecj-bootstrap-tmp
unzip -qq -d ecj-bootstrap-tmp jdtcoresrc/src/ecj.zip
rm -f ecj-bootstrap-tmp/org/eclipse/jdt/core/JDTCompilerAdapter.java