Page MenuHomeFreeBSD

www/mathopd: Fix build with default PIE.
ClosedPublic

Authored by dgr_semihalf.com on Feb 19 2021, 3:26 PM.
Tags
None
Referenced Files
F81930115: D28793.id84271.diff
Tue, Apr 23, 8:46 AM
Unknown Object (File)
Sat, Apr 20, 12:42 AM
Unknown Object (File)
Sun, Apr 7, 7:06 AM
Unknown Object (File)
Sun, Apr 7, 4:34 AM
Unknown Object (File)
Mar 6 2024, 6:30 PM
Unknown Object (File)
Mar 6 2024, 6:30 PM
Unknown Object (File)
Mar 6 2024, 6:30 PM
Unknown Object (File)
Mar 5 2024, 5:37 PM
Subscribers

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
Lint Not Applicable
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.Feb 19 2021, 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.