Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix compilation of 64-bit gdb 7.7 on Solaris
@ 2014-02-06 16:17 Rainer Orth
  2014-02-06 17:02 ` Pedro Alves
  0 siblings, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2014-02-06 16:17 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

Compiling a 64-bit gdb 7.7 on Solaris (8 to 11) with gcc fails in bfd:

cc1: warnings being treated as errors
/vol/src/gnu/gdb/gdb-7.7/bfd/cache.c: In function 'bfd_cache_max_open':
/vol/src/gnu/gdb/gdb-7.7/bfd/cache.c:85: error: comparison between signed and unsigned integer expressions

This is about

	  && rlim.rlim_cur != RLIM_INFINITY)

where <sys/resource.h> has

typedef unsigned long   rlim_t;
#define RLIM_INFINITY   (-3l)

While I've raised the issue with Oracle, the problem can easily be
avoided by casting RLIM_INFINITY to rlim_t, as the following patch does.

Ok for mainline?

	Rainer


2014-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* cache.c (bfd_cache_max_open): Case RLIM_INFINITY to rlim_t.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bfd-cache.patch --]
[-- Type: text/x-patch, Size: 374 bytes --]

--- bfd/cache.c	2013/12/08 04:55:47	1.1
+++ bfd/cache.c	2014/02/06 16:13:27
@@ -82,7 +82,7 @@ bfd_cache_max_open (void)
 #ifdef HAVE_GETRLIMIT
       struct rlimit rlim;
       if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-	  && rlim.rlim_cur != RLIM_INFINITY)
+	  && rlim.rlim_cur != (rlim_t) RLIM_INFINITY)
 	max = rlim.rlim_cur / 8;
       else
 #endif /* HAVE_GETRLIMIT */

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-06 16:17 Fix compilation of 64-bit gdb 7.7 on Solaris Rainer Orth
@ 2014-02-06 17:02 ` Pedro Alves
  2014-02-07 10:07   ` Rainer Orth
  2014-02-07 14:55   ` Rainer Orth
  0 siblings, 2 replies; 11+ messages in thread
From: Pedro Alves @ 2014-02-06 17:02 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gdb-patches

On 02/06/2014 04:17 PM, Rainer Orth wrote:
> Compiling a 64-bit gdb 7.7 on Solaris (8 to 11) with gcc fails in bfd:
> 
> cc1: warnings being treated as errors
> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c: In function 'bfd_cache_max_open':
> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c:85: error: comparison between signed and unsigned integer expressions

Could you send this to the binutils list please?  If/once it's
accepted in bfd mainline, we can consider backporting it to
the release branch.

Thanks.

-- 
Pedro Alves


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-06 17:02 ` Pedro Alves
@ 2014-02-07 10:07   ` Rainer Orth
  2014-02-07 14:55   ` Rainer Orth
  1 sibling, 0 replies; 11+ messages in thread
From: Rainer Orth @ 2014-02-07 10:07 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

Pedro Alves <palves@redhat.com> writes:

> On 02/06/2014 04:17 PM, Rainer Orth wrote:
>> Compiling a 64-bit gdb 7.7 on Solaris (8 to 11) with gcc fails in bfd:
>> 
>> cc1: warnings being treated as errors
>> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c: In function 'bfd_cache_max_open':
>> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c:85: error: comparison between signed
>> and unsigned integer expressions
>
> Could you send this to the binutils list please?  If/once it's
> accepted in bfd mainline, we can consider backporting it to
> the release branch.

Sure:

        bfd/cache.c doesn't compile with gcc -m64 on Solaris
	https://sourceware.org/ml/binutils/2014-02/msg00052.html

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-06 17:02 ` Pedro Alves
  2014-02-07 10:07   ` Rainer Orth
@ 2014-02-07 14:55   ` Rainer Orth
  2014-02-07 15:29     ` Pedro Alves
  2014-02-07 15:30     ` Joel Brobecker
  1 sibling, 2 replies; 11+ messages in thread
From: Rainer Orth @ 2014-02-07 14:55 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

Pedro Alves <palves@redhat.com> writes:

> On 02/06/2014 04:17 PM, Rainer Orth wrote:
>> Compiling a 64-bit gdb 7.7 on Solaris (8 to 11) with gcc fails in bfd:
>> 
>> cc1: warnings being treated as errors
>> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c: In function 'bfd_cache_max_open':
>> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c:85: error: comparison between signed
>> and unsigned integer expressions
>
> Could you send this to the binutils list please?  If/once it's
> accepted in bfd mainline, we can consider backporting it to
> the release branch.

