[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/55174: build.sh has trouble with CFLAGS on /etc/mk.conf if it was used "+=" instead of "="
>Synopsis: build.sh has trouble with CFLAGS on /etc/mk.conf if it was used "+=" instead of "="
>Arrival-Date: Tue Apr 14 00:45:00 +0000 2020
>Originator: João Paulo Vinha Bittar
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
The build.sh does not accept compiler flags lines with "+=" /etc/mk.conf, only lines with "=".
One can add, for example, "CFLAGS+=-O2" because there are instructions to use "+=" so to not get "problems with packages that need to add their own flags" (http://www.netbsd.org/docs/pkgsrc/configuring.html#conf.cflags), but then it breaks build.sh which accepts only "=" on the compiler flags (in this example, it would be "CFLAGS=-O2").
1) Create the /etc/mk.conf if it does not exist and add the following line:
2) Run "/usr/src/build.sh -U -O ~/OBJ -x release" (without quotes) to build NetBSD and X.org without having root privileges.
3) Wait a little bit, so the tools are built correctly;
4) After the tools are built, the actual building of NetBSD and X suddenly stops.
The only workaround I know is to change the compiler flags on /etc/mk.conf to use only "=" instead of "+=" before running /usr/src/build.sh.
It would be nice if, until build.sh is fixed, to add a warning to the NetBSD Guide, Chapter 31 (http://netbsd.org/docs/guide/en/chap-build.html), so we know that using "+=" instead of "=" as it was told on http://www.netbsd.org/docs/pkgsrc/configuring.html#conf.cflags will break the build.sh. The page at http://www.netbsd.org/docs/pkgsrc/configuring.html#conf.cflags should also note that using "+=" will break build.sh. Other places, as man pages or the default output of build.sh without arguments could also warn about using only "=" on /etc/mk.conf.
Main Index |
Thread Index |