mirror of https://github.com/status-im/xgo.git
Don't strip darwin symbol table above Go 1.6
This commit is contained in:
parent
619a9e50d0
commit
1b23ab2797
|
@ -141,8 +141,11 @@ for TARGET in $TARGETS; do
|
||||||
|
|
||||||
echo "Compiling for android-$PLATFORM/arm..."
|
echo "Compiling for android-$PLATFORM/arm..."
|
||||||
CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ HOST=arm-linux-androideabi PREFIX=/usr/$ANDROID_CHAIN_ARM/arm-linux-androideabi $BUILD_DEPS /deps
|
CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ HOST=arm-linux-androideabi PREFIX=/usr/$ANDROID_CHAIN_ARM/arm-linux-androideabi $BUILD_DEPS /deps
|
||||||
CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_CXXFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go get $V $X "${T[@]}" --ldflags="$LD" -d ./$PACK
|
CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_CXXFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK
|
||||||
CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_CXXFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go build $V $X "${T[@]}" --ldflags="$EXT_LDPIE $LD" -o /build/$NAME-android-$PLATFORM-arm ./$PACK
|
CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ GOOS=android GOARCH=arm GOARM=7 CGO_ENABLED=1 CGO_CFLAGS="$CGO_CCPIE" CGO_CXXFLAGS="$CGO_CCPIE" CGO_LDFLAGS="$CGO_LDPIE" go build $V $X "${T[@]}" --ldflags="$V $EXT_LDPIE $LD" -o /build/$NAME-android-$PLATFORM-arm ./$PACK
|
||||||
|
|
||||||
|
echo "Cleaning up toolchain for android-$PLATFORM/arm..."
|
||||||
|
rm -rf /usr/$ANDROID_CHAIN_ARM
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -150,20 +153,20 @@ for TARGET in $TARGETS; do
|
||||||
if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]); then
|
if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]); then
|
||||||
echo "Compiling for linux/amd64..."
|
echo "Compiling for linux/amd64..."
|
||||||
HOST=x86_64-linux PREFIX=/usr/local $BUILD_DEPS /deps
|
HOST=x86_64-linux PREFIX=/usr/local $BUILD_DEPS /deps
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$LD" -d ./$PACK
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$LD" $R -o /build/$NAME-linux-amd64$R ./$PACK
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$V $LD" $R -o /build/$NAME-linux-amd64$R ./$PACK
|
||||||
fi
|
fi
|
||||||
if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "386" ]); then
|
if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "386" ]); then
|
||||||
echo "Compiling for linux/386..."
|
echo "Compiling for linux/386..."
|
||||||
HOST=i686-linux PREFIX=/usr/local $BUILD_DEPS /deps
|
HOST=i686-linux PREFIX=/usr/local $BUILD_DEPS /deps
|
||||||
GOOS=linux GOARCH=386 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$LD" -d ./$PACK
|
GOOS=linux GOARCH=386 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK
|
||||||
GOOS=linux GOARCH=386 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$LD" -o /build/$NAME-linux-386 ./$PACK
|
GOOS=linux GOARCH=386 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$V $LD" -o /build/$NAME-linux-386 ./$PACK
|
||||||
fi
|
fi
|
||||||
if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "arm" ]); then
|
if ([ $XGOOS == "." ] || [ $XGOOS == "linux" ]) && ([ $XGOARCH == "." ] || [ $XGOARCH == "arm" ]); then
|
||||||
echo "Compiling for linux/arm..."
|
echo "Compiling for linux/arm..."
|
||||||
CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 HOST=arm-linux PREFIX=/usr/local/arm $BUILD_DEPS /deps
|
CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 HOST=arm-linux PREFIX=/usr/local/arm $BUILD_DEPS /deps
|
||||||
CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 GOOS=linux GOARCH=arm CGO_ENABLED=1 GOARM=5 go get $V $X "${T[@]}" --ldflags="$LD" -d ./$PACK
|
CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 GOOS=linux GOARCH=arm CGO_ENABLED=1 GOARM=5 go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK
|
||||||
CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 GOOS=linux GOARCH=arm CGO_ENABLED=1 GOARM=5 go build $V $X "${T[@]}" --ldflags="$LD" -o /build/$NAME-linux-arm ./$PACK
|
CC=arm-linux-gnueabi-gcc-5 CXX=arm-linux-gnueabi-g++-5 GOOS=linux GOARCH=arm CGO_ENABLED=1 GOARM=5 go build $V $X "${T[@]}" --ldflags="$V $LD" -o /build/$NAME-linux-arm ./$PACK
|
||||||
fi
|
fi
|
||||||
# Check and build for Windows targets
|
# Check and build for Windows targets
|
||||||
if [ $XGOOS == "." ] || [[ $XGOOS == windows* ]]; then
|
if [ $XGOOS == "." ] || [[ $XGOOS == windows* ]]; then
|
||||||
|
@ -183,14 +186,14 @@ for TARGET in $TARGETS; do
|
||||||
if [ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]; then
|
if [ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]; then
|
||||||
echo "Compiling for windows-$PLATFORM/amd64..."
|
echo "Compiling for windows-$PLATFORM/amd64..."
|
||||||
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix HOST=x86_64-w64-mingw32 PREFIX=/usr/x86_64-w64-mingw32 $BUILD_DEPS /deps
|
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix HOST=x86_64-w64-mingw32 PREFIX=/usr/x86_64-w64-mingw32 $BUILD_DEPS /deps
|
||||||
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go get $V $X "${T[@]}" --ldflags="$LD" -d ./$PACK
|
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK
|
||||||
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go build $V $X "${T[@]}" --ldflags="$LD" $R -o /build/$NAME-windows-$PLATFORM-amd64$R.exe ./$PACK
|
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go build $V $X "${T[@]}" --ldflags="$V $LD" $R -o /build/$NAME-windows-$PLATFORM-amd64$R.exe ./$PACK
|
||||||
fi
|
fi
|
||||||
if [ $XGOARCH == "." ] || [ $XGOARCH == "386" ]; then
|
if [ $XGOARCH == "." ] || [ $XGOARCH == "386" ]; then
|
||||||
echo "Compiling for windows-$PLATFORM/386..."
|
echo "Compiling for windows-$PLATFORM/386..."
|
||||||
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix HOST=i686-w64-mingw32 PREFIX=/usr/i686-w64-mingw32 $BUILD_DEPS /deps
|
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix HOST=i686-w64-mingw32 PREFIX=/usr/i686-w64-mingw32 $BUILD_DEPS /deps
|
||||||
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go get $V $X "${T[@]}" --ldflags="$LD" -d ./$PACK
|
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go get $V $X "${T[@]}" --ldflags="$V $LD" -d ./$PACK
|
||||||
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go build $V $X "${T[@]}" --ldflags="$LD" -o /build/$NAME-windows-$PLATFORM-386.exe ./$PACK
|
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 CGO_ENABLED=1 CGO_CFLAGS="$CGO_NTDEF" CGO_CXXFLAGS="$CGO_NTDEF" go build $V $X "${T[@]}" --ldflags="$V $LD" -o /build/$NAME-windows-$PLATFORM-386.exe ./$PACK
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Check and build for OSX targets
|
# Check and build for OSX targets
|
||||||
|
@ -202,18 +205,23 @@ for TARGET in $TARGETS; do
|
||||||
fi
|
fi
|
||||||
export MACOSX_DEPLOYMENT_TARGET=$PLATFORM
|
export MACOSX_DEPLOYMENT_TARGET=$PLATFORM
|
||||||
|
|
||||||
|
# Strip symbol table below Go 1.6 to prevent DWARF issues
|
||||||
|
LDSTRIP=""
|
||||||
|
if [ "$GO_VERSION" -lt 160 ]; then
|
||||||
|
LDSTRIP="-s"
|
||||||
|
fi
|
||||||
# Build the requested darwin binaries
|
# Build the requested darwin binaries
|
||||||
if [ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]; then
|
if [ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]; then
|
||||||
echo "Compiling for darwin-$PLATFORM/amd64..."
|
echo "Compiling for darwin-$PLATFORM/amd64..."
|
||||||
CC=o64-clang CXX=o64-clang++ HOST=x86_64-apple-darwin13 PREFIX=/usr/local $BUILD_DEPS /deps
|
CC=o64-clang CXX=o64-clang++ HOST=x86_64-apple-darwin13 PREFIX=/usr/local $BUILD_DEPS /deps
|
||||||
CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="-s $LD" -d ./$PACK
|
CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$LDSTRIP $V $LD" -d ./$PACK
|
||||||
CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="-s $LD" $R -o /build/$NAME-darwin-$PLATFORM-amd64$R ./$PACK
|
CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$LDSTRIP $V $LD" $R -o /build/$NAME-darwin-$PLATFORM-amd64$R ./$PACK
|
||||||
fi
|
fi
|
||||||
if [ $XGOARCH == "." ] || [ $XGOARCH == "386" ]; then
|
if [ $XGOARCH == "." ] || [ $XGOARCH == "386" ]; then
|
||||||
echo "Compiling for darwin-$PLATFORM/386..."
|
echo "Compiling for darwin-$PLATFORM/386..."
|
||||||
CC=o32-clang CXX=o32-clang++ HOST=i386-apple-darwin13 PREFIX=/usr/local $BUILD_DEPS /deps
|
CC=o32-clang CXX=o32-clang++ HOST=i386-apple-darwin13 PREFIX=/usr/local $BUILD_DEPS /deps
|
||||||
CC=o32-clang CXX=o32-clang++ GOOS=darwin GOARCH=386 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="-s $LD" -d ./$PACK
|
CC=o32-clang CXX=o32-clang++ GOOS=darwin GOARCH=386 CGO_ENABLED=1 go get $V $X "${T[@]}" --ldflags="$LDSTRIP $V $LD" -d ./$PACK
|
||||||
CC=o32-clang CXX=o32-clang++ GOOS=darwin GOARCH=386 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="-s $LD" -o /build/$NAME-darwin-$PLATFORM-386 ./$PACK
|
CC=o32-clang CXX=o32-clang++ GOOS=darwin GOARCH=386 CGO_ENABLED=1 go build $V $X "${T[@]}" --ldflags="$LDSTRIP $V $LD" -o /build/$NAME-darwin-$PLATFORM-386 ./$PACK
|
||||||
fi
|
fi
|
||||||
# Remove any automatically injected deployment target vars
|
# Remove any automatically injected deployment target vars
|
||||||
unset MACOSX_DEPLOYMENT_TARGET
|
unset MACOSX_DEPLOYMENT_TARGET
|
||||||
|
|
Loading…
Reference in New Issue