summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2000-08-19 09:57:57 +0000
committerBruno Haible <bruno@clisp.org>2000-08-19 09:57:57 +0000
commit1301bd1dd6d84ff2d13673dd3030eefc3c415d02 (patch)
tree477466671807244938546549b139629f89257362 /tests
parentbebc542b9e1b3a11e4645da68b262543810bb755 (diff)
downloadgperf-1301bd1dd6d84ff2d13673dd3030eefc3c415d02.tar.gz
gcc -traditional doesn't work any more.
Diffstat (limited to 'tests')
-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
;;