mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 19:41:36 +00:00
Fix detecting minimum glibc version for linux binaries
This commit is contained in:
parent
7e8d7867e6
commit
463403094a
2 changed files with 27 additions and 14 deletions
|
@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#define BASETA "missionpack"
|
#define BASETA "missionpack"
|
||||||
|
|
||||||
#ifndef PRODUCT_VERSION
|
#ifndef PRODUCT_VERSION
|
||||||
#define PRODUCT_VERSION "v0.0.1.2 r233"
|
#define PRODUCT_VERSION "v0.0.1.2 r234"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PRODUCT_DATE
|
#ifndef PRODUCT_DATE
|
||||||
|
|
|
@ -151,17 +151,25 @@ if [ $VERBOSE -eq 1 ] ; then
|
||||||
# Find glibc lines, remove text before GLIBC, then sort by required glibc version
|
# Find glibc lines, remove text before GLIBC, then sort by required glibc version
|
||||||
# "sort -t _ -k 2 -V" is short form of "sort --field-separator='_' --key=2 --version-sort"
|
# "sort -t _ -k 2 -V" is short form of "sort --field-separator='_' --key=2 --version-sort"
|
||||||
echo
|
echo
|
||||||
echo "spearmint-server_$ARCH:"
|
if [ "$ARCH" = "x86" ] ; then
|
||||||
objdump -T build/release-linux-$ARCH/spearmint-server_$ARCH | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
echo "q3rally-server:"
|
||||||
|
objdump -T build/release-linux-$ARCH/q3rally-server | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
|
echo
|
||||||
|
echo "q3rally:"
|
||||||
|
objdump -T build/release-linux-$ARCH/q3rally | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
|
else
|
||||||
|
echo "q3rally-server.$ARCH:"
|
||||||
|
objdump -T build/release-linux-$ARCH/q3rally-server.$ARCH | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
|
echo
|
||||||
|
echo "q3rally.$ARCH:"
|
||||||
|
objdump -T build/release-linux-$ARCH/q3rally.$ARCH | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
echo "spearmint_$ARCH:"
|
echo "renderer_opengl1_$ARCH.so:"
|
||||||
objdump -T build/release-linux-$ARCH/spearmint_$ARCH | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
objdump -T build/release-linux-$ARCH/renderer_opengl1_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
echo
|
echo
|
||||||
echo "spearmint-renderer-opengl1_$ARCH.so:"
|
echo "renderer_opengl2_$ARCH.so:"
|
||||||
objdump -T build/release-linux-$ARCH/spearmint-renderer-opengl1_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
objdump -T build/release-linux-$ARCH/renderer_opengl2_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
echo
|
|
||||||
echo "spearmint-renderer-opengl2_$ARCH.so:"
|
|
||||||
objdump -T build/release-linux-$ARCH/spearmint-renderer-opengl2_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
|
||||||
echo
|
echo
|
||||||
echo "lib/$ARCH/libSDL2-2.0.so.0:"
|
echo "lib/$ARCH/libSDL2-2.0.so.0:"
|
||||||
objdump -T build/release-linux-$ARCH/lib/$ARCH/libSDL2-2.0.so.0 | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
objdump -T build/release-linux-$ARCH/lib/$ARCH/libSDL2-2.0.so.0 | grep GLIBC | sed -e "s/.*GLIBC_/GLIBC_/g" | sort -t _ -k 2 -V
|
||||||
|
@ -169,10 +177,15 @@ fi
|
||||||
|
|
||||||
# Find glibc lines, remove text before and including GLIBC_, remove trailing function name, sort by required glibc version, then grab the last (highest) version
|
# Find glibc lines, remove text before and including GLIBC_, remove trailing function name, sort by required glibc version, then grab the last (highest) version
|
||||||
# "sort -uV" is short form of "sort --unique --version-sort"
|
# "sort -uV" is short form of "sort --unique --version-sort"
|
||||||
GLIBC_SERVER=$(objdump -T build/release-linux-$ARCH/spearmint-server_$ARCH | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
if [ "$ARCH" = "x86" ] ; then
|
||||||
GLIBC_C1=$(objdump -T build/release-linux-$ARCH/spearmint_$ARCH | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
GLIBC_SERVER=$(objdump -T build/release-linux-$ARCH/q3rally-server | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
GLIBC_C2=$(objdump -T build/release-linux-$ARCH/spearmint-renderer-opengl1_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
GLIBC_C1=$(objdump -T build/release-linux-$ARCH/q3rally | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
GLIBC_C3=$(objdump -T build/release-linux-$ARCH/spearmint-renderer-opengl2_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
else
|
||||||
|
GLIBC_SERVER=$(objdump -T build/release-linux-$ARCH/q3rally-server.$ARCH | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
|
GLIBC_C1=$(objdump -T build/release-linux-$ARCH/q3rally.$ARCH | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
|
fi
|
||||||
|
GLIBC_C2=$(objdump -T build/release-linux-$ARCH/renderer_opengl1_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
|
GLIBC_C3=$(objdump -T build/release-linux-$ARCH/renderer_opengl2_$ARCH.so | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
GLIBC_C4=$(objdump -T build/release-linux-$ARCH/lib/$ARCH/libSDL2-2.0.so.0 | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
GLIBC_C4=$(objdump -T build/release-linux-$ARCH/lib/$ARCH/libSDL2-2.0.so.0 | grep GLIBC | sed -e "s/.*GLIBC_//g" | cut -d' ' -f1 | sort -uV | tail -1)
|
||||||
GLIBC_CLIENT=$(printf "$GLIBC_C1\n$GLIBC_C2\n$GLIBC_C3\n$GLIBC_C4\n" | sort -uV | tail -1)
|
GLIBC_CLIENT=$(printf "$GLIBC_C1\n$GLIBC_C2\n$GLIBC_C3\n$GLIBC_C4\n" | sort -uV | tail -1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue