From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: "Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Paul Mackerras" <paulus@samba.org>,
"Ingo Molnar" <mingo@elte.hu>,
linux-kernel@vger.kernel.org, "Tom Zanussi" <tzanussi@gmail.com>,
"Ozan Çağlayan" <ozan@pardus.org.tr>
Subject: Re: [PATCH 2/2] perf: fix build with -Wl,--as-needed
Date: Sat, 21 Aug 2010 14:25:23 -0300 [thread overview]
Message-ID: <20100821172522.GG2973@ghostprotocols.net> (raw)
In-Reply-To: <1282351101-8879-2-git-send-email-kirill@shutemov.name>
Tom,
Here it is.
- Arnaldo
Em Sat, Aug 21, 2010 at 03:38:21AM +0300, Kirill A. Shutemov escreveu:
> We need to put all libraries at the end of linking command to be able to
> use -Wl,--as-needed (default in some distributions).
>
> python-config --ldconfig also prints -lpython*, but we need to put it
> to EXTLIBS, not to ALL_LDFLAGS.
>
> Let's add call of python-config --libs and put its output to EXTLIBS.
>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> ---
> tools/perf/Makefile | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 496a0d6..a5972f6 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -605,12 +605,14 @@ ifdef NO_LIBPYTHON
> BASIC_CFLAGS += -DNO_LIBPYTHON
> else
> PYTHON_EMBED_LDOPTS = `python-config --ldflags 2>/dev/null`
> + PYTHON_EMBED_LIBS = `python-config --libs 2>/dev/null`
> PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null`
> - FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
> + FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) $(PYTHON_EMBED_LIBS)
> ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y)
> BASIC_CFLAGS += -DNO_LIBPYTHON
> else
> ALL_LDFLAGS += $(PYTHON_EMBED_LDOPTS)
> + EXTLIBS += $(PYTHON_EMBED_LIBS)
> LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
> LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
> endif
> --
> 1.7.2.1
next prev parent reply other threads:[~2010-08-21 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 0:38 [PATCH 1/2] perf: add test for strlcpy() Kirill A. Shutemov
2010-08-21 0:38 ` [PATCH 2/2] perf: fix build with -Wl,--as-needed Kirill A. Shutemov
2010-08-21 17:25 ` Arnaldo Carvalho de Melo [this message]
2010-08-21 17:15 ` [PATCH 1/2] perf: add test for strlcpy() Arnaldo Carvalho de Melo
2010-08-21 17:24 ` Kirill A. Shutemov
2010-08-21 20:19 ` [tip:perf/core] perf tools: " tip-bot for Kirill A. Shutemov
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=20100821172522.GG2973@ghostprotocols.net \
--to=acme@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=ozan@pardus.org.tr \
--cc=paulus@samba.org \
--cc=tzanussi@gmail.com \
/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