Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] kvmtool: new package
Date: Wed, 24 Jun 2015 15:27:31 -0300	[thread overview]
Message-ID: <558AF693.90307@free-electrons.com> (raw)
In-Reply-To: <55894DE8.8060706@mind.be>

On 23/06/15 09:15, Arnout Vandecappelle wrote:

>> +	depends on \
>> +		BR2_aarch64 || BR2_arm       || BR2_armeb || BR2_i386 || \
>> +		BR2_mips    || BR2_x86_64
>
>   Line splitting, whitespace and ordering is a bit weird I think, why not
>
> 	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_mips || \
> 		BR2_i386 || BR2_x86_64

Hi Arnout.
At first the architecture list was longer but i started chopping off 
because of build failures for architectures that weren't my target and 
this particular piece of software doesn't work in general with qemu 
(since it normally doesn't emulate kvm features of the processors, so no 
kvm-in-kvm facility to test with).
The weird indentation was from some other $random package, though i 
don't recall which one it was.

>> +comment "kvmtool needs a (e)glibc or musl toolchain"
>> +	depends on BR2_USE_MMU
>> +	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
>> +	depends on BR2_i386 || BR2_mips || BR2_x86_64
>
>   It makes more sense to put the arch-depends together, so the arches just after MMU.

Ok.

>> +comment "kvmtool needs a (e)glibc or musl toolchain w/ dynamic library"
>> +	depends on BR2_USE_MMU
>> +        depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) || \
>     ^^^^^^^^ spaces iso. tab.
>
>   Also, glibc can't be static, but probably the way you have it here is clearer.

Yes, i tried to minimize the amount of comments and conditionals here.

>> +		BR2_STATIC_LIBS
>> +	depends on BR2_aarch64 || BR2_arm || BR2_armeb
>
>   Same here: arches just after MMU.

Ok.

>> +# Disable -Werror, otherwise musl is not happy
>> +KVMTOOL_MAKE_OPTS = \
>> +	CROSS_COMPILE="$(TARGET_CROSS)" \
>> +	LDFLAGS="$(TARGET_LDFLAGS) $(KVMTOOL_EXTRA_LDFLAGS)" \
>> +	WERROR=0
>
>   Shouldn't we pass TARGET_CFLAGS and friends as well? Perhaps put
> TARGET_CONFIGURE_OPTS in the environment?

Depending on the architecture this package changes target ABI and even 
builds a BIOS stub for x86/x86_64 (changing for instance cpu target), 
forcing CFLAGS/LDFLAGS on it is a bad idea in general which causes build 
failures for certain combinations, at least for x86*.
It's by far the sickest package i've met regarding toolchain tricks, 
with the static-in-dynamic init helper converted via ld as an example.
Regards.

      reply	other threads:[~2015-06-24 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 13:23 [Buildroot] [PATCH v2] kvmtool: new package gustavo.zacarias at free-electrons.com
2015-06-23 12:15 ` Arnout Vandecappelle
2015-06-24 18:27   ` Gustavo Zacarias [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=558AF693.90307@free-electrons.com \
    --to=gustavo.zacarias@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox