Re: bsd.cpu.mk confusion

From: Björn König <bkoenig_at_cs.tu-berlin.de>
Date: Wed, 29 Jun 2005 15:04:12 +0200
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
Received on Wed Jun 29 2005 - 11:05:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:37 UTC