Bug 224026

Summary: [patch] devel/binutils fix gold on ZFS after r325320
Product: Ports & Packages Reporter: Vladimir Kondratyev <wulf>
Component: Individual Port(s)Assignee: Baptiste Daroussin <bapt>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: emaste
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (bapt)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-gold__output.cc
none
patch-gold__output.cc none

Description Vladimir Kondratyev freebsd_committer freebsd_triage 2017-12-01 22:11:23 UTC
Created attachment 188456 [details]
patch-gold__output.cc

r325320 disabled posix_fallocate(2) for ZFS. Unfortunatelly, ld.gold does not handle EINVAL returned in this case properly and fails to link.
Fix it with falling back to ftruncate(2) if posix_fallocate(2) returned EINVAL being supplied with correct offset and len parameters.

Discovered while building www/qt5-webkit in dirty desktop environment.
Comment 1 Vladimir Kondratyev freebsd_committer freebsd_triage 2017-12-02 11:05:19 UTC
Upstream bug report:

https://sourceware.org/bugzilla/show_bug.cgi?id=22540
Comment 2 Vladimir Kondratyev freebsd_committer freebsd_triage 2017-12-02 20:08:46 UTC
Created attachment 188474 [details]
patch-gold__output.cc

Patch has been committed to upstream master branch in modified form[1]. Attached patch is updated to reflect upstream version.

[1]. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=222b39c283e3fd7823ad95ccc58ae94e76b63237
Comment 3 Ed Maste freebsd_committer freebsd_triage 2017-12-18 14:10:23 UTC
lgtm
Comment 4 Vladimir Kondratyev freebsd_committer freebsd_triage 2018-02-19 00:40:12 UTC
Update to binutils-2.30 fixed the problem