Page MenuHomeFreeBSD

archivers/p7zip: Fix build with LLD

Authored by mmokhi on Aug 20 2018, 3:30 PM.
Referenced Files
Unknown Object (File)
Wed, Feb 14, 5:23 PM
Unknown Object (File)
Jan 23 2024, 5:18 PM
Unknown Object (File)
Jan 10 2024, 9:36 PM
Unknown Object (File)
Dec 20 2023, 3:58 AM
Unknown Object (File)
Dec 18 2023, 6:52 PM
Unknown Object (File)
Dec 13 2023, 4:37 PM
Unknown Object (File)
Nov 19 2023, 9:29 AM
Unknown Object (File)
Nov 19 2023, 9:29 AM



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

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

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.
32–36 ↗(On Diff #46999)

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
LDFLAGS_i386=	-Wl,-z,notext
mmokhi added inline comments.
32–36 ↗(On Diff #46999)

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.