bsd.cpu.mk confusion
Björn König
bkoenig at cs.tu-berlin.de
Wed Jun 29 13:05:50 GMT 2005
Ulrich Spoerlein wrote:
> [...]
>
> Here's a minimal Makefile
>
> CPUTYPE=pentium-m
> CC= icc
> .include <bsd.prog.mk>
> .include <bsd.cpu.mk>
>
> Then
> % make -V CFLAGS
> -O2 -fno-strict-aliasing -pipe -march=pentium-m -tpp6 -xiMK
>
> Only problem is, icc doesn't recognize -march. I can't figure out, why I
> get this assignment. Running make with debugging output couldn't
> enlight me either.
>
> So, what am I doing wrong?
You have overlooked that sys.mk will be processed "before any other
file, including makefile and Makefile" (make(1)). /usr/share/mk/sys.mk
includes already bsd.cpu.mk once at a time where CC has not been set to
'icc'. Therefore ${_CPUCFLAGS} will be added to CFLAGS in bsd.cpu.mk.
Afterwards you include bsd.cpu.mk twice.
Regards
Björn
More information about the freebsd-current
mailing list