From: Omar Polo Subject: Re: [portable] Minor complaints To: Christian Weisgerber Cc: gameoftrees@openbsd.org Date: Sun, 26 Feb 2023 12:39:33 +0100 On 2023/02/26 00:31:35 +0100, Christian Weisgerber wrote: > I finally took an absurdly overdue look at building -portable on > FreeBSD, since I would like to base the official FreeBSD port on > it, and I have some complaints^Wremarks. > > (1) The build lines are absurdly long, like 3200+ characters long. > This really needs some sort of config.h instead of passing 130+ > defines on the command line. +1 > (2) There are 48 -Wpointer-sign warnings about mixing char* and > unsigned char*. OpenBSD disables those warnings by default in > clang, FreeBSD doesn't. Any important warnings will go unnoticed > in this glut. Either -portable needs -Wno-pointer-sign or it might > be possible to mostly clean this up in got "main". OpenSSH-portable > uses -Wno-pointer-sign. agreed. I guess it'd be easier to just set -Wno-pointer-sign in portable; getting got to build with -Wpointer-sign will involve some churn: % grep -c -e -Wpointer-sign build.log 452 (build done without -Werror for obvious reasons.) diff /home/op/w/got-portable commit - d82a42838ae079d13ed6f4f08656f376695c1450 path + /home/op/w/got-portable blob - 987ad067c1516667b4cef8de39e25bf73e77577e file + Makefile.common.in --- Makefile.common.in +++ Makefile.common.in @@ -1,7 +1,8 @@ AM_CFLAGS += \ @AM_CFLAGS@ \ -Wunused-variable \ - -Wwrite-strings + -Wwrite-strings \ + -Wno-pointer-sign # Ideally, we should be enabling further flags, but this requires upstream # changes. Leaving these here for now. # > (3) Everything is linked with everything. The got command is linked > with libncurses and libevent_core. That actually gets in the way > of multi-packaging, should somebody desire to do so. (FreeBSD's > port infrastructure doesn't support it yet.) I think we should use sub-configure files for tog and gotwebd. moving gotwebd to a subproject *should* also allow to re-build the libexec helpers statically too and install them in a different place. atm gotwebd from -portable "only" works without chroot since it re-uses got' libexecs.