diff options
author | DRC <dcommander@users.sourceforge.net> | 2010-01-08 11:17:36 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2010-01-08 11:17:36 +0000 |
commit | adadd9da419ba7d814271dccf9b7351753cf4d59 (patch) | |
tree | df0513dd8c2da2fa6819690d59cc9ca5955bce9f /release | |
parent | 5819a7bd6e829bfb962e95a400b936bbd41da1a4 (diff) | |
download | tigervnc-adadd9da419ba7d814271dccf9b7351753cf4d59.tar.gz tigervnc-adadd9da419ba7d814271dccf9b7351753cf4d59.zip |
Add scripts for building a cross-compatible version of TigerVNC on Linux. These build upon the new '-static' option to the build-xorg-7.4 script and add Linux-specific options for statically linking with libgcc, libstdc++, and libcrypto. When used with RHEL 4, these should produce a version of TigerVNC which will work with all later versions of Linux.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3939 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'release')
-rwxr-xr-x | release/build-compat-linux | 36 | ||||
-rwxr-xr-x | release/build-compat-linux-m32 | 34 |
2 files changed, 70 insertions, 0 deletions
diff --git a/release/build-compat-linux b/release/build-compat-linux new file mode 100755 index 00000000..f343508f --- /dev/null +++ b/release/build-compat-linux @@ -0,0 +1,36 @@ +#!/bin/sh +# This script wraps build-xorg-7.4 to enable building a version of TigerVNC +# which is compatible across Linux distributions. + +set -e + +if [ "$1" = "" ]; then + echo USAGE: $0 init \| build \| update + exit 0 +fi + +SCRIPTDIR=`dirname $0` +pushd $SCRIPTDIR/../unix +if [ ! -d ./xorg.build/lib ]; then + mkdir -p ./xorg.build/lib +fi +CFLAGS='-O3 -static-libgcc' +CXXFLAGS=$CFLAGS +LDFLAGS=$CFLAGS' -L'`pwd`'/xorg.build/lib' +export CFLAGS +export CXXFLAGS +export LDFLAGS +if [ -f ./xorg.build/lib/libstdc++.a ]; then + rm -f ./xorg.build/lib/libstdc++.a +fi +ln -fs `gcc $CFLAGS -print-file-name=libstdc++.a` ./xorg.build/lib +if [ -f ./xorg.build/lib/libcrypto.a ]; then + rm -f ./xorg.build/lib/libcrypto.a +fi +if [ "`uname -m`" = "x86_64" ]; then + ln -fs /usr/lib64/libcrypto.a ./xorg.build/lib +else + ln -fs /usr/lib/libcrypto.a ./xorg.build/lib +fi +. build-xorg-7.4 $1 -static +popd diff --git a/release/build-compat-linux-m32 b/release/build-compat-linux-m32 new file mode 100755 index 00000000..0e43c858 --- /dev/null +++ b/release/build-compat-linux-m32 @@ -0,0 +1,34 @@ +#!/bin/sh +# This script wraps build-xorg-7.4 to enable building a version of TigerVNC +# which is compatible across Linux distributions. It is identical to +# build-compat-linux, except that it adds the necessary arguments to cross- +# compile a 32-bit version of TigerVNC on a 64-bit system. + +set -e + +if [ "$1" = "" ]; then + echo USAGE: $0 init \| build \| update + exit 0 +fi + +SCRIPTDIR=`dirname $0` +pushd $SCRIPTDIR/../unix +if [ ! -d ./xorg.build/lib ]; then + mkdir -p ./xorg.build/lib +fi +CFLAGS='-m32 -O3 -static-libgcc' +CXXFLAGS=$CFLAGS +LDFLAGS=$CFLAGS' -L'`pwd`'/xorg.build/lib' +export CFLAGS +export CXXFLAGS +export LDFLAGS +if [ -f ./xorg.build/lib/libstdc++.a ]; then + rm -f ./xorg.build/lib/libstdc++.a +fi +ln -fs `gcc $CFLAGS -print-file-name=libstdc++.a` ./xorg.build/lib +if [ -f ./xorg.build/lib/libcrypto.a ]; then + rm -f ./xorg.build/lib/libcrypto.a +fi +ln -fs /usr/lib/libcrypto.a ./xorg.build/lib +. build-xorg-7.4 $1 -static --host i686-pc-linux-gnu +popd |