Page MenuHomeFreeBSD

archivers/p7zip: Fix build with LLD
ClosedPublic

Authored by mmokhi on Aug 20 2018, 3:30 PM.
Tags
None
Referenced Files
F81409236: D16813.id46975.diff
Mon, Apr 15, 10:46 PM
Unknown Object (File)
Fri, Apr 12, 9:12 AM
Unknown Object (File)
Fri, Apr 12, 9:12 AM
Unknown Object (File)
Fri, Apr 12, 9:09 AM
Unknown Object (File)
Thu, Apr 11, 3:03 PM
Unknown Object (File)
Wed, Apr 10, 8:05 AM
Unknown Object (File)
Wed, Apr 10, 3:34 AM
Unknown Object (File)
Thu, Apr 4, 11:13 PM

Details

Summary

This fixes linking error when the LLD is being used as default on i386

@rakuco (maintainer) CC'd to check and hopefully approval :)

Test Plan

poudriere build is fine

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 18990
Build 18627: arc lint + arc unit

Event Timeline

I wonder if this requires a PORTREVISION bump, as it will probably change the package on OSVERSION it built before.

Bump PORTREVISION, reminded by @mat

tobik added inline comments.
archivers/p7zip/Makefile
32โ€“36

This needs to happen after including bsd.ports.{options,pre}.mk as ARCH is not yet defined at this point, so it cannot be used in an .if as that forces evaluation of it too early:

make: "/usr/ports/archivers/p7zip/Makefile" line 32: Malformed conditional (${ARCH} == "i386")
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/archivers/p7zip

Why not instead use

# Fix the build for i386 when WITH_LLD_IS_LD is set
# https://bugs.freebsd.org/230210
LDFLAGS+=	${LDFLAGS_${ARCH}}
LDFLAGS_i386=	-Wl,-z,notext
mmokhi added inline comments.
archivers/p7zip/Makefile
32โ€“36

Ah actually I wanted to use LDFLAGS_i386 construct initially (for the sake of simplicity and similarity to `CFLAGS_i386, but I couldn't find anything about it in handbook.
Yup, I'm gonna change it in the way you suggested ๐Ÿ˜Š
Thanks ๐Ÿ‘ ๐Ÿ™

Change the LDCONFIG condition with ARCH variable, and make it ifless, thanks to suggestion of @tobik

Approved by maintainer ( rakuco@ ) via Email.

This revision is now accepted and ready to land.Aug 26 2018, 11:06 AM
This revision was automatically updated to reflect the committed changes.