Page MenuHomeFreeBSD

Add support for GCC-based targets to luajit
ClosedPublic

Authored by jhibbits on Jan 9 2018, 4:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 5, 1:50 AM
Unknown Object (File)
Jan 9 2024, 12:02 PM
Unknown Object (File)
Jan 9 2024, 12:02 PM
Unknown Object (File)
Jan 9 2024, 12:02 PM
Unknown Object (File)
Jan 1 2024, 1:04 AM
Unknown Object (File)
Dec 20 2023, 7:21 AM
Unknown Object (File)
Nov 15 2023, 2:41 AM
Unknown Object (File)
Nov 12 2023, 10:04 PM
Subscribers

Details

Summary

luajit requires CC to be passed on the command line, not via the Make
environment in order to override the Makefile. Pass it explicitly, and for GCC
targets (powerpc, mips, sparc64) explicitly use ports GCC.

Test Plan

Successfully built on powerpc. Does not build for powerpc64, though.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lang/luajit/Makefile
21–23 ↗(On Diff #37662)

ARCH is not defined before including b.p.options.m.

lang/luajit/Makefile
21–23 ↗(On Diff #37662)

Hm, now I'm wondering how my build completed successfully.

lang/luajit/Makefile
21–23 ↗(On Diff #37662)

If you are cross-building, poudriere defines ARCH in make.conf or something, so it will work, but only when crossbuilding, it would break on amd64 for example :-)

lang/luajit/Makefile
21–23 ↗(On Diff #37662)

I just tested, by adding a ".info ${ARCH}" into that block, and it did print out "powerpc". Might ARCH be defined elsewhere, too, maybe implicitly?

lang/luajit/Makefile
21–23 ↗(On Diff #37662)

Aha, got it... yeah, crossbuilding to ppc32 on ppc64, and ARCH is defined in the make.conf. I guess I need to include b.p.pre.mk / b.p.post.mk?

lang/luajit/Makefile
21–23 ↗(On Diff #37662)

No need to bring pre and post, simply include bsd.port.options.mk before the .if.

Update given mat's feedback. Tested with powerpc and powerpc64

lang/luajit/Makefile
6 ↗(On Diff #37680)

You do not need to bump PORTREVISION, it does not change anything for the architectures where it already worked, and it did not previously exist in the new architectures.

17 ↗(On Diff #37680)

You do not need += here.

lang/luajit/Makefile
6 ↗(On Diff #37680)

This is an artifact of using two different ports trees for my work (poudriere, and commit). The real ports tree does have the PORTREVISION already, my 'commit' tree does not. Will update svn and repost the fixed diff with the MAKE_ARGS correction.

mat added inline comments.
lang/luajit/Makefile
6 ↗(On Diff #37680)

No need to re-update it, just commit it :-)

This revision is now accepted and ready to land.Jan 9 2018, 3:41 PM
This revision was automatically updated to reflect the committed changes.