From: Bruno Haible Date: Mon, 28 Apr 2025 14:22:32 +0000 (+0200) Subject: tests: Support older GNU Modula-2 compilers. X-Git-Tag: v0.25~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8dce4dcce01202ea08f1f7d6f56a37762e3e41fb;p=thirdparty%2Fgettext.git tests: Support older GNU Modula-2 compilers. * gettext-tools/tests/lang-modula2: Don't use the option -fscaffold-main. --- diff --git a/gettext-tools/tests/lang-modula2 b/gettext-tools/tests/lang-modula2 index b4b111e7a..299385742 100644 --- a/gettext-tools/tests/lang-modula2 +++ b/gettext-tools/tests/lang-modula2 @@ -110,17 +110,29 @@ test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} ${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po -${M2C} ${M2FLAGS} -I"$top_builddir"/../gettext-runtime/intl-modula2 \ - -c -fscaffold-main prog.mod \ - || Exit 1 - -: ${CONFIG_SHELL=${SHELL-/bin/sh}} -${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \ - ${M2C} ${M2FLAGS} -o prog \ - prog.${OBJEXT} \ - "$top_builddir"/../gettext-runtime/intl-modula2/libintl_m2.la \ - ${LTLIBINTL} \ - || Exit 1 +if false; then + # Separate compilation requires the option -fscaffold-main, that was not + # present in gm2 versions before GCC 13. + ${M2C} ${M2FLAGS} -I"$top_builddir"/../gettext-runtime/intl-modula2 \ + -c -fscaffold-main prog.mod \ + || Exit 1 + + : ${CONFIG_SHELL=${SHELL-/bin/sh}} + ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \ + ${M2C} ${M2FLAGS} -o prog \ + prog.${OBJEXT} \ + "$top_builddir"/../gettext-runtime/intl-modula2/libintl_m2.la \ + ${LTLIBINTL} \ + || Exit 1 +else + ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \ + ${M2C} ${M2FLAGS} -I"$top_builddir"/../gettext-runtime/intl-modula2 \ + -o prog \ + prog.mod \ + "$top_builddir"/../gettext-runtime/intl-modula2/libintl_m2.la \ + ${LTLIBINTL} \ + || Exit 1 +fi : ${DIFF=diff} cat <<\EOF > prog.ok