Re: git: e9dd473602a8 - main - science/fasthenry: update 3.0wr-021113 -> 3.0wr-031424
Date: Fri, 27 Mar 2026 12:33:14 UTC
On 26/03/26 19:15, Gerald Pfeifer wrote:
> On Tue, 24 Mar 2026, Rodrigo Osorio wrote:
>> Port changes:y
>> * move to gmake and GCC for the build, instead of trying to patch for llvm
> :
>> +USES= gmake
>> +USE_GCC= yes
> It might be helpful to add a comment explaining this.
>
> And, frankly, looking at what you removed ...
>
>> -#minimal changes to fix the clang build (there should be a more thorough
>> -#clean-up, to correct types of functions, remove implicit declarations, fix
>> -#formatting, add missing returns, etc.)
>> - @${REINPLACE_CMD} -e 's,return;,return 0;,' \
> ... this is not at all about Clang versus GCC per se. Rather it is about
> different versions of language standards their current defaults use.
>
> In other words, I'm afraid this change offloads efforts to maintain this
> port to the poor folk(s) taking care of GCC on FreeBSD and USE_GCC=yes.
>
> I would not be surprised if you just added two further problems to
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292692
> [exp-run] Update GCC_DEFAULT to 15
>
> Gerald
Hi Gerald,
Thanks for your remarks.
Regarding what I removed:
- @${REINPLACE_CMD} -e 's,return;,return 0;,' \
- ${WRKSRC}/src/fasthenry/barnoldi.c \
- ${WRKSRC}/src/fasthenry/contact.c \
- ${WRKSRC}/src/fasthenry/findpaths.c \
- ${WRKSRC}/src/fasthenry/fillM.c \
- ${WRKSRC}/src/fasthenry/hole.c \
- ${WRKSRC}/src/fasthenry/induct.c \
- ${WRKSRC}/src/fasthenry/joelself.c \
- ${WRKSRC}/src/fasthenry/mulSetup.c \
- ${WRKSRC}/src/fasthenry/read_tree.c
- @${REINPLACE_CMD} -Ee \
-
'/^(AllocateBlockOfAllocationList|InitializeElementBlocks|RecordAllocation)/,/^\}/s/return;/return
0;/' \
- ${WRKSRC}/src/fasthenry/sparse/spAllocate.c
- @${REINPLACE_CMD} -Ee \
-
'/^(EnlargeMatrix|ExpandTranslationArrays|spcLinkRows)/,/^\}/s/return;/return
0;/' \
- ${WRKSRC}/src/fasthenry/sparse/spBuild.c
[...]
- @${REINPLACE_CMD} -Ee \
-
'/^(ComplexRowColElimination|CountMarkowitz|CreateInternalVectors|ExchangeColElements|ExchangeRowElements|ExchangeRowsAndCols|MarkowitzProducts|RealRowColElimination|UpdateMarkowitzNumbers|spcColExchange|spcRowExchange)/,/^\}/s/return;/return
0;/' \
- ${WRKSRC}/src/fasthenry/sparse/spFactor.c
This commands replace "return;" by "return 0;" on function supposed
return a void which is, I think, wrong.
According with C standard :
"A return statement with an expression shall not appear in a function
whose return type is void. A
return statement without an expression shall only appear in a function
whose return type is void.'
And the last two REINPLACE_CMD has no effect except change a comment
since all functions has a return type defined
- @${REINPLACE_CMD} -Ee 's,^mul(Up|Down),void &,' \
- ${WRKSRC}/src/fasthenry/mulDo.c
- @${REINPLACE_CMD} -e 's,^mulMatUp,void &,' \
- ${WRKSRC}/src/fasthenry/mulMats.c
I agree with the fact I forgot to report the CFLAG fix in
/src/fasthenry/Makefile,
but none of the other existing Makefile overwrite CFLAG anymore, and the
Makefile.default
don't exist anymore.
Regarding the GCC and GMAKE changes:
+USES= gmake
+USE_GCC= yes
Since all the makefiles use the GNU style I think it makes sense to use it
But I have to agree in the fact that with some extra twicks, the tool
can compile with clang.
I will fix in the upcomming days.
Cheers,
-- rodrigo