From: "Herton R. Krzesinski" <herton@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, vbabka@suse.cz, jforbes@redhat.com,
dzickus@redhat.com, scweaver@redhat.com
Subject: [PATCH] tools/vm: allow users to provide additional cflags/ldflags
Date: Mon, 16 Jan 2023 19:49:21 -0300 [thread overview]
Message-ID: <20230116224921.4106324-1-herton@redhat.com> (raw)
Right now there is no way to provide additional cflags/ldflags when
building tools/vm binaries. And using eg. make CFLAGS=<options> will
override the CFLAGS being set in the Makefile, making the build fail
since it requires the include of the ../lib dir (for libapi).
This change then allows you to specify:
CFLAGS=<options> LDFLAGS=<options> make V=1 -C tools/vm
And the options will be correctly appended as can be seen from the
make output.
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
---
tools/vm/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/vm/Makefile b/tools/vm/Makefile
index 9860622cbb15..6c1da51f4177 100644
--- a/tools/vm/Makefile
+++ b/tools/vm/Makefile
@@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_sort
LIB_DIR = ../lib/api
LIBS = $(LIB_DIR)/libapi.a
-CFLAGS = -Wall -Wextra -I../lib/
-LDFLAGS = $(LIBS)
+CFLAGS += -Wall -Wextra -I../lib/
+LDFLAGS += $(LIBS)
all: $(TARGETS)
--
2.38.1
next reply other threads:[~2023-01-16 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 22:49 Herton R. Krzesinski [this message]
2023-01-18 0:53 ` Andrew Morton
2023-01-18 13:47 ` Herton R. Krzesinski
2023-01-18 22:10 ` Andrew Morton
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=20230116224921.4106324-1-herton@redhat.com \
--to=herton@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dzickus@redhat.com \
--cc=jforbes@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=scweaver@redhat.com \
--cc=vbabka@suse.cz \
/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
all inboxes | Powered by JetHome®