From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761092AbcALJlQ (ORCPT ); Tue, 12 Jan 2016 04:41:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39989 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753534AbcALJlO (ORCPT ); Tue, 12 Jan 2016 04:41:14 -0500 Date: Tue, 12 Jan 2016 10:41:10 +0100 From: Jiri Olsa To: "Wangnan (F)" Cc: acme@kernel.org, jolsa@kernel.org, namhyung@kernel.or, lizefan@huawei.com, pi3orama@163.com, linux-kernel@vger.kernel.org, Namhyung Kim Subject: Re: [PATCH 1/6] perf tools: Add -lutil in python lib list for broken python-config Message-ID: <20160112094110.GA27690@krava.brq.redhat.com> References: <1452263041-225488-1-git-send-email-wangnan0@huawei.com> <1452263041-225488-2-git-send-email-wangnan0@huawei.com> <20160111092841.GC15415@krava.brq.redhat.com> <56937977.1040203@huawei.com> <56937ADD.3050006@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56937ADD.3050006@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2016 at 05:50:21PM +0800, Wangnan (F) wrote: SNIP > > > > Using this option has a significant performance cost. It is best to > >use it only when there are unavoidable circular references between two or > >more archives. > > > > > >Without --start/end-group, if we provide -l in this order: > > > > ... -la -lb -lc ... > > > >and libb.a requires a symbol in liba.a, link would fail. The simplest way > >to avoid this is to add another -la after -lb: > > > > ... -la -lb -la -lc ... > > > >In my environment it works as if we don't provide -Wl,--start-group and > >-Wl,--end-group. > >I don't know why. > > > > I mean the python case before I add -lutil after python libs. > -Wl,--start-group and -Wl,--end-group > seems not work for me. They are issued, I confirm this in strace output. ok, got it.. I'm ok with the patch, there's no harm with extra lib, however I think you should report this to gcc folks also please resubmit the patch with the above comment, to make it clear why it's there thanks, jirka