Summary: | devel/binutils: Binutils needs to install include/ansidecl.h | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Yuri Victorovich <yuri> | ||||||
Component: | Individual Port(s) | Assignee: | Cy Schubert <cy> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | joerg, yuri | ||||||
Priority: | --- | Flags: | cy:
maintainer-feedback?
cy: merge-quarterly? |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Bug Depends on: | 269885 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Yuri Victorovich
![]() ![]() It looks like these 2 lines should be removed: ${RM} ${STAGEDIR}${PREFIX}/include/ansidecl.h ${REINPLACE_CMD} '/#include "ansidecl.h"/d' ${STAGEDIR}${PREFIX}/include/bfd.h (In reply to Yuri Victorovich from comment #1) It was removed in r336642 (b9c90aa46af1067eabd22c7d490335a4496964e0) to: commit b9c90aa46af1067eabd22c7d490335a4496964e0 Author: Niclas Zeising <zeising@FreeBSD.org> AuthorDate: Mon Dec 16 14:52:26 2013 +0000 Commit: Niclas Zeising <zeising@FreeBSD.org> CommitDate: Mon Dec 16 14:52:26 2013 +0000 Update to 2.24 Do not install libiberty.a to aviod conflicts with devel/gnulibiberty [0] Do not install include/ansidecl.h, to avoid conflicts with gcc49 [1] Fix gold usage when linking c++ code, related to ctors [2] Thanks to dim for help with getting gold to build with libc++! PR: ports/176406 [0], ports/184327 [1] Submitted by: Craig Leres <leres@ee.lbl.gov> [0] Gerald Pfeifer <gerald@pfeifer.com> [1] Requested by: rdivacky [2] Notes: svn path=/head/; revision=336642 gcc49 isn't a thing anymore but devel/libbfd is. I think we need to update libbfd and you will need to install it instead. (Added joerg@ to cc.) I will submit an update PR for libbfd instead of changing binutils. Your port will need to depend on devel/libbfd. (In reply to Cy Schubert from comment #3) But why does it install a broken include/bfd.h and include/bfdlink.h? When ENUM_BITFIELD isn't defined this header can't be used. Same for lib/libbfd.a - it is useless without include/bfd.h $ grep -r ENUM_BITFIELD /usr/local/include/ 2>/dev/null /usr/local/include/bfdlink.h: ENUM_BITFIELD (bfd_link_hash_type) type : 8; /usr/local/include/bfdlink.h: ENUM_BITFIELD (output_type) type : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (bfd_link_strip) strip : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (bfd_link_discard) discard : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (bfd_link_elf_stt_common) elf_stt_common : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (bfd_link_common_skip_ar_symbols) common_skip_ar_symbols : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (report_method) unresolved_syms_in_objects : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (report_method) unresolved_syms_in_shared_libs : 2; /usr/local/include/bfdlink.h: ENUM_BITFIELD (textrel_check_method) textrel_check: 2; /usr/local/include/bfd.h: ENUM_BITFIELD (complain_overflow) complain_on_overflow:2; /usr/local/include/bfd.h: ENUM_BITFIELD (bfd_format) format : 3; /usr/local/include/bfd.h: ENUM_BITFIELD (bfd_direction) direction : 2; /usr/local/include/bfd.h: ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2; Created attachment 240626 [details]
fix-bfd.h.patch
The attached patch makes include/bfd.h functional again.
In 2014 in include/ansidecl.h was removed to prevent conflicts with gcc.
Back then it also broke include/bfd.h
Now there is no conflict with gcc any more.
The attached patch restores include/bfd.h and adds back include/ansidecl.h
(In reply to Yuri Victorovich from comment #5) What about the conflict with libbfd this patch creates? How are users with both ports installed supposed to navigate this? (In reply to Cy Schubert from comment #6) The conflict already exists now because both install include/bfd.h Approved to commit. Remember to MFH. Created attachment 240677 [details]
Proposed patch with commit log message.
I haven't been able to ascertain why the file was removed. This the reason why commit log messages must document, why.
I will test on the all the flavors supported by the port. Wondering whether the file caused problems with one of the flavors (or flavors equivalents at the time).
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=844981cb54e8d2ba2c77022e014c52f3c6ff47e9 commit 844981cb54e8d2ba2c77022e014c52f3c6ff47e9 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-03-08 20:02:56 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-03-09 16:20:21 +0000 devel/binutils: Bring back ansidecl.h A missing ansidecl.h is causing some ports build failures because of and unknown ENUM_BITFIELD. This commit brings it back. Previous commits which removed ansidecl.h, 8b115343ad84e and 95c499bbd7f34, failed to say why the file was removed. We can only guess the reason, to solve an undocumented problem at the time. PR: 269878 Submitted by: yuri Reported by: yuri MFH: 2023Q1 devel/binutils/Makefile | 3 +-- devel/binutils/pkg-plist | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) *** Bug 260914 has been marked as a duplicate of this bug. *** Fixed. |