public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Bug for darwin + windows
@ 2010-12-09 23:10 NightStrike
  2010-12-10  0:02 ` Alan Modra
  0 siblings, 1 reply; 8+ messages in thread
From: NightStrike @ 2010-12-09 23:10 UTC (permalink / raw)
  To: binutils

Compiling on a darwin machine as host with any windows platform as
target fails here:

gcc -DHAVE_CONFIG_H -I. -I../../../../build/binutils/src/ld  -I.
-I../../../../build/binutils/src/ld -I../bfd
-I../../../../build/binutils/src/ld/../bfd
-I../../../../build/binutils/src/ld/../include -I./../intl  -g -O2
-DENABLE_PLUGINS
-DLOCALEDIR="\"/Users/nightstrike/buildbot/mw64/darwin-x86-x86/build/build/root/share/locale\""
 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g
-O2 -MT ldlang.o -MD -MP -MF .deps/ldlang.Tpo -c -o ldlang.o
../../../../build/binutils/src/ld/ldlang.c
cc1: warnings being treated as errors
In file included from ../../../../build/binutils/src/ld/ldlang.c:43:
../../../../build/binutils/src/ld/../bfd/libbfd.h:2278: warning:
declaration of 'link_info' shadows a global declaration
../../../../build/binutils/src/ld/ldmain.h:42: warning: shadowed
declaration is here


Help?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-09 23:10 Bug for darwin + windows NightStrike
@ 2010-12-10  0:02 ` Alan Modra
  2010-12-10  1:50   ` NightStrike
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Modra @ 2010-12-10  0:02 UTC (permalink / raw)
  To: NightStrike; +Cc: binutils

On Thu, Dec 09, 2010 at 06:10:37PM -0500, NightStrike wrote:
> cc1: warnings being treated as errors

configure with --disable-werror

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-10  0:02 ` Alan Modra
@ 2010-12-10  1:50   ` NightStrike
  2010-12-10  4:01     ` Alan Modra
  0 siblings, 1 reply; 8+ messages in thread
From: NightStrike @ 2010-12-10  1:50 UTC (permalink / raw)
  To: NightStrike, binutils

On Thu, Dec 9, 2010 at 7:02 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Dec 09, 2010 at 06:10:37PM -0500, NightStrike wrote:
>> cc1: warnings being treated as errors
>
> configure with --disable-werror

Can't we just fix the warnings?  That doesn't seem like the "right" solution....

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-10  1:50   ` NightStrike
@ 2010-12-10  4:01     ` Alan Modra
  2010-12-10 20:08       ` NightStrike
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Modra @ 2010-12-10  4:01 UTC (permalink / raw)
  To: NightStrike; +Cc: binutils

On Thu, Dec 09, 2010 at 08:49:59PM -0500, NightStrike wrote:
> On Thu, Dec 9, 2010 at 7:02 PM, Alan Modra <amodra@gmail.com> wrote:
> > On Thu, Dec 09, 2010 at 06:10:37PM -0500, NightStrike wrote:
> >> cc1: warnings being treated as errors
> >
> > configure with --disable-werror
> 
> Can't we just fix the warnings?  That doesn't seem like the "right" solution....

I think you have a crazy version of gcc.  Fix it.  The prototype gcc
is warning about comes from

/*
INTERNAL_FUNCTION
	bfd_generic_get_relocated_section_contents

SYNOPSIS
	bfd_byte *bfd_generic_get_relocated_section_contents
	  (bfd *abfd,
	   struct bfd_link_info *link_info,
	   struct bfd_link_order *link_order,
	   bfd_byte *data,
	   bfd_boolean relocatable,
	   asymbol **symbols);

DESCRIPTION
	Provides default handling of relocation effort for back ends
	which can't be bothered to do it efficiently.

*/

If we strip parameter names here we lose some documentation.  I've
done that in the past and received complaints.  Renaming parameters is
a never-ending exercise.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-10  4:01     ` Alan Modra
@ 2010-12-10 20:08       ` NightStrike
  2010-12-12  3:38         ` Alan Modra
  2010-12-12  7:51         ` Dave Korn
  0 siblings, 2 replies; 8+ messages in thread
From: NightStrike @ 2010-12-10 20:08 UTC (permalink / raw)
  To: NightStrike, binutils

On Thu, Dec 9, 2010 at 11:01 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Dec 09, 2010 at 08:49:59PM -0500, NightStrike wrote:
>> On Thu, Dec 9, 2010 at 7:02 PM, Alan Modra <amodra@gmail.com> wrote:
>> > On Thu, Dec 09, 2010 at 06:10:37PM -0500, NightStrike wrote:
>> >> cc1: warnings being treated as errors
>> >
>> > configure with --disable-werror
>>
>> Can't we just fix the warnings?  That doesn't seem like the "right" solution....
>
> I think you have a crazy version of gcc.  Fix it.  The prototype gcc
> is warning about comes from

I don't understand what that is supposed to mean.

The shadowed variable is within binutils... from ldmain.h to libbfd.h.
 You are refusing to address that within your own product?

> /*
> INTERNAL_FUNCTION
>        bfd_generic_get_relocated_section_contents
>
> SYNOPSIS
>        bfd_byte *bfd_generic_get_relocated_section_contents
>          (bfd *abfd,
>           struct bfd_link_info *link_info,
>           struct bfd_link_order *link_order,
>           bfd_byte *data,
>           bfd_boolean relocatable,
>           asymbol **symbols);
>
> DESCRIPTION
>        Provides default handling of relocation effort for back ends
>        which can't be bothered to do it efficiently.
>
> */
>
> If we strip parameter names here we lose some documentation.  I've
> done that in the past and received complaints.  Renaming parameters is
> a never-ending exercise.
>
> --
> Alan Modra
> Australia Development Lab, IBM
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-10 20:08       ` NightStrike
@ 2010-12-12  3:38         ` Alan Modra
  2010-12-12  7:51         ` Dave Korn
  1 sibling, 0 replies; 8+ messages in thread
