Page MenuHomeFreeBSD

games/fs2open: fix linking on 12.0 and higher when using LLVM
ClosedPublic

Authored by pkubaj on May 15 2019, 10:21 PM.

Details

Summary

This port was tested on 11.2-RELEASE (the oldest supported version) on amd64 and 12.0-RELEASE on powerpc64. Since 12.0-RELEASE amd64 uses lld.

This port doesn't link with lld. Fix that (LLD_UNSAFE doesn't work) and remove additional -march=native.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pkubaj created this revision.May 15 2019, 10:21 PM
mat accepted this revision.May 16 2019, 6:58 AM

Though, the last two patches should be excluded, nothing in them changes really.

This revision is now accepted and ready to land.May 16 2019, 6:58 AM
tobik added a subscriber: tobik.May 16 2019, 7:52 AM
tobik added inline comments.
games/fs2open/files/patch-cmake_toolchain-clang.cmake
19 ↗(On Diff #57423)

FreeBSD 13.0 does not have ld.bfd in base anymore, so committing this would break the build there. Either add something like

.if !exists(/usr/bin/ld.bfd)
USE_BINUTILS=	yes
.endif

or make sure the build respects LDFLAGS so that LLD_UNSAFE=yes can actually work.

pkubaj updated this revision to Diff 57508.May 17 2019, 10:32 PM

That seems to build.

OK?

This revision now requires review to proceed.May 17 2019, 10:32 PM

Looks good to me and builds fine on 13.0/amd64, thanks.

I'd bump PORTREVISION too to trigger a rebuild since the build is without -march=native now and because CFLAGS, CXXFLAGS, LDFLAGS are actually respected by the build now.

pkubaj updated this revision to Diff 57511.May 18 2019, 1:59 AM

Bump PORTREVISION.

mat added inline comments.May 20 2019, 12:46 PM
games/fs2open/files/patch-freespace2_CMakeLists.txt
1–3 ↗(On Diff #57511)

Remove this patch from the lot, no functional changes. (I am looking at fixing makepatch to avoid keeping those patches.)

mat added inline comments.May 20 2019, 1:09 PM
games/fs2open/files/patch-freespace2_CMakeLists.txt
1–3 ↗(On Diff #57511)

Fixed in rP502102.

pkubaj marked 3 inline comments as done.May 29 2019, 7:48 AM
pkubaj updated this revision to Diff 58031.May 29 2019, 7:54 AM

Remove patch that doesn't change anything.

mat accepted this revision.Jun 8 2019, 5:19 PM
This revision is now accepted and ready to land.Jun 8 2019, 5:19 PM
This revision was automatically updated to reflect the committed changes.