Skip to content

Commit 09f8784

Browse files
authored
Merge pull request #48 from ev3dev-lang-java/feature/remove_softfloat
Remove SoftFloat-3e
2 parents c1663e9 + b3ff481 commit 09f8784

13 files changed

Lines changed: 86 additions & 2646 deletions

File tree

packaging/debian/copyright

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,39 +2278,6 @@ with JRE 8, JDK 8, and OpenJDK 8.
22782278

22792279
-------------------------------------------------------------------------------
22802280

2281-
%% This notice is provided with respect to SoftFloat version 2b, which may be
2282-
included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM.
2283-
2284-
--- begin of LICENSE ---
2285-
2286-
Use of any of this software is governed by the terms of the license below:
2287-
2288-
SoftFloat was written by me, John R. Hauser. This work was made possible in
2289-
part by the International Computer Science Institute, located at Suite 600,
2290-
1947 Center Street, Berkeley, California 94704. Funding was partially
2291-
provided by the National Science Foundation under grant MIP-9311980. The
2292-
original version of this code was written as part of a project to build
2293-
a fixed-point vector processor in collaboration with the University of
2294-
California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek.
2295-
2296-
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
2297-
has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
2298-
TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
2299-
PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL
2300-
LOSSES, COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO
2301-
FURTHERMORE EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER
2302-
SCIENCE INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES,
2303-
COSTS, OR OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE
2304-
SOFTWARE.
2305-
2306-
Derivative works are acceptable, even for commercial purposes, provided
2307-
that the minimal documentation requirements stated in the source code are
2308-
satisfied.
2309-
2310-
--- end of LICENSE ---
2311-
2312-
-------------------------------------------------------------------------------
2313-
23142281
%% This notice is provided with respect to Sparkle 1.5,
23152282
which may be included with JRE 8 on Mac OS X.
23162283

@@ -3632,42 +3599,3 @@ debian/dbg8.py:
36323599
On Debian systems a full copy of the GNU General Public License, GPL, can be
36333600
found in the file /usr/share/common-licenses/GPL-2.
36343601

3635-
-------------------------------------------------------------------------------
3636-
3637-
3638-
License for Berkeley SoftFloat Release 3e
3639-
3640-
John R. Hauser
3641-
2018 January 20
3642-
3643-
The following applies to the whole of SoftFloat Release 3e as well as to
3644-
each source file individually.
3645-
3646-
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the
3647-
University of California. All rights reserved.
3648-
3649-
Redistribution and use in source and binary forms, with or without
3650-
modification, are permitted provided that the following conditions are met:
3651-
3652-
1. Redistributions of source code must retain the above copyright notice,
3653-
this list of conditions, and the following disclaimer.
3654-
3655-
2. Redistributions in binary form must reproduce the above copyright
3656-
notice, this list of conditions, and the following disclaimer in the
3657-
documentation and/or other materials provided with the distribution.
3658-
3659-
3. Neither the name of the University nor the names of its contributors
3660-
may be used to endorse or promote products derived from this software
3661-
without specific prior written permission.
3662-
3663-
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
3664-
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3665-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
3666-
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
3667-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3668-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3669-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3670-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3671-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3672-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3673-

scripts/build.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ cd "$(dirname ${BASH_SOURCE[0]})"
55
source config.sh
66
source "$BUILDDIR/metadata"
77

8-
if [ "$SFLT_NEEDED" == "true" ]; then
9-
echo "[BUILD] Building softfloat support"
10-
cd "$SFLTBUILD"
11-
make
12-
make DESTDIR="$SFLTPFX" install
13-
fi
14-
158
cd "$JDKDIR"
169

1710
# refresh patched build system
@@ -34,7 +27,6 @@ fi
3427
# - Force softfloat runtime: -D__SOFTFP__
3528
# Fix the "internal" string: --with-version-string="<version>"
3629
# Use correct JNI path: --with-jni-libpath=<dir1>:<dir2>...
37-
# Use softfloat libraries: --with-softfloat-lib=<softfloat.a> --with-softfloat-include=<dirname softfloat.h>
3830
# Use AdoptOpenJDK CA certs: --with-cacerts-file=<path>
3931
# Use correct debug level --with-debug-level=<level>
4032
# Help to find freetype: --with-freetype-lib=/usr/lib/arm-linux-gnueabi
@@ -65,7 +57,6 @@ if [ "$JDKPLATFORM" == "ev3" ]; then
6557
--disable-warnings-as-errors \
6658
--with-version-string="$JAVA_VERSION" \
6759
$JNI_PATH_FLAGS \
68-
$SOFTFLOAT_FLAGS \
6960
$VENDOR_FLAGS \
7061
--with-cacerts-file="$CACERTFILE" \
7162
--with-debug-level=$HOTSPOT_DEBUG \