From: Alan Modra @ 2010-12-12  3:38 UTC (permalink / raw)
  To: NightStrike; +Cc: binutils

On Fri, Dec 10, 2010 at 03:07:49PM -0500, NightStrike wrote:
> The shadowed variable is within binutils... from ldmain.h to libbfd.h.
>  You are refusing to address that within your own product?

Exactly.  A warning about a shadow with scope of a prototype parameter
list is totally useless.  Upgrade (or even downgrade) your gcc.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-10 20:08       ` NightStrike
  2010-12-12  3:38         ` Alan Modra
@ 2010-12-12  7:51         ` Dave Korn
  2010-12-12 15:30           ` NightStrike
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Korn @ 2010-12-12  7:51 UTC (permalink / raw)
  To: NightStrike; +Cc: binutils

On 10/12/2010 20:07, NightStrike wrote:

> The shadowed variable is within binutils... from ldmain.h to libbfd.h.
>  You are refusing to address that within your own product?


  The shadowed variable is within ld.  It is not in scope of bfd.  During the
compilation of the actual function in bfd/reloc.c, there is no global
link_info in scope anywhere.  During the compilation of ld, when there is a
global link_info, the formal parameters of the function within bfd are not in
scope anywhere (well, except between the brackets in the function prototype;
the point is that the body of that function is never in scope during the
compilation of ld, because it's in an external static library, libbfd.)  There
is no possible way there can be any clash, so GCC is nuts to complain.

  This is GCC PR529(*), btw!  You're using some version of gcc-3, right?

    cheers,
      DaveK
-- 
(*) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=529

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Bug for darwin + windows
  2010-12-12  7:51         ` Dave Korn
@ 2010-12-12 15:30           ` NightStrike
  0 siblings, 0 replies; 8+ messages in thread
From: NightStrike @ 2010-12-12 15:30 UTC (permalink / raw)
  To: Dave Korn; +Cc: binutils

On 12/12/10, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 10/12/2010 20:07, NightStrike wrote:
>
>> The shadowed variable is within binutils... from ldmain.h to libbfd.h.
>>  You are refusing to address that within your own product?
>
>
>   The shadowed variable is within ld.  It is not in scope of bfd.  During
> the
> compilation of the actual function in bfd/reloc.c, there is no global
> link_info in scope anywhere.  During the compilation of ld, when there is a
> global link_info, the formal parameters of the function within bfd are not
> in
> scope anywhere (well, except between the brackets in the function prototype;
> the point is that the body of that function is never in scope during the
> compilation of ld, because it's in an external static library, libbfd.)
> There
> is no possible way there can be any clash, so GCC is nuts to complain.
>
>   This is GCC PR529(*), btw!  You're using some version of gcc-3, right?
>
>     cheers,
>       DaveK
> --
> (*) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=529
>

Thanks for the detailed explanation, Dave.  That makes a lot more sense now.

The GCC version is that which comes with darwin (leopard).

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-12 14:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-09 23:10 Bug for darwin + windows NightStrike
2010-12-10  0:02 ` Alan Modra
2010-12-10  1:50   ` NightStrike
2010-12-10  4:01     ` Alan Modra
2010-12-10 20:08       ` NightStrike
2010-12-12  3:38         ` Alan Modra
2010-12-12  7:51         ` Dave Korn
2010-12-12 15:30           ` NightStrike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).