bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binutils build broken at FreeBSD 5.3 after -Werror enabling


From: Nick Clifton
Subject: Re: Binutils build broken at FreeBSD 5.3 after -Werror enabling
Date: Thu, 31 Mar 2005 15:44:43 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Hi Vladimir,

addr2line.c compile with addition patch

Great - in which case I have checked both patches in together with this ChangeLog entry:

binutils/ChangeLog
2005-03-31  Nick Clifton  <address@hidden>

        * configure.in: Add a check for <unistd.h> providing a prototype
        for getopt() which is compatible with the one in
        include/getopt.h.  If so then define HAVE_DECL_GETOPT.
        * configure: Regenerate.
        * config.in (HAVE_DECL_GETOPT): Add.
        * aclocal.m4: Regenerate.
        * addr2line.c: Include "config.h" before "bfd.h" so that
        HAVE_DECL_GETOPT is defined before getopt.h is included.


But terminated at:

In file included from /usr/home/wanderer/pkg/build/binutils/src/src/gas/as.h:93, from /usr/home/wanderer/pkg/build/binutils/src/src/gas/app.c:30: /usr/home/wanderer/pkg/build/binutils/src/src/gas/../include/getopt.h:116: warning: function declaration isn't a prototype

OK - please try the attached patch for the GAS build problems. (It is basically the same as the one for binutils). If that works I can send you one for LD as well.

Cheers
  Nick


Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.174
diff -c -3 -p -r1.174 configure.in
*** gas/configure.in    30 Mar 2005 02:55:13 -0000      1.174
--- gas/configure.in    31 Mar 2005 14:43:54 -0000
*************** GAS_CHECK_DECL_NEEDED(errno, f, int f, [
*** 716,721 ****
--- 716,731 ----
  #endif
  ])
  
+ AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+ AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h,
+ [AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, 
const char *);],
+ gas_cv_decl_getopt_unistd_h=yes, gas_cv_decl_getopt_unistd_h=no)])
+ AC_MSG_RESULT($gas_cv_decl_getopt_unistd_h)
+ if test $gas_cv_decl_getopt_unistd_h = yes; then
+   AC_DEFINE([HAVE_DECL_GETOPT], 1,
+           [Is the prototype for getopt in <unistd.h> in the expected format?])
+ fi
+ 
  GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
  GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers)
  GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
Index: gas/config.in
===================================================================
RCS file: /cvs/src/src/gas/config.in,v
retrieving revision 1.21
diff -c -3 -p -r1.21 config.in
*** gas/config.in       30 Mar 2005 02:55:12 -0000      1.21
--- gas/config.in       31 Mar 2005 14:43:54 -0000
***************
*** 318,320 ****
--- 318,323 ----
  
  /* Define to `unsigned' if <sys/types.h> does not define. */
  #undef size_t
+ 
+ /* Is the prototype for getopt in <unistd.h> in the expected format?  */
+ #undef HAVE_DECL_GETOPT

reply via email to

[Prev in Thread] Current Thread [Next in Thread]