Skip to content
Permalink
Browse files

core, bugfix: compile error on ubuntu 18.04.

  • Loading branch information...
xicilion committed Apr 5, 2019
1 parent 5c3c59c commit aed20b59884c074755a24f2311f8f5ae26b9edb7
Showing with 22 additions and 19 deletions.
  1. +7 −6 build
  2. +7 −6 fibjs/build
  3. +7 −6 fibjs/program/build
  4. +1 −1 vender
13 build
@@ -49,6 +49,7 @@ TARGET_ARCH=$HOST_ARCH
BUILD_TYPE="release"
BUILD_PREFIX=""
BUILD_OPTION=""
GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`

for i in "$@"
do
@@ -90,47 +91,47 @@ if [ $TARGET_ARCH != $HOST_ARCH ] || [ $TARGET_OS != $HOST_OS ]; then
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/5 -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/5 -I/usr/arm-linux-gnueabihf/include/c++/5/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/5 -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -I/usr/aarch64-linux-gnu/include/c++/5 -I/usr/aarch64-linux-gnu/include/c++/5/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/5 -L/usr/mips-linux-gnu/lib -I/usr/mips-linux-gnu/include -I/usr/mips-linux-gnu/include/c++/5 -I/usr/mips-linux-gnu/include/c++/5/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/5 -L/usr/mips64-linux-gnuabi64/lib -I/usr/mips64-linux-gnuabi64/include -I/usr/mips64-linux-gnuabi64/include/c++/5 -I/usr/mips64-linux-gnuabi64/include/c++/5/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/5 -L/usr/powerpc-linux-gnu/lib -I/usr/powerpc-linux-gnu/include -I/usr/powerpc-linux-gnu/include/c++/5 -I/usr/powerpc-linux-gnu/include/c++/5/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/5 -L/usr/powerpc64-linux-gnu/lib -I/usr/powerpc64-linux-gnu/include -I/usr/powerpc64-linux-gnu/include/c++/5 -I/usr/powerpc64-linux-gnu/include/c++/5/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
fi
@@ -45,6 +45,7 @@ TARGET_OS=$HOST_OS
TARGET_ARCH=$HOST_ARCH
BUILD_TYPE="release"
BUILD_OPTION=""
GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`

for i in "$@"
do
@@ -79,42 +80,42 @@ if [ $TARGET_ARCH != $HOST_ARCH ] || [ $TARGET_OS != $HOST_OS ]; then
;;
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/5 -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/5 -I/usr/arm-linux-gnueabihf/include/c++/5/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_OPTION="--target=aarch64-linux-gnu -L/usr/lib/gcc-cross/aarch64-linux-gnu/5 -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -I/usr/aarch64-linux-gnu/include/c++/5 -I/usr/aarch64-linux-gnu/include/c++/5/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_OPTION="--target=mips-linux-gnu -L/usr/lib/gcc-cross/mips-linux-gnu/5 -L/usr/mips-linux-gnu/lib -I/usr/mips-linux-gnu/include -I/usr/mips-linux-gnu/include/c++/5 -I/usr/mips-linux-gnu/include/c++/5/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_OPTION="--target=mips64-linux-gnuabi64 -L/usr/lib/gcc-cross/mips64-linux-gnuabi64/5 -L/usr/mips64-linux-gnuabi64/lib -I/usr/mips64-linux-gnuabi64/include -I/usr/mips64-linux-gnuabi64/include/c++/5 -I/usr/mips64-linux-gnuabi64/include/c++/5/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_OPTION="--target=powerpc-linux-gnu -L/usr/lib/gcc-cross/powerpc-linux-gnu/5 -L/usr/powerpc-linux-gnu/lib -I/usr/powerpc-linux-gnu/include -I/usr/powerpc-linux-gnu/include/c++/5 -I/usr/powerpc-linux-gnu/include/c++/5/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_OPTION="--target=powerpc64-linux-gnu -L/usr/lib/gcc-cross/powerpc64-linux-gnu/5 -L/usr/powerpc64-linux-gnu/lib -I/usr/powerpc64-linux-gnu/include -I/usr/powerpc64-linux-gnu/include/c++/5 -I/usr/powerpc64-linux-gnu/include/c++/5/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
fi
@@ -46,6 +46,7 @@ TARGET_ARCH=$HOST_ARCH
BUILD_TYPE="release"
BUILD_PREFIX=""
BUILD_OPTION=""
GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`

for i in "$@"
do
@@ -83,47 +84,47 @@ if [ $TARGET_ARCH != $HOST_ARCH ] || [ $TARGET_OS != $HOST_OS ]; then
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/5 -L/usr/arm-linux-gnueabihf/lib -I/usr/arm-linux-gnueabihf/include -I/usr/arm-linux-gnueabihf/include/c++/5 -I/usr/arm-linux-gnueabihf/include/c++/5/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/5 -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -I/usr/aarch64-linux-gnu/include/c++/5 -I/usr/aarch64-linux-gnu/include/c++/5/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/5 -L/usr/mips-linux-gnu/lib -I/usr/mips-linux-gnu/include -I/usr/mips-linux-gnu/include/c++/5 -I/usr/mips-linux-gnu/include/c++/5/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/5 -L/usr/mips64-linux-gnuabi64/lib -I/usr/mips64-linux-gnuabi64/include -I/usr/mips64-linux-gnuabi64/include/c++/5 -I/usr/mips64-linux-gnuabi64/include/c++/5/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/5 -L/usr/powerpc-linux-gnu/lib -I/usr/powerpc-linux-gnu/include -I/usr/powerpc-linux-gnu/include/c++/5 -I/usr/powerpc-linux-gnu/include/c++/5/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/5 -L/usr/powerpc64-linux-gnu/lib -I/usr/powerpc64-linux-gnu/include -I/usr/powerpc64-linux-gnu/include/c++/5 -I/usr/powerpc64-linux-gnu/include/c++/5/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
fi
2 vender
Submodule vender updated 1 files
+7 −6 build

0 comments on commit aed20b5

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