From owner-freebsd-ports-bugs@freebsd.org Thu Aug 24 21:36:33 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 10FA9DE895F for ; Thu, 24 Aug 2017 21:36:33 +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 F2AD166E17 for ; Thu, 24 Aug 2017 21:36:32 +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 v7OLaW9s077053 for ; Thu, 24 Aug 2017 21:36:32 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 221778] devel/libcfg: port passes flags from ${LDFLAGS} to the compiler driver and directly to ${LD} (invalid) Date: Thu, 24 Aug 2017 21:36:32 +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: rodrigo@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 blocked flagtypes.name attachments.created 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: Thu, 24 Aug 2017 21:36:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221778 Bug ID: 221778 Summary: devel/libcfg: port passes flags from ${LDFLAGS} to the compiler driver and directly to ${LD} (invalid) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: rodrigo@FreeBSD.org Reporter: emaste@freebsd.org Blocks: 214864 Flags: maintainer-feedback?(rodrigo@FreeBSD.org) Assignee: rodrigo@FreeBSD.org Created attachment 185730 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D185730&action= =3Dedit disable lld for devel/libcfg In general ${LDFLAGS} contains flags for the compiler driver and should be passed to the compiler driver, not directly to the linker. libcfg tries to use it both ways, which is invalid -- in Rules.mk.in $(LIBDYNAMICV): $(OBJECTS) $(LD) $(LDFLAGS) -shared -o $@ $(OBJECTS) .. CCLD =3D $(CC) LINK =3D $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ Found while trying to link with lld as /usr/bin/ld, because lld interpreted -fstack-protector as an invalid argument: =3D=3D=3D> Building for libcfg-0.6.2_3 ... ar: warning: creating libcfg+.a ld: error: unknown argument: -fstack-protector ... Even though this appears to work with GNU ld (ld.bfd) it produces a shared object with a bogus entry: nuc% readelf -d work/stage/usr/local/lib/libcfg+.so Dynamic section at offset 0x92c8 contains 15 entries: Tag Type Name/Value 0x000000007ffffffd AUXILIARY Auxiliary library: [stack-protecto= r] ... nuc% 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.=