Skip to content

Commit cd5fe44

Browse files
committed
Fixed patches, added cflags
1 parent 8d457c2 commit cd5fe44

File tree

7 files changed

+54
-27
lines changed

7 files changed

+54
-27
lines changed

all.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
for arch in arm arm64 x86 x86_64
4+
do
5+
JSC_ARCH=$arch ./toolchain.sh
6+
JSC_ARCH=$arch ./icu.sh
7+
JSC_ARCH=$arch ./jsc.sh
8+
done

common.sh

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOTDIR=`pwd`
3+
if ! [[ $ROOTDIR ]]; then ROOTDIR=`pwd`; fi
44
ARCH=$JSC_ARCH
55

66
ANDROID_API=21
@@ -24,30 +24,49 @@ PLATFORM_CFLAGS_arm=" \
2424
-mfpu=neon \
2525
-mthumb \
2626
"
27-
2827
PLATFORM_LDFLAGS_arm=" \
2928
-L$TOOLCHAIN_DIR/$CROSS_COMPILE_PLATFORM/lib/armv7-a \
3029
-march=armv7-a \
3130
-Wl,--fix-cortex-a8 \
3231
"
32+
JNI_ARCH_arm=armeabi-v7a
3333

3434
PLATFORM_LDFLAGS_arm64=" \
3535
-L$TOOLCHAIN_DIR/$CROSS_COMPILE_PLATFORM/lib \
3636
"
37-
37+
JNI_ARCH_arm64=arm64-v8a
38+
39+
PLATFORM_CFLAGS_x86=" \
40+
-march=i686 \
41+
-mtune=intel \
42+
-mssse3 \
43+
-mfpmath=sse \
44+
-m32 \
45+
"
3846
PLATFORM_LDFLAGS_x86=" \
3947
-L$TOOLCHAIN_DIR/$CROSS_COMPILE_PLATFORM/lib \
4048
"
41-
49+
JNI_ARCH_x86=x86
50+
51+
PLATFORM_CFLAGS_x86_64=" \
52+
-march=x86-64 \
53+
-msse4.2 \
54+
-mpopcnt \
55+
-m64 \
56+
-mtune=intel \
57+
"
4258
PLATFORM_LDFLAGS_x86_64=" \
4359
-L$TOOLCHAIN_DIR/$CROSS_COMPILE_PLATFORM/lib \
4460
"
61+
JNI_ARCH_x86_64=x86_64
4562

4663
# arch
4764
var="PLATFORM_CFLAGS_$JSC_ARCH"
4865
PLATFORM_CFLAGS=${!var}
4966
var="PLATFORM_LDFLAGS_$JSC_ARCH"
5067
PLATFORM_LDFLAGS=${!var}
68+
var="JNI_ARCH_$JSC_ARCH"
69+
JNI_ARCH=${!var}
5170

5271
# checks
5372
err=false
@@ -83,7 +102,9 @@ COMMON_CXXFLAGS=" \
83102
--std=c++11 \
84103
"
85104

86-
ICU_CFLAGS="$COMMON_CFLAGS $PLATFORM_CFLAGS"
87-
ICU_CXXFLAGS="$COMMON_CXXFLAGS $ICU_CFLAGS"
105+
ICU_CFLAGS="$COMMON_CFLAGS $PLATFORM_CFLAGS -Os"
106+
ICU_CXXFLAGS="$COMMON_CXXFLAGS $ICU_CFLAGS -Os"
88107
ICU_LDFLAGS="$COMMON_LDFLAGS $PLATFORM_LDFLAGS"
89108

109+
INSTALL_DIR=$ROOTDIR/lib/distribution/jsc/lib/$JNI_ARCH
110+
mkdir -p $INSTALL_DIR

extra_headers/wtf/execinfo.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

icu.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
source './common.sh'
44

5-
rm -rf $ROOTDIR/target/icu/$CROSS_COMPILE_PLATFORM
6-
mkdir -p $ROOTDIR/target/icu/$CROSS_COMPILE_PLATFORM
7-
cd $ROOTDIR/target/icu/$CROSS_COMPILE_PLATFORM
5+
ICU_VERSION="56.1"
6+
7+
BUILD_DIR=$ROOTDIR/target/icu/$CROSS_COMPILE_PLATFORM
8+
rm -rf $BUILD_DIR
9+
mkdir -p $BUILD_DIR
10+
cd $BUILD_DIR
811

