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
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.