This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to remove warning flags from non-GCC compilers.


On Thu, Nov 03, 2005 at 04:12:51PM -0800, Steve Ellcey wrote:
> 
> While trying to build binutils on HP-UX with the system compiler I found
> that I got an error because of the AM_BINUTILS_WARNINGS macro.  It was
> adding -Wall (and other -W options) and this caused the system compiler
> to abort because -W means something else to the HP compiler.  I would
> like to change the AM_BINUTILS_WARNINGS macro to not set WARN_CFLAGS (or
> NO_WERROR) when the compiler is not GCC.  Currently, even if I set
> --disable-build-warnings, this macro sets WARN_CFLAGS to -w.  I think
> that if the compiler is not GCC we should not set WARN_CFLAGS to
> anything because we don't know what those flags mean to the compiler we
> are using.

I don't think you should totally disable warnings like this.  The
default flags may well be suitable for other compilers, and, users can
control warning flags passed to the compiler by specifying them as
--enable-build-warnings="list_of_options".

I agree that --disable-build-warnings should only pass -w when using
GCC.  Patch to do that preapproved.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]