scripts/config.sh

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ SCRIPTDIR="$( cd "$(dirname "$0")" ; pwd -P )"
66
BUILDDIR="/build"
77
# jdk repository directory
88
JDKDIR="$BUILDDIR/jdk"
9-
# softfloat repository directory
10-
SFLTDIR="$BUILDDIR/sflt"
11-
# softfloat repository
12-
SFLTREPO="https://github.com/ev3dev-lang-java/softfloat-openjdk.git"
13-
# softfloat build directory
14-
SFLTBUILD="$SFLTDIR/build/Linux-ARM-VFPv2-GCC-OpenJDK"
15-
# softfloat license
16-
SFLTPFX="$SFLTDIR/output"
179
# openjdk-build repo dir
1810
ABLDDIR="$BUILDDIR/openjdk-build"
1911
# openjdk-build repo
@@ -166,7 +158,6 @@ if [ "$JDKVER" == "9" ]; then
166158
IMAGEDIR="$JDKDIR/build/linux-arm-normal-${JDKVM}-${HOTSPOT_DEBUG}/images"
167159
HOTSPOT_ABI=arm926ejs
168160
JNI_PATH_FLAGS=
169-
SOFTFLOAT_FLAGS=
170161
VENDOR_FLAGS=
171162

172163
# OpenJDK 10
@@ -189,7 +180,6 @@ elif [ "$JDKVER" == "10" ]; then
189180
IMAGEDIR="$JDKDIR/build/linux-arm-normal-${JDKVM}-${HOTSPOT_DEBUG}/images"
190181
HOTSPOT_ABI=arm926ejs
191182
JNI_PATH_FLAGS=
192-
SOFTFLOAT_FLAGS=
193183

194184
# OpenJDK 11
195185
elif [ "$JDKVER" == "11" ]; then
@@ -217,7 +207,6 @@ elif [ "$JDKVER" == "11" ]; then
217207
IMAGEDIR="$JDKDIR/build/linux-arm-normal-${JDKVM}-${HOTSPOT_DEBUG}/images"
218208
HOTSPOT_ABI=arm926ejs
219209
JNI_PATH_FLAGS=
220-
SOFTFLOAT_FLAGS=
221210

222211
# OpenJDK 12
223212
elif [ "$JDKVER" == "12" ]; then
@@ -245,10 +234,6 @@ elif [ "$JDKVER" == "12" ]; then
245234
IMAGEDIR="$JDKDIR/build/linux-arm-${JDKVM}-${HOTSPOT_DEBUG}/images"
246235
HOTSPOT_ABI=arm-sflt
247236
JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib"
248-
SOFTFLOAT_FLAGS="--with-sflt=$SFLTPFX"
249-
if [ "$JDKPLATFORM" == "ev3" ]; then
250-
SFLT_NEEDED=true
251-
fi
252237

253238
# OpenJDK 13
254239
elif [ "$JDKVER" == "13" ]; then
@@ -276,10 +261,6 @@ elif [ "$JDKVER" == "13" ]; then
276261
IMAGEDIR="$JDKDIR/build/linux-arm-${JDKVM}-${HOTSPOT_DEBUG}/images"
277262
HOTSPOT_ABI=arm-sflt
278263
JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib"
279-
SOFTFLOAT_FLAGS="--with-sflt=$SFLTPFX"
280-
if [ "$JDKPLATFORM" == "ev3" ]; then
281-
SFLT_NEEDED=true
282-
fi
283264

