This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] Compile fix for 64-bit HPUX


On Sun, Mar 26, 2006 at 04:15:25PM +0800, Randolph Chung wrote:
> On 64-bit HPUX, gdb fails to compile with -Werror because of an 
> incorrect iconv() prototype. gdb's configure script checks for this, but 
> because the configure script test is compiled without -Werror even when 
> -Werror is enabled, the test doesn't detect the condition properly. The 
> attached patch forces this test to use the value of WERROR_CFLAGS so 
> that the check uses the same flags that will be used to build gdb.
> 
> tbh I think this is really a hack and we should somehow make all the 
> autoconf test use the -Werror flag when running the compile tests, but 
> it's not obvious to me how I can do this without redoing a lot of the 
> Makefile logic (for example, why do we use a separate WERROR_CFLAGS and 
> not just append the -Werror into CFLAGS?)...

So that we can turn off -Werror without turning off warnings, I
presume.  I thought I'd touched this code recently but I don't see
where...

Don't most autoconf checks fail if they produce a warning, anyway?
Oh, that's got a separate knob: AC_LANG_WERROR.  Maybe that would help
you.  And AC_PROG_CPP_WERROR.  I don't know why no one uses
AC_LANG_WERROR in src yet; maybe there's a good reason.

> +    oldcflags="${CFLAGS-}"

What's ${foo-}?  I don't see it in my bash or dash docs.

-- 
Daniel Jacobowitz
CodeSourcery


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