1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

gcc -traditional doesn't work any more.

This commit is contained in:
Bruno Haible
2000-08-19 09:57:57 +00:00
parent bebc542b9e
commit 1301bd1dd6
2 changed files with 14 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr> 2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* tests/validate: Don't run -traditional tests by default.
* src/main.cc (main): Check for write error on stdout before returning. * src/main.cc (main): Check for write error on stdout before returning.
* src/Makefile.in (LDFLAGS): New definition, to catch the value given at * src/Makefile.in (LDFLAGS): New definition, to catch the value given at

View File

@@ -15,22 +15,30 @@ verbose () {
languages=$1 languages=$1
shift 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 for lang in `echo $languages | sed -e 's/,/ /g'`; do
case "$lang" in case "$lang" in
KR-C ) KR-C )
echo "${GPERF} -I -L KR-C $@ > valitest.c" echo "${GPERF} -I -L KR-C $@ > valitest.c"
${GPERF} -I -L KR-C "$@" > valitest.c ${GPERF} -I -L KR-C "$@" > valitest.c
grep -n ' const ' valitest.c /dev/null && exit 1 grep -n ' const ' valitest.c /dev/null && exit 1
if test $use_traditional = true; then
verbose ${CC} ${CFLAGS} -traditional valitest.c -o valitest verbose ${CC} ${CFLAGS} -traditional valitest.c -o valitest
./valitest ./valitest
fi
verbose ${CC} ${CFLAGS} -ansi -pedantic valitest.c -o valitest verbose ${CC} ${CFLAGS} -ansi -pedantic valitest.c -o valitest
./valitest ./valitest
;; ;;
C ) C )
echo "${GPERF} -I -L C $@ > valitest.c" echo "${GPERF} -I -L C $@ > valitest.c"
${GPERF} -I -L C "$@" > valitest.c ${GPERF} -I -L C "$@" > valitest.c
if test $use_traditional = true; then
verbose ${CC} ${CFLAGS} -traditional -Dconst= valitest.c -o valitest verbose ${CC} ${CFLAGS} -traditional -Dconst= valitest.c -o valitest
./valitest ./valitest
fi
verbose ${CC} ${CFLAGS} -ansi -pedantic -pedantic-errors valitest.c -o valitest verbose ${CC} ${CFLAGS} -ansi -pedantic -pedantic-errors valitest.c -o valitest
./valitest ./valitest
;; ;;