13
0

linux-installer: gcc4/5 warning.

This commit is contained in:
Robin Gareus 2015-09-11 18:46:23 +02:00
parent ba6e274efa
commit 1ef17e5813
2 changed files with 46 additions and 1 deletions

View File

@ -32,6 +32,7 @@ WITH_NLS=
EXTERNAL_JACK=
VENDOR=Ardour ;
EXENAME=ardour
GCC5ABI=false
BUILDTYPE=""
@ -86,6 +87,7 @@ while [ $# -gt 0 ] ; do
--sysdeps) PRINT_SYSDEPS=1; shift ;;
--nls) WITH_NLS=1 ; shift ;;
--harvid) WITH_HARVID=1 ; shift ;;
--gcc5abi) GCC5ABI=true ; shift ;;
*)
#catch all for unknown arguments
@ -655,10 +657,18 @@ chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
#
# Add the stage2.run script
#
sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/" < stage2.run.in > stage2.run
sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/;s/%REPLACE_GCC5%/${GCC5ABI}" < stage2.run.in > stage2.run
chmod a+x stage2.run
# gcc4/5 ABI test tool
if [ -e $BUILD_ROOT/tools/gccabicheck/gcc-glibmm-abi-check]; then
cp $BUILD_ROOT/tools/gccabicheck/gcc-glibmm-abi-check $APPBIN
else
echo "!!!ERROR !!! gcc-glibmm-abi-check program is missing. packager will exit without being complete"
exit 1
fi
#Sanity Check file
if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN

View File

@ -229,6 +229,41 @@ case `uname -m` in
;;
esac
#############################
# Determine C11 stdlibc++ ABI
#############################
if %REPLACE_GCC5%; then
# Ardour was compiled with gcc5, warn on gcc4 systems
if ! ${NORM_USER} "${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/gcc-glibmm-abi-check --gcc5 > /dev/null"; then
echo ""
echo "WARNING: GCC4/5 libstdc++ ABI Mismatch"
echo ""
echo "Ardour was compiled with gcc5, your system uses an older version of the"
echo "standard c++ library. Plugins on your system may not load or plugin-UIs"
echo "may cause crashes."
echo ""
ANSWER=$(VaildateYesNoQuestion "Continue anyway?")
if test "n" = $ANSWER; then
exit 1
fi
else
# Ardour was compiled with gcc4, warn on gcc5 systems
if ! ${NORM_USER} "${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/gcc-glibmm-abi-check --gcc4 > /dev/null"; then
echo ""
echo "WARNING: GCC4/5 libstdc++ ABI Mismatch"
echo ""
echo "Ardour was compiled with gcc4, your system uses a newer version of the"
echo "standard c++ library. Plugins on your system may not load or plugin-UIs"
echo "may cause crashes."
echo ""
ANSWER=$(VaildateYesNoQuestion "Continue anyway?")
if test "n" = $ANSWER; then
exit 1
fi
fi
fi
####################
# Check disk space
####################