912
CROSS_BUILD_DIR=$(realpath ../host)
1013
PATH=$TOOLCHAIN_DIR/bin:$PATH
@@ -33,4 +36,8 @@ PATH=$TOOLCHAIN_DIR/bin:$PATH
3336

3437
make -j5
3538

36-
cp stubdata/lib* lib/
39+
cp stubdata/libicudata_jsc.so.$ICU_VERSION lib/
40+
41+
cp stubdata/libicudata_jsc.so.$ICU_VERSION $INSTALL_DIR/libicudata_jsc.so
42+
cp lib/libicui18n_jsc.so.$ICU_VERSION $INSTALL_DIR/libicui18n_jsc.so
43+
cp lib/libicuuc_jsc.so.$ICU_VERSION $INSTALL_DIR/libicuuc_jsc.so

jsc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ CMAKE_CXX_FLAGS=" \
1111
$COMMON_CFLAGS \
1212
$PLATFORM_CFLAGS \
1313
-fno-rtti \
14-
-I$ROOTDIR/extra_headers/wtf/ \
1514
-I$ROOTDIR/target/icu/source/i18n \
1615
"
1716
CMAKE_LD_FLAGS=" \
@@ -48,4 +47,5 @@ $PLATFORM_LDFLAGS \
4847
-DCMAKE_VERBOSE_MAKEFILE=on \
4948
"
5049

51-
mv $ROOTDIR/target/webkit/WebKitBuild $ROOTDIR/target/webkit/$CROSS_COMPILE_PLATFORM
50+
mv $ROOTDIR/target/webkit/WebKitBuild $ROOTDIR/target/webkit/$CROSS_COMPILE_PLATFORM
51+
cp $ROOTDIR/target/webkit/WebKitBuild/Release/lib/libjsc.so $INSTALL_DIR

patches/jsc_cmake.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
diff --exclude=.svn -aur webkit/Source/cmake/FindICU.cmake target/webkit/Source/cmake/FindICU.cmake
1+
diff --exclude=.svn -aur webkit/Source/cmake/FindICU.cmake cmake/FindICU.cmake
22
--- webkit/Source/cmake/FindICU.cmake 2017-05-16 12:00:04.000000000 +0200
33
+++ cmake/FindICU.cmake 2017-05-19 16:25:44.000000000 +0200
44
@@ -25,7 +25,7 @@
@@ -28,7 +28,7 @@ diff --exclude=.svn -aur webkit/Source/cmake/FindICU.cmake target/webkit/Source/
2828
HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
2929
${PC_ICU_I18N_LIBDIR}
3030
${WEBKIT_LIBRARIES_LINK_DIR}
31-
diff --exclude=.svn -aur webkit/Source/cmake/OptionsJSCOnly.cmake target/webkit/Source/cmake/OptionsJSCOnly.cmake
31+
diff --exclude=.svn -aur webkit/Source/cmake/OptionsJSCOnly.cmake cmake/OptionsJSCOnly.cmake
3232
--- webkit/Source/cmake/OptionsJSCOnly.cmake 2017-05-16 12:00:04.000000000 +0200
3333
+++ cmake/OptionsJSCOnly.cmake 2017-05-26 13:58:10.000000000 +0200
3434
@@ -23,7 +23,8 @@

patches/wtf.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
diff --exclude=.svn -aur WTF-org/wtf/Assertions.cpp WTF/wtf/Assertions.cpp
2-
--- WTF-org/wtf/Assertions.cpp 2016-09-01 03:33:40.000000000 +0200
3-
+++ WTF/wtf/Assertions.cpp 2017-05-30 14:47:06.000000000 +0200
4-
@@ -72,11 +72,9 @@
2+
--- WTF-org/wtf/Assertions.cpp 2016-09-01 03:33:40.000000000 +0200
3+
+++ WTF/wtf/Assertions.cpp 2017-06-05 15:35:30.000000000 +0200
4+
@@ -72,11 +72,8 @@
55
#include <unistd.h>
66
#endif
77

88
-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
99
#include <cxxabi.h>
1010
#include <dlfcn.h>
11-
#include <execinfo.h>
11+
-#include <execinfo.h>
1212
-#endif
1313

1414
extern "C" {

0 commit comments

Comments
 (0)