diff options
author | Bruno Haible <bruno@clisp.org> | 2000-08-19 09:57:57 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2000-08-19 09:57:57 +0000 |
commit | 1301bd1dd6d84ff2d13673dd3030eefc3c415d02 (patch) | |
tree | 477466671807244938546549b139629f89257362 /tests | |
parent | bebc542b9e1b3a11e4645da68b262543810bb755 (diff) | |
download | gperf-1301bd1dd6d84ff2d13673dd3030eefc3c415d02.tar.gz |
gcc -traditional doesn't work any more.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/validate | 16 |
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 ;; |