[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230117165326.3e693a12a45a1962ca0c40af@linux-foundation.org>
Date: Tue, 17 Jan 2023 16:53:26 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Herton R. Krzesinski" <herton@...hat.com>
Cc: linux-kernel@...r.kernel.org, vbabka@...e.cz, jforbes@...hat.com,
dzickus@...hat.com, scweaver@...hat.com
Subject: Re: [PATCH] tools/vm: allow users to provide additional
cflags/ldflags
On Mon, 16 Jan 2023 19:49:21 -0300 "Herton R. Krzesinski" <herton@...hat.com> wrote:
> 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.
>
> ...
>
> --- 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)
>
I think EXTRA_CFLAGS is more conventional?
Powered by blists - more mailing lists