Fix FTBFS against gcc 4.9
This commit is contained in:
parent
7f79a3de6d
commit
a0088c215a
103
binutils-2.24-set-section-macros.patch
Normal file
103
binutils-2.24-set-section-macros.patch
Normal file
@ -0,0 +1,103 @@
|
||||
diff -rcp ../binutils-2.24.orig/bfd/bfd-in2.h bfd/bfd-in2.h
|
||||
*** ../binutils-2.24.orig/bfd/bfd-in2.h 2014-04-22 12:03:35.226872578 +0100
|
||||
--- bfd/bfd-in2.h 2014-04-22 12:07:51.556393678 +0100
|
||||
*************** typedef struct bfd_section *sec_ptr;
|
||||
*** 294,302 ****
|
||||
|
||||
#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 \
|
||||
--- 294,299 ----
|
||||
*************** struct relax_table {
|
||||
*** 1592,1597 ****
|
||||
--- 1589,1620 ----
|
||||
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 -rcp ../binutils-2.24.orig/bfd/bfd-in.h bfd/bfd-in.h
|
||||
*** ../binutils-2.24.orig/bfd/bfd-in.h 2014-04-22 12:03:35.272868967 +0100
|
||||
--- bfd/bfd-in.h 2014-04-22 12:06:12.850914084 +0100
|
||||
*************** typedef struct bfd_section *sec_ptr;
|
||||
*** 287,295 ****
|
||||
|
||||
#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 \
|
||||
--- 287,292 ----
|
||||
diff -rcp ../binutils-2.24.orig/bfd/section.c bfd/section.c
|
||||
*** ../binutils-2.24.orig/bfd/section.c 2014-04-22 12:03:35.215873442 +0100
|
||||
--- bfd/section.c 2014-04-22 12:06:55.795118059 +0100
|
||||
*************** CODE_FRAGMENT
|
||||
*** 542,547 ****
|
||||
--- 542,573 ----
|
||||
. 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. *}
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: mingw-binutils
|
||||
Version: 2.24
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Cross-compiled version of binutils for Win32 and Win64 environments
|
||||
|
||||
License: GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
|
||||
@ -28,6 +28,10 @@ Provides: bundled(libiberty)
|
||||
# Contributed by Kai Tietz
|
||||
Patch0: bfd_doc.txt
|
||||
|
||||
# Fix GCC 4.9 compatibility
|
||||
Patch1: binutils-2.24-set-section-macros.patch
|
||||
|
||||
|
||||
%description
|
||||
Cross compiled binutils (utilities like 'strip', 'as', 'ld') which
|
||||
understand Windows executables and DLLs.
|
||||
@ -65,6 +69,7 @@ understand Windows executables and DLLs.
|
||||
%prep
|
||||
%setup -q -n binutils-%{version}
|
||||
%patch0 -p0
|
||||
%patch1 -p0
|
||||
|
||||
|
||||
%build
|
||||
@ -251,6 +256,9 @@ rm -rf $RPM_BUILD_ROOT/multilib
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri May 30 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.24-2
|
||||
- Fix FTBFS against gcc 4.9
|
||||
|
||||
* Sat Jan 11 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.24-1
|
||||
- Update to 2.24
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user