Subject: Re: CFLAGS and building X from xsrc
To: None <current-users@NetBSD.org>
From: Matthias Scheler <tron@zhadum.de>
List: current-users
Date: 09/09/2004 17:29:17
In article <413A24D9.8070601@free.fr>,
	Vincent <10.50@free.fr> writes:
>> Nope, /usr/src/x11 is already there and wraps around /usr/xsrc. Simply
>> set MKX11 to "yes" (or use '-x') in order to build X11 with build.sh
>> (see /usr/src/BUILDING).
> Whether I try to build x11 by using the build.sh script or simply by 
> making build in the x11 directory, both methods ignore totally 
> /etc/mk.conf and whatever is defined inside.

That's is not true. The legacy build via "xsrc" ignores "/etc/mk.conf",
the build in "src/x11" honors settings from "/etc/mk.conf":

tron@colwyn:~>cd /usr/src/x11/lib/font
tron@colwyn:/usr/src/x11/lib/font>make
[...]
#   compile  font/afm.o
/src/tools/bin/i386--netbsdelf-gcc -O2  -Werror  -march=pentium4    -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO -I/usr/X11R6/include   -nostdinc -isystem /usr/include -c   -I/usr/xsrc/xfree/xc/lib/font/include  -I/usr/xsrc/xfree/xc/include/fonts  -I/usr/xsrc/xfree/xc/programs/Xserver/include  -I/usr/X11R6/include/X11 -DBUILDCID -DHAVE_CFM -DUSE_MMAP /usr/xsrc/xfree/xc/lib/font/Type1/afm.c -o afm.o.tmp
/src/tools/bin/i386--netbsdelf-ld -x -r afm.o.tmp -o afm.o
rm -f afm.o.tmp
[...]

The "-march=pentium4" comes from this setting in "/etc/mk.conf":

.sinclude "/usr/pkg/share/mk/cpuflags.mk"

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/