mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: wbx@openadk.org
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: sparc64 gcc 7.1 compile error
Date: Mon, 05 Jun 2017 11:59:32 -0400 (EDT)	[thread overview]
Message-ID: <20170605.115932.676337842945675142.davem@davemloft.net> (raw)
In-Reply-To: <20170605091941.GM26922@waldemar-brodkorb.de>

From: Waldemar Brodkorb <wbx@openadk.org>
Date: Mon, 5 Jun 2017 11:19:41 +0200

> I get a compile/linking error with gcc 7.1 when targeting qemu system
> sparc64.
> 
> + objects='arch/sparc/kernel/head_64.o  init/built-in.o
> --start-group  usr/built-in.o  arch/sparc/built-in.o
> kernel/built-in.o  certs/built-in.o  mm/built-in.o  fs/built-in.o
> ipc/built-in.o  security/built-in.o  crypto/built-in.o
> block/built-in.o  lib/lib.a  arch/sparc/prom/lib.a
> arch/sparc/lib/lib.a  lib/built-in.o  arch/sparc/prom/built-in.o
> arch/sparc/lib/built-in.o  drivers/built-in.o  sound/built-in.o
> firmware/built-in.o  net/built-in.o  virt/built-in.o
> --end-group           '
> +
> /home/wbx/openadk/toolchain_qemu-sparc64_glibc_v9/usr/bin/sparc64-openadk-linux-gnu-ld
> -m elf64_sparc --build-id -o vmlinux -T
> ./arch/sparc/kernel/vmlinux.lds arch/sparc/kernel/head_64.o
> init/built-in.o --start-group usr/built-in.o arch/sparc/built-in.o
> kernel/built-in.o certs/built-in.o mm/built-in.o fs/built-in.o
> ipc/built-in.o security/built-in.o crypto/built-in.o
> block/built-in.o lib/lib.a arch/sparc/prom/lib.a
> arch/sparc/lib/lib.a lib/built-in.o arch/sparc/prom/built-in.o
> arch/sparc/lib/built-in.o drivers/built-in.o sound/built-in.o
> firmware/built-in.o net/built-in.o virt/built-in.o --end-group
> ipc/built-in.o: In function `mq_attr_ok':
> mqueue.c:(.text+0x6154): undefined reference to `__multi3'
> 
> I tried with Linux 4.11.3, Linus master and David Miller's SPARC
> tree from today with the same result. The failing config is attached.

GCC seems to be emitting a 128-bit multiply to work out this
expression in ipc/mqueue.c:

 if (attr->mq_msgsize > (~0UL)/attr->mq_maxmsg)
  return -92;

Seems like a bit of an extreme way to do this.

But worst case we'll have to add __multi3 to the kernel libraries.

  reply	other threads:[~2017-06-05 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  9:19 Waldemar Brodkorb
2017-06-05 15:59 ` David Miller [this message]
2017-06-05 18:31 ` David Miller
2017-06-06  0:06   ` Waldemar Brodkorb

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=20170605.115932.676337842945675142.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=wbx@openadk.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

all inboxes | Powered by JetHome®