[LTP] [PATCH 13/21] Build system: Always append CFLAGS at the end

Markos Chandras
2012-01-03T11:22:40Z

[-- Attachment #1: Type: text/plain, Size: 49 bytes --]

Hi, please review the attached patch

--
markos

[-- Attachment #2: 0013-Build-system-Always-append-CFLAGS-at-the-end.patch --]
[-- Type: text/plain, Size: 1260 bytes --]

From 5800c95986bb1d63ef0af9dda4eb87c771bcccf3 Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 17:22:48 +0000
Subject: [PATCH 13/21] Build system: Always append CFLAGS at the end

The build system sets -g -O2 -fno-strict-aliasing -pipe by default. We
append the enviromental CFLAGS at the end to allow the user to override
the default CFLAGS

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
include/mk/config.mk.in | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index b835c86..6148b2c 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -72,8 +72,11 @@ WCFLAGS ?= -Wall
WCXXFLAGS ?= $(WCFLAGS)

LDFLAGS += $(WLDFLAGS)
-CFLAGS += $(DEBUG_CFLAGS) $(OPT_CFLAGS) $(WCFLAGS)
-CXXFLAGS += $(DEBUG_CXXFLAGS) $(OPT_CXXFLAGS) $(WCXXFLAGS)
+AMCFLAGS = $(DEBUG_CFLAGS) $(OPT_CFLAGS) $(WCFLAGS) $(CFLAGS)
+AMCXXFLAGS = $(DEBUG_CXXFLAGS) $(OPT_CXXFLAGS) $(WCXXFLAGS) $(CXXFLAGS)
+
+CFLAGS := $(AMCFLAGS)
+CXXFLAGS := $(AMCXXFLAGS)

ifeq ($(strip $(prefix)),)
$(error you are using $$(prefix) incorrectly -- set it to $(abs_top_srcdir) if you want to build in the source tree)
--
1.7.1

[-- Attachment #3: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net