public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: * Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-6.fc21
Date: Sat, 27 Jun 2026 23:56:30 GMT [thread overview]
Message-ID: <178260459014.1.6099051455309430129.rpms-gdb-da639865c138@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : da639865c1388e15e7fbf12e0725ad455d803be8
Author : Sergio Durigan Junior <sergiodj@redhat.com>
Date : 2014-04-24T19:23:17-03:00
Stats : +187/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/da639865c1388e15e7fbf12e0725ad455d803be8?branch=gdb-17.2-rebase-f44
Log:
* Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-6.fc21
- Fix build failures for GCC 4.9 (Nick Clifton).
---
diff --git a/gcc-4.9-compat.patch b/gcc-4.9-compat.patch
new file mode 100644
index 0000000..815c7f8
--- /dev/null
+++ b/gcc-4.9-compat.patch
@@ -0,0 +1,179 @@
+This patch fixes the build failures found when building with GCC 4.9.
+
+ commit 27b829ee701e29804216b3803fbaeb629be27491
+ Author: Nick Clifton <nickc@redhat.com>
+ Date: Wed Jan 29 13:46:39 2014 +0000
+
+ Following up on Tom's suggestion I am checking in a patch to replace the various
+ bfd_xxx_set macros with static inline functions, so that we can avoid compile time
+ warnings about comma expressions with unused values.
+
+ * bfd-in.h (bfd_set_section_vma): Delete.
+ (bfd_set_section_alignment): Delete.
+ (bfd_set_section_userdata): Delete.
+ (bfd_set_cacheable): Delete.
+ * bfd.c (bfd_set_cacheable): New static inline function.
+ * section.c (bfd_set_section_userdata): Likewise.
+ (bfd_set_section_vma): Likewise.
+ (bfd_set_section_alignment): Likewise.
+ * bfd-in2.h: Regenerate.
+
+Index: gdb-7.7/bfd/bfd-in.h
+===================================================================
+--- gdb-7.7.orig/bfd/bfd-in.h
++++ gdb-7.7/bfd/bfd-in.h
+@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr;
+
+ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
+-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
+-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
+-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+ /* Find the address one past the end of SEC. */
+ #define bfd_get_section_limit(bfd, sec) \
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+@@ -517,8 +514,6 @@ extern void warn_deprecated (const char
+
+ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
+
+-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
+-
+ extern bfd_boolean bfd_cache_close
+ (bfd *abfd);
+ /* NB: This declaration should match the autogenerated one in libbfd.h. */
+Index: gdb-7.7/bfd/bfd-in2.h
+===================================================================
+--- gdb-7.7.orig/bfd/bfd-in2.h
++++ gdb-7.7/bfd/bfd-in2.h
+@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
+
+ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
+-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
+-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
+-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+ /* Find the address one past the end of SEC. */
+ #define bfd_get_section_limit(bfd, sec) \
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+@@ -524,8 +521,6 @@ extern void warn_deprecated (const char
+
+ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
+
+-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
+-
+ extern bfd_boolean bfd_cache_close
+ (bfd *abfd);
+ /* NB: This declaration should match the autogenerated one in libbfd.h. */
+@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, co
+
+ bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
+
+-bfd *bfd_openstreamr (const char *, const char *, void *);
++bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
+
+ bfd *bfd_openr_iovec (const char *filename, const char *target,
+ void *(*open_func) (struct bfd *nbfd,
+@@ -1596,6 +1591,32 @@ struct relax_table {
+ int size;
+ };
+
++/* Note: the following are provided as inline functions rather than macros
++ because not all callers use the return value. A macro implementation
++ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
++ compilers will complain about comma expressions that have no effect. */
++static inline bfd_boolean
++bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
++{
++ ptr->userdata = val;
++ return TRUE;
++}
++
++static inline bfd_boolean
++bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
++{
++ ptr->vma = ptr->lma = val;
++ ptr->user_set_vma = TRUE;
++ return TRUE;
++}
++
++static inline bfd_boolean
++bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
++{
++ ptr->alignment_power = val;
++ return TRUE;
++}
++
+ /* These sections are global, and are managed by BFD. The application
+ and target back end are not permitted to change the values in
+ these sections. */
+@@ -6415,6 +6436,14 @@ struct bfd
+ unsigned int selective_search : 1;
+ };
+
++/* See note beside bfd_set_section_userdata. */
++static inline bfd_boolean
++bfd_set_cacheable (bfd * abfd, bfd_boolean val)
++{
++ abfd->cacheable = val;
++ return TRUE;
++}
++
+ typedef enum bfd_error
+ {
+ bfd_error_no_error = 0,
+Index: gdb-7.7/bfd/bfd.c
+===================================================================
+--- gdb-7.7.orig/bfd/bfd.c
++++ gdb-7.7/bfd/bfd.c
+@@ -311,6 +311,14 @@ CODE_FRAGMENT
+ . unsigned int selective_search : 1;
+ .};
+ .
++.{* See note beside bfd_set_section_userdata. *}
++.static inline bfd_boolean
++.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
++.{
++. abfd->cacheable = val;
++. return TRUE;
++.}
++.
+ */
+
+ #include "sysdep.h"
+Index: gdb-7.7/bfd/section.c
+===================================================================
+--- gdb-7.7.orig/bfd/section.c
++++ gdb-7.7/bfd/section.c
+@@ -542,6 +542,32 @@ CODE_FRAGMENT
+ . int size;
+ .};
+ .
++.{* Note: the following are provided as inline functions rather than macros
++. because not all callers use the return value. A macro implementation
++. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
++. compilers will complain about comma expressions that have no effect. *}
++.static inline bfd_boolean
++.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
++.{
++. ptr->userdata = val;
++. return TRUE;
++.}
++.
++.static inline bfd_boolean
++.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
++.{
++. ptr->vma = ptr->lma = val;
++. ptr->user_set_vma = TRUE;
++. return TRUE;
++.}
++.
++.static inline bfd_boolean
++.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
++.{
++. ptr->alignment_power = val;
++. return TRUE;
++.}
++.
+ .{* These sections are global, and are managed by BFD. The application
+ . and target back end are not permitted to change the values in
+ . these sections. *}
diff --git a/gdb.spec b/gdb.spec
index ce83845..850144f 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -39,7 +39,7 @@ Version: 7.7
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@@ -541,6 +541,9 @@ Patch850: gdb-gnat-dwarf-crash-1of3.patch
Patch851: gdb-gnat-dwarf-crash-2of3.patch
Patch852: gdb-gnat-dwarf-crash-3of3.patch
+# Fix build failures for GCC 4.9 (Nick Clifton).
+Patch864: gcc-4.9-compat.patch
+
%if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch
@@ -841,6 +844,7 @@ find -name "*.info*"|xargs rm -f
%patch851 -p1
%patch852 -p1
%patch863 -p1
+%patch864 -p1
%patch848 -p1
%if 0%{!?el6:1}
@@ -1372,6 +1376,9 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog
+* Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-6.fc21
+- Fix build failures for GCC 4.9 (Nick Clifton).
+
* Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-5.fc21
- Fix 'gdb gives highly misleading error when debuginfo pkg is present,
but not corresponding binary pkg' (RH BZ 981154).
reply other threads:[~2026-06-27 23:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178260459014.1.6099051455309430129.rpms-gdb-da639865c138@fedoraproject.org \
--to=sergiodj@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox