All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC] best way to fix a valgrind gcc 5 compile error on MIPS Octeon2
Date: Tue, 18 Jul 2017 10:01:26 +0200	[thread overview]
Message-ID: <20170718100126.3315e58f@windsurf> (raw)
In-Reply-To: <CAAnoztGZF5pH9jfxt4TN9--HwdvzVus1L+5QNPcQ76H-cbfGqw@mail.gmail.com>

Hello,

On Mon, 17 Jul 2017 20:00:56 -0700, Charles Hardin wrote:
> So compiling for a Cavium Octeon 2 processor with 2017.02.x yields the
> following error.
> 
> 
> /home/vagrant/onebloxv1_rootfs.build/host/usr/bin/mips64-linux-gcc
> -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -I../VEX/pub
> -DVGA_mips64=1 -DVGO_linux=1 -DVGP_mips64_linux=1
> -DVGPV_mips64_linux_vanilla=1 -Ipriv -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -std=gnu99 -Wall
> -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes
> -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings
> -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers
> -Wmissing-parameter-type -Wold-style-declaration -fno-stack-protector
> -fno-strict-aliasing -fno-builtin  -march=mips64 -Wbad-function-cast
> -fstrict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64  -O2 -g2 -fno-stack-protector -march=octeon2 -c -o
> priv/libvex_mips64_linux_a-main_globals.o `test -f 'priv/main_globals.c' ||
> echo './'`priv/main_globals.c
> 
> *priv/main_globals.c:1:0:* *error: *'*-mips64*' conflicts with the other
> architecture options, which specify a mips64r2 processor
> 
> * ^*
> 
> Makefile:1309: recipe for target
> 'priv/libvex_mips64_linux_a-main_globals.o' failed
> 
> make[6]: *** [priv/libvex_mips64_linux_a-main_globals.o] Error 1
> 
> make[6]: *** Waiting for unfinished jobs....

Can you give more details on how to reproduce this build failure? I.e
your Buildroot .config and toolchain (if you're using an external
toolchain) ?

> *--- a/package/valgrind/valgrind.mk <http://valgrind.mk>*
> 
> *+++ b/package/valgrind/valgrind.mk <http://valgrind.mk>*
> 
> @@ -34,7 +34,7 @@ VALGRIND_CFLAGS = \
> 
>  # and pass the right -march option, so they take precedence over
> 
>  # Valgrind's wrongfully detected value.
> 
>  ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
> 
> -VALGRIND_CFLAGS += -march=$(BR2_GCC_TARGET_ARCH)
> 
> +VALGRIND_CFLAGS += -mtune=$(BR2_GCC_TARGET_ARCH)

This looks wrong, because BR2_GCC_TARGET_ARCH is what is already passed
to gcc as -march through the toolchain wrapper, so I don't see why we
get this issue.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-07-18  8:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  3:00 [Buildroot] [RFC] best way to fix a valgrind gcc 5 compile error on MIPS Octeon2 Charles Hardin
2017-07-18  8:01 ` Thomas Petazzoni [this message]
     [not found]   ` <88778A28-0DC4-4E6C-ADBC-D2D8E48392E2@exablox.com>
2017-07-19  8:16     ` Thomas Petazzoni

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=20170718100126.3315e58f@windsurf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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.