All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Rafael Gieschke <rafael@gieschke.de>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Cross-compiling git (was: [PATCHv2] add Android support)
Date: Mon, 23 May 2011 00:04:44 -0700 (PDT)	[thread overview]
Message-ID: <m3k4dhzynr.fsf_-_@localhost.localdomain> (raw)
In-Reply-To: <20110519122026.GA30240@sigill.intra.peff.net>

Jeff King <peff@peff.net> writes:
> On Thu, May 19, 2011 at 01:37:53PM +0200, Rafael Gieschke wrote:
> 
> > > (3) Add uname_S = Android (Makefile).
> > > 
> > > The first two would become much easier to justify if presented that
> > > way. At least you won't hear from anybody "we don't want that much code to
> > > not to run git on a phone!", as it is not entirely implausible to imagine
> > > environments without support for one or both of these two facilities.
> > 
> > So, you would prefer to leave out ANDROID and use something like "ifeq
> > ($(uname_S),Android)", so you will have to compile using make
> > uname_S=Android? I would be fine with that, too. But I would also be
> > fine with having to specify the build options on the command line or
> > using a config.mak if you want to keep Android out of the Makefile.
> 
> The point of uname_S is that it would be found automatically. Sadly,
> There is nothing helpful in uname to tell us that we are on android:
> 
>   $ uname -a
>   Linux localhost 2.6.37.4-cyanogenmod-01332-g7f230e8 #1 PREEMPT Tue Apr
>   12 12:54:14 EDT 2011 armv7l GNU/Linux
> 
> You could obviously guess from Linux on that architecture, but that
> seems flaky to me. You can also figure it out by looking around the
> filesystem, but that is not something I'm excited about having the
> Makefile do.
> 
> So I think we are probably stuck either with the user setting an ANDROID
> meta-flag that sets the other flags appropriately, or leaving it up to
> the user to provide a sane config.mak.

By the way, how well Git supports cross-compiling (which from the
thread is necessity to generate binaries for Android)?  `uname -a`
trick works only when compiling on same machine.

./configure supports --host and --build options, but I don't know if
it pass them down to make somehow.  ANDROID=YesPlease seems wasteful:
what about setting HOST or MACHINE, or even uname_* variables, or just
using Autoconf's `host` (in the form of CPU-VENDOR-OS)?

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2011-05-23  7:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 23:23 [PATCHv2] add Android support Rafael Gieschke
2011-05-19  6:18 ` Junio C Hamano
2011-05-19 11:37   ` Rafael Gieschke
2011-05-19 12:20     ` Jeff King
2011-05-19 17:30       ` Rafael Gieschke
2011-05-19 17:38         ` Jeff King
2011-05-19 19:27           ` Rafael Gieschke
2011-05-23  7:04       ` Jakub Narebski [this message]
2011-05-23 14:30         ` Cross-compiling git (was: [PATCHv2] add Android support) Jeff King
2011-05-25 14:20           ` Jakub Narebski
2011-05-25 15:06             ` Jeff King
2011-05-19 14:17     ` [PATCHv2] add Android support Junio C Hamano
2011-05-23  8:01   ` Tor Arntsen

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=m3k4dhzynr.fsf_-_@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=rafael@gieschke.de \
    /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.