The patch has now been committed to mainline and the binutils 2.24
branch.  Ok for gdb 7.7 branch now, too?

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-07 14:55   ` Rainer Orth
@ 2014-02-07 15:29     ` Pedro Alves
  2014-02-07 15:30     ` Joel Brobecker
  1 sibling, 0 replies; 11+ messages in thread
From: Pedro Alves @ 2014-02-07 15:29 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gdb-patches

On 02/07/2014 02:55 PM, Rainer Orth wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>> On 02/06/2014 04:17 PM, Rainer Orth wrote:
>>> Compiling a 64-bit gdb 7.7 on Solaris (8 to 11) with gcc fails in bfd:
>>>
>>> cc1: warnings being treated as errors
>>> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c: In function 'bfd_cache_max_open':
>>> /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c:85: error: comparison between signed
>>> and unsigned integer expressions
>>
>> Could you send this to the binutils list please?  If/once it's
>> accepted in bfd mainline, we can consider backporting it to
>> the release branch.
> 
> The patch has now been committed to mainline and the binutils 2.24
> branch.  Ok for gdb 7.7 branch now, too?

Yes, thanks.

-- 
Pedro Alves


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-07 14:55   ` Rainer Orth
  2014-02-07 15:29     ` Pedro Alves
@ 2014-02-07 15:30     ` Joel Brobecker
  2014-02-07 15:48       ` Rainer Orth
  1 sibling, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2014-02-07 15:30 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Pedro Alves, gdb-patches

> The patch has now been committed to mainline and the binutils 2.24
> branch.  Ok for gdb 7.7 branch now, too?

Yep, with one request:

All patches going to the branch following the first release now
need to be documented in the Wiki. Examples from the previous
release (See "Fixes in GDB 7.6.1"):

    https://sourceware.org/gdb/wiki/GDB_7.6_Release

I apologize in advance for the extra work, but this means creating
a PR for it, and then updating the release wiki by adding a reference
to this fix. I will prepare the wiki page by adding a section for 7.7.1
where you'll be able to document your fix.

Thank you. And sorry again for the extra work. It just saves me a ton
of time when producing corrective releases.

-- 
Joel


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-07 15:30     ` Joel Brobecker
@ 2014-02-07 15:48       ` Rainer Orth
  2014-02-07 17:19         ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2014-02-07 15:48 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Pedro Alves, gdb-patches

Hi Joel,

>> The patch has now been committed to mainline and the binutils 2.24
>> branch.  Ok for gdb 7.7 branch now, too?
>
> Yep, with one request:
>
> All patches going to the branch following the first release now
> need to be documented in the Wiki. Examples from the previous
> release (See "Fixes in GDB 7.6.1"):
>
>     https://sourceware.org/gdb/wiki/GDB_7.6_Release

no problem: can I just create a wiki account for myself, or need I be
added to some writers list?  I remember at least the gcc wiki has added
some precautions after recent spam incidents.

> I apologize in advance for the extra work, but this means creating
> a PR for it, and then updating the release wiki by adding a reference

More questions here: this is actually a bfd issue, but neither binutils
nor gdb has a component for that.  I could file it under gdb/build,
though.  Btw., bugzilla currently lacks the gdb 7.7 version.  Could you
please add that, too?

And should I add the PR reference to the ChangeLog entry?  It's not in
the mainline and binutils 2.24 checkins, obviously.

> to this fix. I will prepare the wiki page by adding a section for 7.7.1
> where you'll be able to document your fix.

Ok.  Please let me know once the page is there.  I'll wait with the
commit until then.

> Thank you. And sorry again for the extra work. It just saves me a ton
> of time when producing corrective releases.

It's obviously easier have the committers do the work rather than the RM
reconstruct what they did :-)

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-07 15:48       ` Rainer Orth
@ 2014-02-07 17:19         ` Joel Brobecker
  2014-02-07 20:44           ` Tom Tromey
  2014-02-10 15:47           ` Rainer Orth
  0 siblings, 2 replies; 11+ messages in thread
From: Joel Brobecker @ 2014-02-07 17:19 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Pedro Alves, gdb-patches

> no problem: can I just create a wiki account for myself, or need I be
> added to some writers list?  I remember at least the gcc wiki has added
> some precautions after recent spam incidents.

Thanks!

I'd like us to have ACLs as well for the GDB wiki, but I haven't had
time to work on that, yet. So you should be able to edit as soon as
you have an account.

> More questions here: this is actually a bfd issue, but neither binutils
> nor gdb has a component for that.  I could file it under gdb/build,
> though.  Btw., bugzilla currently lacks the gdb 7.7 version.  Could you
> please add that, too?

Sure, gdb/build sounds fine to me.

Regarding gdb-7.7, I'll have to ask Tom. In the meantime, can you
set the field to "HEAD"? I'll change it once the new version is added.

> And should I add the PR reference to the ChangeLog entry?  It's not in
> the mainline and binutils 2.24 checkins, obviously.

If you don't mind. I don't know whether they'll want it for binutils
2.24. For master, if you don't mind updating the ChangeLog (no need
to send a patch), that'd be great.

> > to this fix. I will prepare the wiki page by adding a section for 7.7.1
> > where you'll be able to document your fix.
> 
> Ok.  Please let me know once the page is there.  I'll wait with the
> commit until then.

It's done :).

Thanks again,
-- 
Joel


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-07 17:19         ` Joel Brobecker
@ 2014-02-07 20:44           ` Tom Tromey
  2014-02-10 15:47           ` Rainer Orth
  1 sibling, 0 replies; 11+ messages in thread
