linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: Petr Vorel <petr.vorel@gmail.com>, linux-nfs@vger.kernel.org
Cc: Mike Frysinger <vapier@gentoo.org>
Subject: Re: [nfs-utils RESENT PATCH 1/1] locktes/rpcgen: tweak how we override compiler settings
Date: Tue, 7 Jan 2020 14:38:58 -0500	[thread overview]
Message-ID: <bda9e61c-1a06-5ab3-339f-c38e9a68fb73@RedHat.com> (raw)
In-Reply-To: <fb4dd073-856a-7807-eb71-f594e58732cb@RedHat.com>



On 1/7/20 2:20 PM, Steve Dickson wrote:
> 
> 
> On 1/5/20 7:05 AM, Petr Vorel wrote:
>> From: Mike Frysinger <vapier@gentoo.org>
>>
>> Newer autotools will use both CFLAGS and <target>_CFLAGS when compiling
>> the <target>.  Adding the build settings to the target-specific flags no
>> longer works as a way to compile build-time tools.
>>
>> Instead, clobber the global flags.  This triggers an automake warning,
>> but the end result actually works (unlike the existing code).
>>
>> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>> Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
>> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
>> ---
>> Hi Steve,
>>
>> this patch was sent by Mike in 2013 [1]. You had some objections about
>> warnings it causes [2]. Although I understand it, I'd like it was merged,
>> because it's needed (taken by distros: gentoo [3], buildroot [4]) and
>> IMHO it cannot be implemented other way.
>>
>> Also not sure, what should be changed in automake to avoid this tweek
>> (I might ask upstream).
>>
>> Kind regards,
>> Petr
>>
>> [1] https://marc.info/?l=linux-nfs&m=136416341629788&w=2
>> [2] https://marc.info/?l=linux-nfs&m=136423027217638&w=2
>> [3] https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
>> [4] https://git.busybox.net/buildroot/tree/package/nfs-utils/0001-Patch-taken-from-Gentoo.patch
>>
> Yes I do remember the conversation.... So you are saying using AM_XXXX macros 
> like the following patch does not take care of the problem? 
> 
Actually try this one... the one that works! ;-) 

diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
index 3156815..d5cf8da 100644
--- a/tools/locktest/Makefile.am
+++ b/tools/locktest/Makefile.am
@@ -1,12 +1,11 @@
 ## Process this file with automake to produce Makefile.in
 
 CC=$(CC_FOR_BUILD)
-LIBTOOL = @LIBTOOL@ --tag=CC
+AM_CFLAGS=$(CFLAGS_FOR_BUILD)
+AM_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+AM_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 
 noinst_PROGRAMS = testlk
 testlk_SOURCES = testlk.c
-testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
index 8a9ec89..84cafb2 100644
--- a/tools/rpcgen/Makefile.am
+++ b/tools/rpcgen/Makefile.am
@@ -1,7 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
 CC=$(CC_FOR_BUILD)
-LIBTOOL = @LIBTOOL@ --tag=CC
+AM_CFLAGS=$(CFLAGS_FOR_BUILD) ${TIRPC_CFLAGS}
+AM_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+AM_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 
 noinst_PROGRAMS = rpcgen
 rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
@@ -9,11 +11,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
                 rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
                 rpc_scan.h rpc_util.h
 
-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
-rpcgen_LDADD=$(LIBTIRPC)
-
 MAINTAINERCLEANFILES = Makefile.in
 
 EXTRA_DIST = rpcgen.new.1


  reply	other threads:[~2020-01-07 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05 12:05 [nfs-utils RESENT PATCH 1/1] locktes/rpcgen: tweak how we override compiler settings Petr Vorel
2020-01-07 19:20 ` Steve Dickson
2020-01-07 19:38   ` Steve Dickson [this message]
2020-01-14 18:36     ` Petr Vorel
2020-01-16 21:22       ` Steve Dickson
2020-01-16 21:34         ` Giulio Benetti
2020-01-20  8:48           ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bda9e61c-1a06-5ab3-339f-c38e9a68fb73@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=petr.vorel@gmail.com \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).