Hi Brian, [...]
Could you explain why ports-gcc is needed? Is there a reason that gcc-4.9.4 would be preferred over clang-6.0.0? Usually, if you have a COMPILER line, you have a comment above it with a reason why. I don't know if it's true for this port, but something like:# C++11 COMPILER = base-clang ports-gccis usually what is wanted here.
Actually, when compiled with base-clang, I was observing some segmentation faults during tests (the first in test/fsm no. 43).
After the upgrade to a more recent snapshot (I'm currently using the one dated 4th Aug), the test suite completes without errors even using clang. So, I agree with your suggestion.
Please also note that we need a pre-build "conditional", since the "config-" target in upstream Makefile is different for clang (config-clang) and gcc (config-gcc-4.8); I defined the variable CONFIG_TARGET and set it after the ".include <bsd.port.mk>", according to the value of CHOSEN_COMPILER:
[... snip ...]
pre-build:
${SUBST_CMD} ${WRKSRC}/kernel/yosys.cc
@cd ${WRKBUILD} && exec ${MAKE_PROGRAM} config-$(CONFIG_TARGET)
[...]
.include <bsd.port.mk>
.if ${CHOSEN_COMPILER} == "base-clang"
CONFIG_TARGET = clang
.else
CONFIG_TARGET = gcc-4.8
.endif
[... snip ...]
Please confirm that this is acceptable (or suggest any wiser alternatives).
[...]
Some other notes:As I understand Makefile.template, you should prefer the GH_* variables for this port, since everything is auto-generated anyway. It will also let you get rid of your VERSION variable, since the GH_* variables will take care of it.
I was following the comment in Makefile.template: [... snip ...] # # github: # /releases/ -> preferred. ignore GH_*, just use MASTER_SITES and DISTNAME.# /archive/ -> GH_ACCOUNT and GH_PROJECT, plus either GH_TAGNAME or GH_COMMIT.
# [... snip ...](in this case we have a release). I see a bunch of other ports doing similar things (e.g., games/minetest, textproc/py-rdflib, ...).
Should I use GH_TAGNAME instead?
Your LDFLAGS line might be better located as a part of your MAKE_FLAGS line.
Done. Updated tarball enclosed. -- Alessandro DE LAURENZIS [mailto:[email protected]] Web: http://www.atlantide.t28.net LinkedIn: http://it.linkedin.com/in/delaurenzis
yosys.tar.gz
Description: application/gzip
