Page MenuHomeFreeBSD

www/mathopd: Fix build with default PIE.
ClosedPublic

Authored by dgr_semihalf.com on Fri, Feb 19, 3:26 PM.

Details

Summary

Mathopd Makefile passed CFLAGS in MAKE_ENV variable. This caused
CFLAGS processing in bsd.prog.mk to be ignored, which in turn left
non-PIE CFLAGS from sys.mk and LDFLAGS with PIE enabled from
bsd.prog.mk.

PR: 253275

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

It seems that the maintainer doesn't have an account here. I'll send an email directly.

I tried building with this change and observe a number of additions to CFLAGS -- -MD -MF.depend.base64.o -MTbase64.o -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/11.0.1/include -fstack-protector-strong -Qunused-arguments so we'll definitely want to test with the change.

My initial tests did not show any problems, but I only checked some basic functions of the server, for example CGI was not tested. This server is quite minimal, so testing reasonable part of this should not take long. Hopefully, the maintainer will tell us more about that. If not, I'll setup something and test this myself. Disabling PIE entirely, just because it does not build, may be an overkill here.

Disabling PIE entirely, just because it does not build, may be an overkill here.

Yes, definitely if a trivial change like this lets the port build + function as PIE that is the way we should go, and I'm happy with this patch assuming the maintainer agrees.

I intend to tackle the base system build issues with static libraries that affect other ports, but would like to commit workarounds (in a small number of ports) for now so that we can enable PIE by default in the base system sooner than later.

This revision is now accepted and ready to land.Fri, Feb 19, 5:20 PM

@emaste Thanks for the review. Please merge, I cannot commit to ports.

@emaste Thanks for the review. Please merge, I cannot commit to ports.

I'm not a ports committer either and need one to approve -- @lwhsu has done this for my other PIE commits. But we should get maintainer feedback.

Yes, we should get maintainer feedback, or wait for the maintainer timeout, or portmgr's approval to modify.

This revision was automatically updated to reflect the committed changes.