From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mediacenter.hi.pengutronix.de ([2001:6f8:1178:2::65]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SkbmI-0008Ji-Rc for ptxdist@pengutronix.de; Fri, 29 Jun 2012 16:02:30 +0200 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1SkbmI-0002O0-QN for ptxdist@pengutronix.de; Fri, 29 Jun 2012 16:02:30 +0200 Date: Fri, 29 Jun 2012 16:02:30 +0200 From: Michael Olbrich Message-ID: <20120629140230.GT10551@pengutronix.de> References: <201206261541.50811.jbe@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201206261541.50811.jbe@pengutronix.de> Subject: Re: [ptxdist] [PATCH] fbtest: Make its build-system aware of external CFLAGS and LDFLAGS Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Tue, Jun 26, 2012 at 03:41:50PM +0200, Juergen Beisert wrote: > Signed-off-by: Juergen Beisert > > diff --git a/patches/fbtest-20041102-1/0006-Let-the-build-system-honor-external-defined-CFLAGS-a.patch > b/patches/fbtest-20041102-1/0006-Let-the-build-system-honor-external-defined-CFLAGS-a.patch > new file mode 100644 > index 0000000..7222ffe > --- /dev/null > +++ b/patches/fbtest-20041102-1/0006-Let-the-build-system-honor-external-defined-CFLAGS-a.patch > @@ -0,0 +1,32 @@ > +From: Juergen Beisert > +Date: Tue, 26 Jun 2012 15:30:00 +0200 > +Subject: [PATCH] Let the build-system honor external defined CFLAGS and > + LDFLAGS variables > + > +Signed-off-by: Juergen Beisert > +--- > + Rules.make | 4 ++-- > + 1 files changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/Rules.make b/Rules.make > +index 5ef8cef..fb5a5b5 100644 > +--- a/Rules.make > ++++ b/Rules.make > +@@ -6,7 +6,7 @@ HOSTCC = gcc > + IFLAGS = -I$(TOPDIR)/include > + #DFLAGS = -g > + OFLAGS = -O2 -fomit-frame-pointer > +-CFLAGS = -Wall $(IFLAGS) $(DFLAGS) $(OFLAGS) > ++CFLAGS += -Wall $(IFLAGS) $(DFLAGS) $(OFLAGS) > + > + SRCS += $(wildcard *.c) > + OBJS += $(subst .c,.o,$(SRCS)) > +@@ -24,7 +24,7 @@ ifdef SUBDIRS > + endif > + > + $(TARGET): $(OBJS) > +- $(CC) -o $(TARGET) $(filter $(OBJS), $^) $(LIBS) > ++ $(CC) -o $(TARGET) $(filter $(OBJS), $^) $(LIBS) $(LDFLAGS) $(CC) $(LDFLAGS) -o $(TARGET) $(filter $(OBJS), $^) $(LIBS) I think. I'm not sure it makes a difference here, but in general LDFLAGS should come first. Michael > + > + $(O_TARGET): $(OBJS) > + $(LD) -r -o $(O_TARGET) $(filter $(OBJS), $^) > diff --git a/patches/fbtest-20041102-1/series b/patches/fbtest-20041102-1/series > index a820fe8..15055b3 100644 > --- a/patches/fbtest-20041102-1/series > +++ b/patches/fbtest-20041102-1/series > @@ -5,4 +5,5 @@ > 0003-Workaround-for-a-gcc-compiler-bug.patch > 0004-remove-asm-page.h-use-sysconf.patch > 0005-add-install-target.patch > -# 9bb723ec368cacab6034723702d740a1 - git-ptx-patches magic > +0006-Let-the-build-system-honor-external-defined-CFLAGS-a.patch > +# 0c97af2d952319b97e339bee2423856b - git-ptx-patches magic > > -- > Pengutronix e.K. | Juergen Beisert | > Linux Solutions for Science and Industry | http://www.pengutronix.de/ | > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de