Skip to content
Permalink
Browse files

v8, feat: upgrade to v6.9.454.

  • Loading branch information...
xicilion committed Apr 22, 2019
1 parent 8498cb3 commit 2175af8acbf94d26b754f2652e50aafe234a666a
41 build
@@ -47,9 +47,8 @@ esac
TARGET_OS=$HOST_OS
TARGET_ARCH=$HOST_ARCH
BUILD_TYPE="release"
BUILD_PREFIX=""
BUILD_OPTION=""
GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`
GCC_VERSION=`gcc -dumpversion`

for i in "$@"
do
@@ -81,56 +80,43 @@ if [ $TARGET_ARCH != $HOST_ARCH ] || [ $TARGET_OS != $HOST_OS ]; then
usage
fi
;;
amd64)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="x86_64-linux-gnu-"
else
usage
fi
;;
arm)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="arm-linux-gnueabihf-"
BUILD_OPTION="-march=armv7-a -mfpu=vfp3 -marm --target=arm-linux-gnueabihf -L/usr/lib/gcc-cross/arm-linux-gnueabihf/${GCC_VERSION} -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION} -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION}/arm-linux-gnueabihf"
else
usage
fi
;;
arm64)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="aarch64-linux-gnu-"
BUILD_OPTION="--target=aarch64-linux-gnu -L/usr/lib/gcc-cross/aarch64-linux-gnu/${GCC_VERSION} -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -I/usr/aarch64-linux-gnu/include/c++/${GCC_VERSION} -I/usr/aarch64-linux-gnu/include/c++/${GCC_VERSION}/aarch64-linux-gnu"
else
usage
fi
;;
mips)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="mips-linux-gnu-"
BUILD_OPTION="--target=mips-linux-gnu -L/usr/lib/gcc-cross/mips-linux-gnu/${GCC_VERSION} -L/usr/mips-linux-gnu/lib -I/usr/mips-linux-gnu/include -I/usr/mips-linux-gnu/include/c++/${GCC_VERSION} -I/usr/mips-linux-gnu/include/c++/${GCC_VERSION}/mips-linux-gnu"
else
usage
fi
;;
mips64)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="mips64-linux-gnuabi64-"
BUILD_OPTION="--target=mips64-linux-gnuabi64 -L/usr/lib/gcc-cross/mips64-linux-gnuabi64/${GCC_VERSION} -L/usr/mips64-linux-gnuabi64/lib -I/usr/mips64-linux-gnuabi64/include -I/usr/mips64-linux-gnuabi64/include/c++/${GCC_VERSION} -I/usr/mips64-linux-gnuabi64/include/c++/${GCC_VERSION}/mips64-linux-gnuabi64"
else
usage
fi
;;
ppc)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="powerpc-linux-gnu-"
BUILD_OPTION="--target=powerpc-linux-gnu -L/usr/lib/gcc-cross/powerpc-linux-gnu/${GCC_VERSION} -L/usr/powerpc-linux-gnu/lib -I/usr/powerpc-linux-gnu/include -I/usr/powerpc-linux-gnu/include/c++/${GCC_VERSION} -I/usr/powerpc-linux-gnu/include/c++/${GCC_VERSION}/powerpc-linux-gnu"
else
usage
fi
;;
ppc64)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="powerpc64-linux-gnu-"
BUILD_OPTION="--target=powerpc64-linux-gnu -L/usr/lib/gcc-cross/powerpc64-linux-gnu/${GCC_VERSION} -L/usr/powerpc64-linux-gnu/lib -I/usr/powerpc64-linux-gnu/include -I/usr/powerpc64-linux-gnu/include/c++/${GCC_VERSION} -I/usr/powerpc64-linux-gnu/include/c++/${GCC_VERSION}/powerpc64-linux-gnu"
else
usage
@@ -139,11 +125,6 @@ if [ $TARGET_ARCH != $HOST_ARCH ] || [ $TARGET_OS != $HOST_OS ]; then
esac
fi

if [ "$BUILD_PREFIX" != "" ]; then
export CC=${BUILD_PREFIX}gcc
export CXX=${BUILD_PREFIX}g++
fi

inform()
{
echo ""
@@ -211,16 +192,16 @@ txtbld=$(tput bold)
bldred=${txtbld}$(tput setaf 1)
txtrst=$(tput sgr0)

printf "\n\n${bldred}"
printf "\t _______ _________ ______ _________ _______ \n"
printf "\t( ____ \\\\\\__ __/( ___ \\ \\__ _/( ____ \\\\\n"
printf "\t| ( \\/ ) ( | ( ) ) ) ( | ( \\/\n"
printf "\t| (__ | | | (__/ / | | | (_____ \n"
printf "\t| __) | | | __ ( | | (_____ )\n"
printf "\t| ( | | | ( \\ \\ | | ) |\n"
printf "\t| (_ ___) (___| (___) )/\\_) ) /\\____) |\n"
printf "\t(__/ \\_______/(______/ \\____/ \\_______)\n"
printf "${txtrst}"
printf "\n\n"
printf "\t${bldred} _______ _________ ______ _________ _______ ${txtrst}\n"
printf "\t${bldred}( ____ \\\\\\__ __/( ___ \\ \\__ _/( ____ \\\\${txtrst}\n"
printf "\t${bldred}| ( \\/ ) ( | ( ) ) ) ( | ( \\/${txtrst}\n"
printf "\t${bldred}| (__ | | | (__/ / | | | (_____ ${txtrst}\n"
printf "\t${bldred}| __) | | | __ ( | | (_____ )${txtrst}\n"
printf "\t${bldred}| ( | | | ( \\ \\ | | ) |${txtrst}\n"
printf "\t${bldred}| (_ ___) (___| (___) )/\\_) ) /\\____) |${txtrst}\n"
printf "\t${bldred}(__/ \\_______/(______/ \\____/ \\_______)${txtrst}\n"
printf ""

printf "\\n\\tFIBJS has been successfully built.\\n\\n"

@@ -24,14 +24,31 @@ include(CheckCSourceCompiles)
set(CMAKE_C_FLAGS "${BUILD_OPTION}")

check_include_files(iconv.h HAVE_ICONV_H)

check_c_source_compiles("void posix_spawnp();
__asm__(\".symver posix_spawnp,posix_spawnp@GLIBC_2.2.5\");
void main(void){posix_spawnp();}" HAVE_GLIB_C_225_H)

check_c_source_compiles("void posix_spawnp();
__asm__(\".symver posix_spawnp,posix_spawnp@GLIBC_2.2\");
void main(void){posix_spawnp();}" HAVE_GLIB_C_22_H)


check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.2.5\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_225_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.0\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_2_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.4\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_24_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.17\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_217_H)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/gitinfo.h.in ${CMAKE_CURRENT_BINARY_DIR}/gitinfo.h)

@@ -45,7 +45,7 @@ TARGET_OS=$HOST_OS
TARGET_ARCH=$HOST_ARCH
BUILD_TYPE="release"
BUILD_OPTION=""
GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`
GCC_VERSION=`gcc -dumpversion`