From: Tom Tromey @ 2014-02-07 20:44 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Rainer Orth, Pedro Alves, gdb-patches

Joel> Regarding gdb-7.7, I'll have to ask Tom. In the meantime, can you
Joel> set the field to "HEAD"? I'll change it once the new version is added.

I added 7.7 to bugzilla.

Tom


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-07 17:19         ` Joel Brobecker
  2014-02-07 20:44           ` Tom Tromey
@ 2014-02-10 15:47           ` Rainer Orth
  2014-02-11  2:20             ` Joel Brobecker
  1 sibling, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2014-02-10 15:47 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Pedro Alves, gdb-patches

Hi Joel,

> I'd like us to have ACLs as well for the GDB wiki, but I haven't had
> time to work on that, yet. So you should be able to edit as soon as
> you have an account.

right, worked just fine.

>> More questions here: this is actually a bfd issue, but neither binutils
>> nor gdb has a component for that.  I could file it under gdb/build,
>> though.  Btw., bugzilla currently lacks the gdb 7.7 version.  Could you
>> please add that, too?
>
> Sure, gdb/build sounds fine to me.
>
> Regarding gdb-7.7, I'll have to ask Tom. In the meantime, can you
> set the field to "HEAD"? I'll change it once the new version is added.

Since I could file the PR only today, I could use the new 7.7 version.

>> And should I add the PR reference to the ChangeLog entry?  It's not in
>> the mainline and binutils 2.24 checkins, obviously.
>
> If you don't mind. I don't know whether they'll want it for binutils
> 2.24. For master, if you don't mind updating the ChangeLog (no need
> to send a patch), that'd be great.

I've done it for mainline, not yet for the binutils 2.24 branch.

>> > to this fix. I will prepare the wiki page by adding a section for 7.7.1
>> > where you'll be able to document your fix.
>> 
>> Ok.  Please let me know once the page is there.  I'll wait with the
>> commit until then.
>
> It's done :).

I've now filed the PR (build/16550), applied the patch to the gdb 7.7
branch and updated the mainline ChangeLog with the PR reference.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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

* Re: Fix compilation of 64-bit gdb 7.7 on Solaris
  2014-02-10 15:47           ` Rainer Orth
@ 2014-02-11  2:20             ` Joel Brobecker
  0 siblings, 0 replies; 11+ messages in thread
From: Joel Brobecker @ 2014-02-11  2:20 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Pedro Alves, gdb-patches

> I've now filed the PR (build/16550), applied the patch to the gdb 7.7
> branch and updated the mainline ChangeLog with the PR reference.

All perfect. Thanks a million!

-- 
Joel


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

end of thread, other threads:[~2014-02-11  2:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06 16:17 Fix compilation of 64-bit gdb 7.7 on Solaris Rainer Orth
2014-02-06 17:02 ` Pedro Alves
2014-02-07 10:07   ` Rainer Orth
2014-02-07 14:55   ` Rainer Orth
2014-02-07 15:29     ` Pedro Alves
2014-02-07 15:30     ` Joel Brobecker
2014-02-07 15:48       ` Rainer Orth
2014-02-07 17:19         ` Joel Brobecker
2014-02-07 20:44           ` Tom Tromey
2014-02-10 15:47           ` Rainer Orth
2014-02-11  2:20             ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox