From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 24 11:30:08 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AAA1106564A for ; Thu, 24 Feb 2011 11:30:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4318FC0A for ; Thu, 24 Feb 2011 11:30:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1OBU85V030114 for ; Thu, 24 Feb 2011 11:30:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1OBU8jQ030112; Thu, 24 Feb 2011 11:30:08 GMT (envelope-from gnats) Resent-Date: Thu, 24 Feb 2011 11:30:08 GMT Resent-Message-Id: <201102241130.p1OBU8jQ030112@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Colin Percival Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 85EE3106566C for ; Thu, 24 Feb 2011 11:26:50 +0000 (UTC) (envelope-from cperciva@xps.daemonology.net) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 7C0ED14E0AE for ; Thu, 24 Feb 2011 11:26:49 +0000 (UTC) Received: (qmail 38421 invoked by uid 1001); 24 Feb 2011 11:26:57 -0000 Message-Id: <20110224112657.38420.qmail@xps.daemonology.net> Date: 24 Feb 2011 11:26:57 -0000 From: Colin Percival To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/155000: make(1) doesn't handle .POSIX: correctly X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Colin Percival List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Feb 2011 11:30:08 -0000 >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: