All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
	Davidlohr Bueso <dave@stgolabs.net>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf bench: Share 'start', 'end', 'runtime' global vars
Date: Tue, 3 Mar 2020 12:36:27 -0300	[thread overview]
Message-ID: <20200303153627.GC13702@kernel.org> (raw)
In-Reply-To: <87tv35cv9u.fsf@nanos.tec.linutronix.de>

Em Tue, Mar 03, 2020 at 04:28:45PM +0100, Thomas Gleixner escreveu:
> Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> writes:
> 
> > Hi,
> >
> > 	Noticed with gcc 10 (fedora rawhide) that those variables were
> > not being declared as static, so end up with:
> >
> > ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
> > ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
> > ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
> > ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
> > ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
> > ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
> > make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/bench/perf-in.o] Error 1
> >
> > 	Just prefixing them with 'extern' in all but one (futex-hash.c)
> > seems to be enough, ok?
> 
> Don't we have header files for that?

Sure, that was the laziest/quickest way to "fix" that, the other was to
stick a 'static' in front of it.

I'll go see if pushing them to a header file will not clash with other
stuff.

- Arnaldo

  reply	other threads:[~2020-03-03 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 15:09 [PATCH] perf bench: Share 'start', 'end', 'runtime' global vars Arnaldo Carvalho de Melo
2020-03-03 15:28 ` Thomas Gleixner
2020-03-03 15:36   ` Arnaldo Carvalho de Melo [this message]
2020-03-03 15:58     ` [PATCH v2] " Arnaldo Carvalho de Melo
2020-03-03 18:28       ` Thomas Gleixner
2020-03-03 19:19         ` Arnaldo Carvalho de Melo
2020-03-04 11:01       ` [tip: perf/urgent] perf bench: Share some global variables to fix build with gcc 10 tip-bot2 for Arnaldo Carvalho de Melo

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=20200303153627.GC13702@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dave@stgolabs.net \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.