284265
# OpenJDK Loom & Master+dev
285266
elif [ "$JDKVER" == "loom" ] || [ "$JDKVER" == "tip" ]; then
@@ -314,10 +295,6 @@ elif [ "$JDKVER" == "loom" ] || [ "$JDKVER" == "tip" ]; then
314295
IMAGEDIR="$JDKDIR/build/linux-arm-${JDKVM}-${HOTSPOT_DEBUG}/images"
315296
HOTSPOT_ABI=arm-sflt
316297
JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib"
317-
SOFTFLOAT_FLAGS="--with-sflt=$SFLTPFX"
318-
if [ "$JDKPLATFORM" == "ev3" ]; then
319-
SFLT_NEEDED=true
320-
fi
321298

322299
# invalid or unset version
323300
else

scripts/fetch.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ if [ ! -d "$JDKDIR" ]; then
105105
PATCHES="$PATCHES main"
106106
fi
107107

108+
# replacement for softfloat patch
109+
if [ -f "$SCRIPTDIR/${PATCHVER}_nosflt.patch" ]; then
110+
patch -p1 -i "$SCRIPTDIR/${PATCHVER}_nosflt.patch"
111+
PATCHES="$PATCHES nosflt"
112+
fi
113+
108114
# debian library path
109115
if [ -f "$SCRIPTDIR/${PATCHVER}_lib.patch" ]; then
110116
patch -p1 -i "$SCRIPTDIR/${PATCHVER}_lib.patch"
@@ -147,13 +153,6 @@ else
147153
fi
148154

149155

150-
if [ ! -d "$SFLTDIR" ] && [ "$SFLT_NEEDED" == "true" ]; then
151-
# clone the root project
152-
echo "[FETCH] Cloning SoftFloat repo"
153-
git clone --depth 1 "$SFLTREPO" "$SFLTDIR"
154-
fi
155-
156-
157156
if [ -d "$ABLDDIR" ]; then
158157
rm -rf "$ABLDDIR"
159158
fi

scripts/jdk11.patch

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,6 @@ index 53d6d17de..f52495086 100644
4949
bool preserve_tmp = (reg == noreg);
5050
if(preserve_tmp) {
5151
reg = Rtemp;
52-
@@ -1239,10 +1239,11 @@ extern int __aeabi_dcmpgt(double, double);
53-
54-
// Imported code from glibc soft-fp bundle for
55-
// calculation accuracy improvement. See CR 6757269.
56-
-extern double __aeabi_fadd_glibc(float, float);
57-
-extern double __aeabi_fsub_glibc(float, float);
58-
-extern double __aeabi_dadd_glibc(double, double);
59-
-extern double __aeabi_dsub_glibc(double, double);
60-
+#define __aeabi_fadd_glibc __aeabi_fadd
61-
+#define __aeabi_fsub_glibc __aeabi_fsub
62-
+#define __aeabi_dadd_glibc __aeabi_dadd
63-
+#define __aeabi_dsub_glibc __aeabi_dsub
64-
+
65-
};
66-
#endif // __SOFTFP__
67-
6852
diff --git a/src/hotspot/cpu/arm/vm_version_arm_32.cpp b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
6953
index df0fb2ecf..f15dabd45 100644
7054
--- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp

scripts/jdk11_nosflt.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/src/hotspot/cpu/arm/assembler_arm_32.hpp b/src/hotspot/cpu/arm/assembler_arm_32.hpp
2+
index 53d6d17de..f52495086 100644
3+
--- a/src/hotspot/cpu/arm/assembler_arm_32.hpp
4+
+++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp
5+
@@ -1239,10 +1239,11 @@ extern int __aeabi_dcmpgt(double, double);
6+
7+
// Imported code from glibc soft-fp bundle for
8+
// calculation accuracy improvement. See CR 6757269.
9+
-extern double __aeabi_fadd_glibc(float, float);
10+
-extern double __aeabi_fsub_glibc(float, float);
11+
-extern double __aeabi_dadd_glibc(double, double);
12+
-extern double __aeabi_dsub_glibc(double, double);
13+
+#define __aeabi_fadd_glibc __aeabi_fadd
14+
+#define __aeabi_fsub_glibc __aeabi_fsub
15+
+#define __aeabi_dadd_glibc __aeabi_dadd
16+
+#define __aeabi_dsub_glibc __aeabi_dsub
17+
+
18+
};
19+
#endif // __SOFTFP__
20+

0 commit comments

Comments
 (0)