Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] New package: gRPC, Google's remote procedue calss protocol.
Date: Tue, 18 Sep 2018 22:37:52 +0200	[thread overview]
Message-ID: <20180918223752.6b4ccaee@windsurf> (raw)
In-Reply-To: <CANRZ_fnbcgmYd1iGv1EUNe_hbUhPtWF3ghJhHgwmNhsDHtO2RA@mail.gmail.com>

Hello Mark,

On Tue, 18 Sep 2018 13:26:06 -0700, Mark Fine wrote:

> > See
> > https://buildroot.org/downloads/manual/manual.html#github-download-url
> > for more details about this.
> 
> Initially, I tried to use tarballs off of git and a locally calculated hash
> file, but had issues with BR finding and downloading the tarballs. Will try
> again.

OK, let me know if you run into specific issues.

> > > +GRPC_LICENSE = BSD-3-Clause
> > > +GRPC_LICENSE_FILES = LICENSE
> > > +
> > > +GRPC_DEPENDENCIES = host-grpc gflags gtest c-ares openssl protobuf zlib
> > > +HOST_GRPC_DEPENDENCIES = host-c-ares host-protobuf host-openssl
> > > +
> > > +GRPC_INSTALL_STAGING = YES
> > > +
> > > +GRPC_MAKE_ENV = \
> > > +     CC="$(TARGET_CC)" \
> > > +     CXX="$(TARGET_CXX)" \
> > > +     LD="$(TARGET_CC)" \
> > > +     LDXX="$(TARGET_CXX)" \
> > > +     STRIP="$(TARGET_STRIP)" \
> > > +     PROTOC="$(HOST_DIR)/bin/protoc" \
> > > +     PATH="$(HOST_DIR)/bin:$(PATH)" \  
> >
> > Use BR_PATH instead.
> >  
> > > +     GRPC_CROSS_COMPILE=true \
> > > +     GRPC_CROSS_LDOPTS="$(TARGET_LDFLAGS)" \
> > > +     GRPC_CROSS_AROPTS="$(LTO_PLUGIN)" \
> > > +     HAS_PKG_CONFIG=false \  
> >
> > Why ?
> >  
> 
> I believe this was added per the Makefile:
> 
> # The steps for cross-compiling are as follows:
> # First, clone and make install of grpc using the native compilers for the host.
> # Also, install protoc (e.g., from a package like apt-get)
> # Then clone a fresh grpc for the actual cross-compiled build
> # Set the environment variable GRPC_CROSS_COMPILE to true
> # Set CC, CXX, LD, LDXX, AR, and STRIP to the cross-compiling binaries
> # Also set PROTOBUF_CONFIG_OPTS to indicate cross-compilation to protobuf (e.g.,
> #  PROTOBUF_CONFIG_OPTS="--host=arm-linux --with-protoc=/usr/local/bin/protoc" )
> # Set HAS_PKG_CONFIG=false

Looks weird. Perhaps it's simply to make sure the system-provided
pkg-config doesn't get used. But in Buildroot, we provide in
$(HOST_DIR)/bin, a special pkg-config that returns results that are
valid when cross-compiling.

> > > +     PROTOBUF_CONFIG_OPTS="--host=$(GNU_TARGET_NAME)  
> > --with-protoc=$(HOST_DIR)/bin/protoc" \
> >
> > Seems weird, is grpc going to build its own protobuf ?  
> 
> I believe this uses the host built protobuf compiler picked up from
> host-protobuf.

But why --host=$(GNU_TARGET_NAME) is needed ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2018-09-18 20:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 19:34 [Buildroot] [PATCH 1/1] New package: gRPC, Google's remote procedue calss protocol Mark Fine
2018-09-18 20:00 ` Thomas Petazzoni
2018-09-18 20:26   ` Mark Fine
2018-09-18 20:37     ` Thomas Petazzoni [this message]

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=20180918223752.6b4ccaee@windsurf \
    --to=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox