summaryrefslogtreecommitdiff
path: root/tests/validate
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validate')
-rwxr-xr-xtests/validate16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/validate b/tests/validate
index a4813ab..502673d 100755
--- a/tests/validate
+++ b/tests/validate
@@ -15,22 +15,30 @@ verbose () {
languages=$1
shift
+# On old systems, it's worth trying gcc -traditional.
+# On glibc-2.1 systems, gcc -traditional doesn't work any more.
+use_traditional=false
+
for lang in `echo $languages | sed -e 's/,/ /g'`; do
case "$lang" in
KR-C )
echo "${GPERF} -I -L KR-C $@ > valitest.c"
${GPERF} -I -L KR-C "$@" > valitest.c
grep -n ' const ' valitest.c /dev/null && exit 1
- verbose ${CC} ${CFLAGS} -traditional valitest.c -o valitest
- ./valitest
+ if test $use_traditional = true; then
+ verbose ${CC} ${CFLAGS} -traditional valitest.c -o valitest
+ ./valitest
+ fi
verbose ${CC} ${CFLAGS} -ansi -pedantic valitest.c -o valitest
./valitest
;;
C )
echo "${GPERF} -I -L C $@ > valitest.c"
${GPERF} -I -L C "$@" > valitest.c
- verbose ${CC} ${CFLAGS} -traditional -Dconst= valitest.c -o valitest
- ./valitest
+ if test $use_traditional = true; then
+ verbose ${CC} ${CFLAGS} -traditional -Dconst= valitest.c -o valitest
+ ./valitest
+ fi
verbose ${CC} ${CFLAGS} -ansi -pedantic -pedantic-errors valitest.c -o valitest
./valitest
;;