Date: Thu, 24 Aug 2017 21:36:32 +0000 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) Message-ID: <bug-221778-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221778-13>