From owner-freebsd-ports-bugs@freebsd.org Sat Sep 9 17:57:08 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65D10E242CA for ; Sat, 9 Sep 2017 17:57:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 537E371829 for ; Sat, 9 Sep 2017 17:57:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v89Hv7qS057254 for ; Sat, 9 Sep 2017 17:57:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 222172] lang/fpc: invokes linker directly and does not honour LD env variable override Date: Sat, 09 Sep 2017 17:57:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: acm@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc blocked flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 17:57:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222172 Bug ID: 222172 Summary: lang/fpc: invokes linker directly and does not honour LD env variable override Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: acm@FreeBSD.org Reporter: emaste@freebsd.org CC: krion@FreeBSD.org Blocks: 214864 Assignee: acm@FreeBSD.org Flags: maintainer-feedback?(acm@FreeBSD.org) I've been investigating building the ports tree with LLVM's lld installed as /usr/bin/ld (via the exp-run in PR 214864). As of today lang/fpc fails when linked with lld, and of those failing it is responsible for the largest num= ber of skipped ports (110). When linking with lld (with LD=3Dld.bfd in the environment) the build failed with: /usr/bin/ld: error: x86_64/units/x86_64-freebsd/i_linux.o: invalid alignmen= t of section headers pp.pas(247,1) Error: Error while linking pp.pas(247,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted I think this may be coming from fpc-3.0.2/compiler/systems/t_bsd.pas from ExeCmd and DllCmd like so: 149 ExeCmd[1]:=3D'ld $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $CATRES'; 150 DllCmd[1]:=3D'ld $TARGET $EMUL $OPT -shared -L. -o $EXE $CATRES' I'll try to have an attempt at a patch. Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214864 [Bug 214864] [exp-run] test build with lld as /usr/bin/ld --=20 You are receiving this mail because: You are the assignee for the bug.=