From: Lyude Paul <lyude@redhat.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 3/4] assembler/gen4asm.h: Make struct src_operand extern
Date: Thu, 19 Mar 2020 13:29:20 -0400 [thread overview]
Message-ID: <264df2c4014ad6654d4f5c34edbb00178252abbd.camel@redhat.com> (raw)
In-Reply-To: <0ed92adafea1311bcf2f04f3a020c920e47376b8.camel@redhat.com>
On Tue, 2020-03-17 at 12:56 -0400, Lyude Paul wrote:
> On Mon, 2020-03-16 at 23:08 +0000, Chris Wilson wrote:
> > Quoting Lyude (2020-03-16 16:11:31)
> > > From: Lyude Paul <lyude@redhat.com>
> > >
> > > Another spot where we fail compilation with -fcommon, due to src_operand
> > > getting included in multiple translation units without being marked as
> > > extern:
> > >
> > > /usr/bin/ld:
> > > assembler/1ca89e8@@intel-gen4asm@exe/meson-
> > > generated_gram.c.o:assembler/gen4asm.h:119:
> > > multiple definition of `src_operand';
> > > assembler/1ca89e8@@intel-gen4asm@exe/meson-
> > > generated_lex.c.o:assembler/gen4asm.h:119:
> > > first defined here
> > > /usr/bin/ld:
> > > assembler/1ca89e8@@intel-gen4asm@exe/main.c.o:assembler/gen4asm.h:119:
> > > multiple definition of `src_operand';
> > > assembler/1ca89e8@@intel-gen4asm@exe/meson-
> > > generated_lex.c.o:assembler/gen4asm.h:119:
> > > first defined here
> > >
> > > So, fix this by marking struct src_operand as extern.
> > >
> > > Signed-off-by: Lyude Paul <lyude@redhat.com>
> > > ---
> > > assembler/gen4asm.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h
> > > index 6b957e28..7845060c 100644
> > > --- a/assembler/gen4asm.h
> > > +++ b/assembler/gen4asm.h
> > > @@ -111,7 +111,7 @@ struct regtype {
> > > * This structure is the internal representation of source operands in
> > > the
> > > * parser.
> > > */
> > > -struct src_operand {
> > > +extern struct src_operand {
> > > struct brw_reg reg;
> > > int default_region;
> > > uint32_t imm32; /* set if src_operand is expressing a branch
> > > offset */
> >
> > I suspect this was a typedef. I can't see any definition for the struct
> > src_operand src_operand, and I think it can be deleted.
>
> You sure about this? It appears to be referenced in assembler/gram.y:
>
> assembler/gram.y:57:static struct src_operand src_null_reg =
> assembler/gram.y:77:static struct src_operand ip_src =
> assembler/gram.y:92: struct src_operand *src,
> assembler/gram.y:95: struct src_operand *src,
> (etc.)
>
> Or are you suggesting we just move it into gram.y?
ah-whoops, I just realized you were talking about the fact we defined it as a
variable at all, oops. will send a respin with this changed
> > -Chris
> >
--
Cheers,
Lyude Paul (she/her)
Associate Software Engineer at Red Hat
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-03-19 17:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 16:11 [igt-dev] [PATCH i-g-t 0/4] Fixes for GCC 10's -fcommon default Lyude
2020-03-16 16:11 ` [igt-dev] [PATCH i-g-t 1/4] lib/igt_core: Make igt_subtest_jmpbuf/igt_dynamic_jmpbuf extern Lyude
2020-03-16 23:11 ` Chris Wilson
2020-03-16 16:11 ` [igt-dev] [PATCH i-g-t 2/4] lib/rendercopy_gen*: Make cc/viewport static Lyude
2020-03-16 23:11 ` Chris Wilson
2020-03-16 16:11 ` [igt-dev] [PATCH i-g-t 3/4] assembler/gen4asm.h: Make struct src_operand extern Lyude
2020-03-16 23:08 ` Chris Wilson
2020-03-17 16:56 ` Lyude Paul
2020-03-19 17:29 ` Lyude Paul [this message]
2020-03-16 23:10 ` Chris Wilson
2020-03-19 17:40 ` [igt-dev] [PATCH i-g-t v2] assembler/gen4asm.h: Remove struct src_operand src_operand variable Lyude
2020-03-20 12:24 ` Petri Latvala
2020-03-16 16:11 ` [igt-dev] [PATCH i-g-t 4/4] meson: Add -fcommon to cc_flags Lyude
2020-03-17 6:34 ` Petri Latvala
2020-03-16 17:16 ` [igt-dev] ✓ Fi.CI.BAT: success for Fixes for GCC 10's -fcommon default Patchwork
2020-03-17 0:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-19 18:59 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fixes for GCC 10's -fcommon default (rev2) Patchwork
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=264df2c4014ad6654d4f5c34edbb00178252abbd.camel@redhat.com \
--to=lyude@redhat.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/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