From owner-freebsd-current@FreeBSD.ORG Tue May 24 20:09:44 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F52D106564A for ; Tue, 24 May 2011 20:09:44 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C10098FC18 for ; Tue, 24 May 2011 20:09:43 +0000 (UTC) Received: by gxk28 with SMTP id 28so3540851gxk.13 for ; Tue, 24 May 2011 13:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=NpQ59fZVOOJv3p4OHjTbtAKvN2Cql0iSpMiVVXvXyu8=; b=qlKz+DenUWEK4hDG3toZmQ0MBvWtrqy01+adxw9quemvHTwvVagsYBY6/hY4HzHR+/ u8my1Dx9PIw+Jw1uely6+FYddY5MLhUAhyZekXW9uFdSG0j3QWOedTOGApuUlp/zdMhZ fuuLnbglmDCZaZCyftFQLiuJzpgMn393Jau8s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=uAnqNQHy51fCrgdiKr0BzVEGGNp9PDk0zQw22uE0HqklLxkJb8ESS5+zAA5CxO0nob MsuGgVGwz3kwkKchH1VP8YUiRKxD8U3hcbecKSywn7t0W2SDjTpZ+pC7TN5jlP4vH+bd rwZhdc398ZZKeAnu/9N2jq4ZhM3xiLYz7I7UE= Received: by 10.236.189.100 with SMTP id b64mr5358255yhn.411.1306267782413; Tue, 24 May 2011 13:09:42 -0700 (PDT) Received: from localhost.localdomain (76-10-146-236.dsl.teksavvy.com [76.10.146.236]) by mx.google.com with ESMTPS id t3sm3373287yhm.51.2011.05.24.13.09.41 (version=SSLv3 cipher=OTHER); Tue, 24 May 2011 13:09:41 -0700 (PDT) From: Arnaud Lacombe To: current@freebsd.org Date: Tue, 24 May 2011 16:09:32 -0400 Message-Id: <1306267772-31084-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty Cc: Arnaud Lacombe Subject: [PATCH] Fix CFLAGS overwrite by Makefile X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 20:09:44 -0000 Many Makefile (espectially under sys/boot/) overwrite the value of CFLAGS. This is an issue if you want to generate code for a specific CPU as before the Makefile is interpreted, CFLAGS might already have been set with CPU specific settings by , which is source from sys.mk. Signed-off-by: Arnaud Lacombe --- sbin/gvinum/Makefile | 2 +- sys/boot/arm/at91/Makefile.inc | 2 +- sys/boot/i386/boot2/Makefile | 2 +- sys/boot/i386/gptboot/Makefile | 2 +- sys/boot/i386/gptzfsboot/Makefile | 2 +- sys/boot/i386/kgzldr/Makefile | 2 +- sys/boot/i386/zfsboot/Makefile | 2 +- sys/boot/pc98/boot2/Makefile | 2 +- sys/boot/pc98/kgzldr/Makefile | 2 +- sys/boot/powerpc/boot1.chrp/Makefile | 2 +- sys/boot/sparc64/boot1/Makefile | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/gvinum/Makefile b/sbin/gvinum/Makefile index 8cccf56..465b617 100644 --- a/sbin/gvinum/Makefile +++ b/sbin/gvinum/Makefile @@ -5,7 +5,7 @@ SRCS= gvinum.c gvinum.h geom_vinum_share.c MAN= gvinum.8 WARNS?= 2 -CFLAGS= -I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit +CFLAGS+=-I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM} LDADD= -ledit -ltermcap -ldevstat -lkvm -lgeom diff --git a/sys/boot/arm/at91/Makefile.inc b/sys/boot/arm/at91/Makefile.inc index 2f528e3..db37c7d 100644 --- a/sys/boot/arm/at91/Makefile.inc +++ b/sys/boot/arm/at91/Makefile.inc @@ -8,7 +8,7 @@ __at91_boot_Makefile.inc__: # tsc, bwct, kb920x, centipad are the supported flavors BOOT_FLAVOR?=kb920x -CFLAGS=-Os -mcpu=arm9 -ffreestanding \ +CFLAGS+=-Os -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ -I${.CURDIR}/../../../.. \ -I${.CURDIR}/../../../../arm \ diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index 9568c1c..fc231e6 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -22,7 +22,7 @@ BOOT2_UFS?= UFS1_AND_UFS2 #BOOT2_UFS?= UFS2_ONLY #BOOT2_UFS?= UFS1_ONLY -CFLAGS= -Os \ +CFLAGS+=-Os \ -fno-guess-branch-probability \ -fomit-frame-pointer \ -fno-unit-at-a-time \ diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile index 5642220..18c0f35 100644 --- a/sys/boot/i386/gptboot/Makefile +++ b/sys/boot/i386/gptboot/Makefile @@ -19,7 +19,7 @@ GPTBOOT_UFS?= UFS1_AND_UFS2 #GPTBOOT_UFS?= UFS2_ONLY #GPTBOOT_UFS?= UFS1_ONLY -CFLAGS= -DBOOTPROG=\"gptboot\" \ +CFLAGS+=-DBOOTPROG=\"gptboot\" \ -Os \ -fno-guess-branch-probability \ -fomit-frame-pointer \ diff --git a/sys/boot/i386/gptzfsboot/Makefile b/sys/boot/i386/gptzfsboot/Makefile index f0ee578..6e7d543 100644 --- a/sys/boot/i386/gptzfsboot/Makefile +++ b/sys/boot/i386/gptzfsboot/Makefile @@ -16,7 +16,7 @@ REL1= 0x700 ORG1= 0x7c00 ORG2= 0x0 -CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ +CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \ -Os \ -fno-guess-branch-probability \ -fomit-frame-pointer \ diff --git a/sys/boot/i386/kgzldr/Makefile b/sys/boot/i386/kgzldr/Makefile index a124474..e8a4157 100644 --- a/sys/boot/i386/kgzldr/Makefile +++ b/sys/boot/i386/kgzldr/Makefile @@ -7,7 +7,7 @@ BINDIR= ${LIBDIR} NO_MAN= SRCS= start.s boot.c inflate.c lib.c crt.s sio.s -CFLAGS= -Os +CFLAGS+=-Os CFLAGS+=-DKZIP NO_SHARED= LDFLAGS=-Wl,-r diff --git a/sys/boot/i386/zfsboot/Makefile b/sys/boot/i386/zfsboot/Makefile index 06ff863..aa1bfbe 100644 --- a/sys/boot/i386/zfsboot/Makefile +++ b/sys/boot/i386/zfsboot/Makefile @@ -14,7 +14,7 @@ REL1= 0x700 ORG1= 0x7c00 ORG2= 0x2000 -CFLAGS= -DBOOTPROG=\"zfsboot\" \ +CFLAGS+=-DBOOTPROG=\"zfsboot\" \ -Os -g \ -fno-guess-branch-probability \ -fomit-frame-pointer \ diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile index 18bf251..e9f1506 100644 --- a/sys/boot/pc98/boot2/Makefile +++ b/sys/boot/pc98/boot2/Makefile @@ -22,7 +22,7 @@ BOOT2_UFS?= UFS1_AND_UFS2 #BOOT2_UFS?= UFS2_ONLY #BOOT2_UFS?= UFS1_ONLY -CFLAGS= -Os \ +CFLAGS+=-Os \ -fno-guess-branch-probability \ -fomit-frame-pointer \ -fno-unit-at-a-time \ diff --git a/sys/boot/pc98/kgzldr/Makefile b/sys/boot/pc98/kgzldr/Makefile index 2303fd9..645cc58 100644 --- a/sys/boot/pc98/kgzldr/Makefile +++ b/sys/boot/pc98/kgzldr/Makefile @@ -7,7 +7,7 @@ BINDIR= ${LIBDIR} NO_MAN= SRCS= start.s boot.c inflate.c lib.c crt.s sio.s -CFLAGS= -Os +CFLAGS+=-Os CFLAGS+=-DKZIP NO_SHARED= LDFLAGS=-Wl,-r diff --git a/sys/boot/powerpc/boot1.chrp/Makefile b/sys/boot/powerpc/boot1.chrp/Makefile index f3f7e4d..88358b5 100644 --- a/sys/boot/powerpc/boot1.chrp/Makefile +++ b/sys/boot/powerpc/boot1.chrp/Makefile @@ -13,7 +13,7 @@ SRCS= boot1.c ashldi3.c INTERNALPROG= NO_MAN= -CFLAGS= -ffreestanding -msoft-float -Os \ +CFLAGS+=-ffreestanding -msoft-float -Os \ -I${.CURDIR}/../../common -I${.CURDIR}/../../../ LDFLAGS=-nostdlib -static -N diff --git a/sys/boot/sparc64/boot1/Makefile b/sys/boot/sparc64/boot1/Makefile index dec3e09..29e14f8 100644 --- a/sys/boot/sparc64/boot1/Makefile +++ b/sys/boot/sparc64/boot1/Makefile @@ -8,7 +8,7 @@ SRCS= _start.s boot1.c BOOTBLOCKBASE= 0x4000 -CFLAGS= -mcmodel=medlow -Os -I${.CURDIR}/../../common +CFLAGS+=-mcmodel=medlow -Os -I${.CURDIR}/../../common LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N # Construct boot1. sunlabel expects it to contain zeroed-out space for the -- 1.7.5.rc1.23.g0cac8.dirty