[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compilation failure of gdb with non-gcc compiler
From: |
Bruno Haible |
Subject: |
compilation failure of gdb with non-gcc compiler |
Date: |
Wed, 10 May 2006 20:06:42 -0000 |
User-agent: |
KMail/1.5 |
Hi,
Configuring gdb-6.4 on Linux/x86 with Sun C 5.9 leads to a compilation error:
$ export CC="c89 -Aa"
$ export CFLAGS=-xO5
$ ./configure --prefix=/packages/inst-sunpro --disable-shared --enable-static
...
$ make
make[4]: entrant dans le répertoire « /build/sunpro/gdb-6.4/bfd »
rm -f bfd-tmp.h
cp bfd-in3.h bfd-tmp.h
/bin/sh .././bfd/../move-if-change bfd-tmp.h bfd.h
rm -f bfd-tmp.h
touch stmp-bfd-h
/bin/sh ./libtool --mode=compile c89 -Xa -DHAVE_CONFIG_H -I. -I.././bfd -I.
-DTRAD_CORE -I. -I.././bfd -I.././bfd/../include -I.././bfd/../intl
-I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -xO5 -c -o
archive.lo archive.c
c89 -Xa -DHAVE_CONFIG_H -I. -I.././bfd -I. -DTRAD_CORE -I. -I.././bfd
-I.././bfd/../include -I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -xO5 -c archive.c -o archive.o
c89: illegal option -W-Wall
make[4]: *** [archive.lo] Fehler 1
Here is a fix.
2006-05-07 Bruno Haible <address@hidden>
* warning.m4 (AM_BINUTILS_WARNINGS): Put gcc-specific flags into
WARN_CFLAGS and NO_WERROR only when the compiler is known to be gcc.
*** warning.m4.bak 2005-04-14 07:26:16.000000000 +0200
--- warning.m4 2006-05-07 17:18:23.000000000 +0200
***************
*** 1,7 ****
dnl Common configure.in fragment
AC_DEFUN([AM_BINUTILS_WARNINGS],[
! WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors],
--- 1,11 ----
dnl Common configure.in fragment
AC_DEFUN([AM_BINUTILS_WARNINGS],[
! if test "${GCC}" = yes ; then
! WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
! else
! WARN_CFLAGS=
! fi
AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors],
***************
*** 17,23 ****
fi
NO_WERROR=
! if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi
--- 21,27 ----
fi
NO_WERROR=
! if test "${ERROR_ON_WARNING}" = yes -a test "${GCC}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi
***************
*** 26,32 ****
[ --enable-build-warnings Enable build-time compiler warnings],
[case "${enableval}" in
yes) ;;
! no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
--- 30,38 ----
[ --enable-build-warnings Enable build-time compiler warnings],
[case "${enableval}" in
yes) ;;
! no) if test "${GCC}" = yes ; then
! WARN_CFLAGS="-w"
! fi;;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- compilation failure of gdb with non-gcc compiler,
Bruno Haible <=