for i in "$@"
do
@@ -73,11 +73,6 @@ if [ $TARGET_ARCH != $HOST_ARCH ] || [ $TARGET_OS != $HOST_OS ]; then
usage
fi
;;
amd64)
if [ $TARGET_OS != "Linux" ]; then
usage
fi
;;
arm)
if [ $TARGET_OS = "Linux" ]; then
BUILD_OPTION="-march=armv7-a -mfpu=vfp3 -marm --target=arm-linux-gnueabihf -L/usr/lib/gcc-cross/arm-linux-gnueabihf/${GCC_VERSION} -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION} -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION}/arm-linux-gnueabihf"
@@ -24,6 +24,7 @@ include(CheckCSourceCompiles)
set(CMAKE_C_FLAGS "${BUILD_OPTION}")

check_include_files(iconv.h HAVE_ICONV_H)

check_c_source_compiles("void posix_spawnp();
__asm__(\".symver posix_spawnp,posix_spawnp@GLIBC_2.2.5\");
void main(void){posix_spawnp();}" HAVE_GLIB_C_225_H)
@@ -32,6 +33,22 @@ check_c_source_compiles("void posix_spawnp();
__asm__(\".symver posix_spawnp,posix_spawnp@GLIBC_2.2\");
void main(void){posix_spawnp();}" HAVE_GLIB_C_22_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.2.5\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_225_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.0\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_2_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.4\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_24_H)

check_c_source_compiles("void fcntl();
__asm__(\".symver fcntl,fcntl@GLIBC_2.17\");
void main(void){fcntl();}" HAVE_GLIB_C_FCNTL_217_H)

set(flags "-fsigned-char -fmessage-length=0 -fdata-sections -ffunction-sections -fno-exceptions -D_FILE_OFFSET_BITS=64")
set(ccflags "-std=c++11")
set(link_flags " ")
@@ -45,9 +62,13 @@ if(${BUILD_TYPE} STREQUAL "release")
set(flags "${flags} -fomit-frame-pointer")
endif()

set(link_flags "${link_flags} ${BUILD_OPTION}")
set(link_flags "${link_flags} ${BUILD_OPTION} -static-libstdc++")
add_definitions(-DNDEBUG=1)

if(${OS} STREQUAL "Linux")
set(link_flags "${link_flags} ${link_flags} -static-libgcc")
endif()

if(HAVE_GLIB_C_225_H)
set(link_flags "${link_flags} -Wl,--wrap=memcpy")
endif()
@@ -79,7 +100,7 @@ if(${OS} STREQUAL "Darwin")
endif()

if(${OS} STREQUAL "Linux")
target_link_libraries(fibjs dl rt atomic)
target_link_libraries(fibjs dl rt)
endif()

if(${OS} STREQUAL "FreeBSD")
@@ -46,7 +46,7 @@ TARGET_ARCH=$HOST_ARCH
BUILD_TYPE="release"
BUILD_PREFIX=""
BUILD_OPTION=""
GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`
GCC_VERSION=`gcc -dumpversion`

for i in "$@"
do
@@ -68,25 +68,23 @@ done
case $TARGET_ARCH in
i386)
if [ $HOST_ARCH = "amd64" ]; then
BUILD_OPTION="-m32 -static-libstdc++"
BUILD_OPTION="-m32"
else
usage
fi
;;
amd64)
BUILD_PREFIX="x86_64-linux-gnu-"
BUILD_OPTION="-static-libstdc++"
;;
arm)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="arm-linux-gnueabihf-"
BUILD_OPTION="-march=armv7-a -mfpu=vfp3 -marm --target=arm-linux-gnueabihf -L/usr/lib/gcc-cross/arm-linux-gnueabihf/${GCC_VERSION} -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION} -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION}/arm-linux-gnueabihf -static"
BUILD_OPTION="-march=armv7-a -mfpu=vfp3 -marm --target=arm-linux-gnueabihf -L/usr/lib/gcc-cross/arm-linux-gnueabihf/${GCC_VERSION} -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION} -I/usr/arm-linux-gnueabihf/include/c++/${GCC_VERSION}/arm-linux-gnueabihf"
else
usage
fi
;;
arm64)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="aarch64-linux-gnu-"
BUILD_OPTION="--target=aarch64-linux-gnu -L/usr/lib/gcc-cross/aarch64-linux-gnu/${GCC_VERSION} -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -I/usr/aarch64-linux-gnu/include/c++/${GCC_VERSION} -I/usr/aarch64-linux-gnu/include/c++/${GCC_VERSION}/aarch64-linux-gnu -static"
BUILD_OPTION="--target=aarch64-linux-gnu -L/usr/lib/gcc-cross/aarch64-linux-gnu/${GCC_VERSION} -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -I/usr/aarch64-linux-gnu/include/c++/${GCC_VERSION} -I/usr/aarch64-linux-gnu/include/c++/${GCC_VERSION}/aarch64-linux-gnu"
else
usage
fi
@@ -110,7 +108,7 @@ case $TARGET_ARCH in
ppc)
if [ $TARGET_OS = "Linux" ]; then
BUILD_PREFIX="powerpc-linux-gnu-"
BUILD_OPTION="--target=powerpc-linux-gnu -L/usr/lib/gcc-cross/powerpc-linux-gnu/${GCC_VERSION} -L/usr/powerpc-linux-gnu/lib -I/usr/powerpc-linux-gnu/include -I/usr/powerpc-linux-gnu/include/c++/${GCC_VERSION} -I/usr/powerpc-linux-gnu/include/c++/${GCC_VERSION}/powerpc-linux-gnu"
BUILD_OPTION="--target=powerpc-linux-gnu -L/usr/lib/gcc-cross/powerpc-linux-gnu/${GCC_VERSION} -L/usr/powerpc-linux-gnu/lib -I/usr/powerpc-linux-gnu/include -I/usr/powerpc-linux-gnu/include/c++/${GCC_VERSION} -I/usr/powerpc-linux-gnu/include/c++/${GCC_VERSION}/powerpc-linux-gnu"
else
usage
fi
@@ -9,7 +9,8 @@

namespace fibjs {
void init_sym()
{}
{
}
}

extern "C" {
@@ -49,6 +50,31 @@ int __isoc99_sscanf(const char* s, const char* format, ...)

return done;
}

// GLIBC_2.28
#undef fcntl

#ifdef HAVE_GLIB_C_FCNTL_2_H
__asm__(".symver fcntl,fcntl@GLIBC_2.0");
#endif

#ifdef HAVE_GLIB_C_FCNTL_225_H
__asm__(".symver fcntl,fcntl@GLIBC_2.2.5");
#endif

#ifdef HAVE_GLIB_C_FCNTL_24_H
__asm__(".symver fcntl,fcntl@GLIBC_2.4");
#endif

#ifdef HAVE_GLIB_C_FCNTL_217_H
__asm__(".symver fcntl,fcntl@GLIBC_2.17");
#endif

int fcntl(int fd, int cmd, void* lock);
int fcntl64(int fd, int cmd, void* lock)
{
return fcntl(fd, cmd, lock);
}
}

#endif
@@ -1,5 +1,13 @@


#cmakedefine HAVE_ICONV_H 1

// posix_spawnp
#cmakedefine HAVE_GLIB_C_225_H 1
#cmakedefine HAVE_GLIB_C_22_H 1
#cmakedefine HAVE_GLIB_C_22_H 1

// fcntl64
#cmakedefine HAVE_GLIB_C_FCNTL_2_H 1
#cmakedefine HAVE_GLIB_C_FCNTL_225_H 1
#cmakedefine HAVE_GLIB_C_FCNTL_24_H 1
#cmakedefine HAVE_GLIB_C_FCNTL_217_H 1
BIN -169 Bytes (76%) test/vm_test/jsc_test_arm.jsc
Binary file not shown.
BIN -168 Bytes (77%) test/vm_test/jsc_test_arm64.jsc
Binary file not shown.
BIN -169 Bytes (76%) test/vm_test/jsc_test_ia32.jsc
Binary file not shown.
BIN -170 Bytes (77%) test/vm_test/jsc_test_x64.jsc
Binary file not shown.
@@ -0,0 +1,30 @@

apt install clang -y
apt install g++ -y
apt install make -y
apt install cmake -y
apt install git -y
apt install ccache -y

GCC_VERSION=`gcc -dumpversion`

apt install lib32stdc++-${GCC_VERSION}-dev -y

apt install g++-arm-linux-gnueabihf -y

apt install g++-aarch64-linux-gnu -y

apt install g++-mips-linux-gnu -y

apt install g++-mips64-linux-gnuabi64 -y

apt install g++-powerpc-linux-gnu -y

apt install g++-powerpc64-linux-gnu -y

rm -f /usr/include/asm
rm -f /usr/include/i386-linux-gnu
rm -f /usr/include/x86_64-linux-gnux32

ln -s x86_64-linux-gnu /usr/include/i386-linux-gnu
ln -s x86_64-linux-gnu /usr/include/x86_64-linux-gnux32
2 vender
Submodule vender updated 859 files

0 comments on commit 2175af8

Please sign in to comment.
You can’t perform that action at this time.