From: Ian Kent Subject: Re: [PATCH 5/9] autofs-5.0.7 - use compiler determined by configure instead of hard-coded ones Date: Wed, 24 Jul 2013 18:16:58 +0800 Message-ID: <1374661018.2358.34.camel@perseus.fritz.box> References: <20130724084903.3884.13354.stgit@perseus.fritz.box> <20130724085333.3884.30723.stgit@perseus.fritz.box> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=themaw.net; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=mesmtp; bh=UaoCw9WMlGjHSXr8+jTwNSNczcE=; b=roG5b1jpxy6CDxtnsZb00pGAwttS BM5PQI0N35QBLVzg3TORaMH7xtPKWp0LbDl6ueb5T0Jz+hsUxjxsUuF//hPqaSAb VLVLC5gh/ITG9+Rp3MKZlOV4C+Xh1J9Cm8fX43tiK/kcONMydCislwgD3KOiO6ie DolDEsrpxxhYrA4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:subject:from:to:cc:date :in-reply-to:references:content-type:mime-version :content-transfer-encoding; s=smtpout; bh=UaoCw9WMlGjHSXr8+jTwNS NczcE=; b=PbZFJ0D5NLg6PZrpTn2Gu7x6PB2afo5YRqLywkCxR2NR2hIZe0X7a4 kX76RgFtfAR4ac9VYGN89SGoF5TZLLyHKtzS1rWyiTkik0IC6TzAD53uTKmMu+4k /Tk9gbAg3CFiFNbzc4RCTe9sspx6kEOxyYqOhz9gpTaLZTbSQbPE0= In-Reply-To: Sender: autofs-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: "Dennis Lan (dlan)" Cc: autofs mailing list On Wed, 2013-07-24 at 17:45 +0800, Dennis Lan (dlan) wrote: > On Wed, Jul 24, 2013 at 4:53 PM, Ian Kent wrote: > > From: Lan Yixun (dlan) > > > > the logic here is: > > if user pass compiler variable, then use it, otherwise fallback to default value > > > > this will provide most flexibility, so user can set this variable > > it would be even useful for cross-compile environment. > > > > Signed-off-by: Lan Yixun (dlan) > > --- > > CHANGELOG | 1 + > > Makefile.conf.in | 3 +++ > > Makefile.rules | 8 ++++---- > > 3 files changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/CHANGELOG b/CHANGELOG > > index 72d9135..ebabf21 100644 > > --- a/CHANGELOG > > +++ b/CHANGELOG > > @@ -61,6 +61,7 @@ > > - fix hesiod check error and use correct $(LIBS) setting. > > - fix dead LDAP symbolic link when LDAP support is disabled. > > - add missing libtirpc lib to mount_nfs.so when TIRPC enabled. > > +- use compiler determined by configure instead of hard-coded ones. > > > > 25/07/2012 autofs-5.0.7 > > ======================= > > diff --git a/Makefile.conf.in b/Makefile.conf.in > > index 3766d45..cb53e66 100644 > > --- a/Makefile.conf.in > > +++ b/Makefile.conf.in > > @@ -109,3 +109,6 @@ initdir = @initdir@ > > > > # Location of systemd unit files > > systemddir = @systemddir@ > > + > > +# Use the compiler determined by configure instead of hard-coded ones > > +CC := @CC@ > > diff --git a/Makefile.rules b/Makefile.rules > > index 6b5b2bd..9aebd19 100644 > > --- a/Makefile.rules > > +++ b/Makefile.rules > > @@ -38,10 +38,10 @@ STRIP = strip --strip-debug > > endif > > endif > > > > -CC = gcc > > -CXX = g++ > > -CXXFLAGS = $(CFLAGS) > > -LD = ld > > +CC ?= gcc > > +CXX ?= g++ > > +CXXFLAGS ?= $(CFLAGS) > > +LD ?= ld > > SOLDFLAGS = -shared > > > > CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 > > > > HI Ian: > Missed the changes for "LDFLAGS"?also need to change from " =" to " ?= " > > but it's strange that you seems correct in > [PATCH 6/9] autofs-5.0.7 - remove hard-coded STRIP variable I have another patch in the queue which already changes this. Thought I mentioned that in an edit note in the relevant patch .... > > LDFLAGS ?= -g --> correct > -STRIP = : > +STRIP ?= : > else > ifdef DONTSTRIP > CFLAGS ?= -O2 -g > LDFLAGS ?= -g --> correct > -STRIP = : > +STRIP ?= : > else > CFLAGS ?= -O2 -Wall > LDFLAGS ?= -s --> correct