Date: 24 Feb 2011 11:26:57 -0000 From: Colin Percival <cperciva@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/155000: make(1) doesn't handle .POSIX: correctly Message-ID: <20110224112657.38420.qmail@xps.daemonology.net> Resent-Message-ID: <201102241130.p1OBU8jQ030112@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 155000 >Category: bin >Synopsis: make(1) doesn't handle .POSIX: correctly >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 24 11:30:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Colin Percival >Release: all FreeBSD releases >Organization: >Environment: >Description: make(1) doesn't handle .POSIX: correctly. It sucks in sys.mk before it reads the Makefile, and sys.mk has several instances of .if defined(%POSIX) to switch between POSIX and non-POSIX mode; because sys.mk is processed first, there is no opportunity for a .POSIX: directive to take effect. >How-To-Repeat: $ echo .POSIX: > Makefile $ make -V CC (prints "cc"; it should print "c89".) >Fix: Before processing sys.mk, main() should "taste" the Makefile by looking for .POSIX. This is required to appear on the first non-comment line of the Makefile, so we don't need to actually parse the Makefile in order to check for this. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110224112657.38420.qmail>