Bug 228613

Summary: lang/nbc: build fails with lld as the system linker
Product: Ports & Packages Reporter: Ed Maste <emaste>
Component: Individual Port(s)Assignee: Rene Ladan <rene>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (rene)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228639
Bug Depends on:    
Bug Blocks: 214864    

Description Ed Maste freebsd_committer freebsd_triage 2018-05-30 18:09:33 UTC
From http://package18.nyi.freebsd.org/data/headamd64PR214864cxx98-default/2018-05-29_20h14m12s/logs/errors/nbc-1.2.1.r4_11.log

Linking nbc
/usr/bin/ld: error: NBCCommonData.o: invalid alignment of section headers

Sure enough NBCCommonData.o has misaligned section headers:

% readelf -S ./work/NXT/NBCCommonData.o
There are 8 section headers, starting at offset 0x2cf03:

The port can probably just have LLD_UNSAFE added to its Makefile, but fixing the root cause would be better.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-06-17 16:15:37 UTC
A commit references this bug:

Author: rene
Date: Sun Jun 17 16:15:33 UTC 2018
New revision: 472610
URL: https://svnweb.freebsd.org/changeset/ports/472610

Log:
  lang/nbc: fix build with lld by setting LLD_UNSAFE [1]

  While here, set the license (MPL11) and bump PORTREVISION

  PR:		228613 [1]
  Submitted by:	emaste [1]

Changes:
  head/lang/nbc/Makefile
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2018-06-17 16:16:33 UTC
There seems to be no magical fpc knob for setting the alignment, so use LLD_UNSAFE for now.