linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: oulijun <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linuxarm <linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Subject: Re: ???For help??? configure crossbar build tool in CMakelist.txt
Date: Tue, 18 Oct 2016 09:50:04 -0600	[thread overview]
Message-ID: <20161018155004.GA24189@obsidianresearch.com> (raw)
In-Reply-To: <5805FF8C.1060902-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Tue, Oct 18, 2016 at 06:55:08PM +0800, oulijun wrote:

>   if I use crossbar build tool aarch64-linux-gnu-gcc for building
>   the directory(provider/hns), what i should do it ?

You cannot cross compile only a part of the project, you must cross
compile everything.

$ mkdir build; cd build
$ CC=aarch64-linux-gnu-gcc cmake -GNinja
$ ninja

I haven't extensively tested cross compiling, you may run into
problems, in particular I know pkgconfig for libnl doesn't work
reliably when cross compiling.

You may need to build with -DENABLE_RESOLVE_NEIGH=0 if you don't have
a cross compiled libnl3 available.

> My modification currently according to the others as fllows:
> 
> in the file : provider/hns/CMakelist.txt
> 
> set(CMAKE_C_COMPILER /opt/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu-gcc)

This is not the right approach, the hns provider CMakelist should
detect the compiler is not ARM64 and just do nothing.

Perhaps something like this:

CHECK_C_SOURCE_COMPILES("
#ifndef __ARM64__
#error Failed
#endif
 int main(int argc,const char *argv[]) { return 1; }"
 HAVE_ARCH_ARM64)

if (HAVE_ARCH_ARM64)
 [..]
endif()
 
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-10-18 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 10:55 【For help】 configure crossbar build tool in CMakelist.txt oulijun
     [not found] ` <5805FF8C.1060902-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-10-18 15:50   ` Jason Gunthorpe [this message]
     [not found]     ` <20161018155004.GA24189-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-19  2:53       ` some test question//Re: [For help] " oulijun
     [not found]         ` <5806E02E.7030400-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-10-19  4:11           ` Jason Gunthorpe
     [not found]             ` <20161019041102.GA28678-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-20  7:50               ` [Test fail]//Re: " oulijun
     [not found]                 ` <5808772F.6050305-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-10-20 16:29                   ` Jason Gunthorpe
     [not found]                     ` <20161020162955.GA7375-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-21  1:42                       ` oulijun

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=20161018155004.GA24189@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).