All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] 回复:[PATCH v1] include/mk/env_post.mk: enable __ANDROID__ definition for Android build
Date: Wed, 10 Apr 2019 16:16:15 +0200	[thread overview]
Message-ID: <20190410141615.GA10303@x230> (raw)
In-Reply-To: <db7687f3-40ca-495e-aa76-efcce204cda7.ruanzw@xiaopeng.com>

Hi Sandeep, Steve,

> Could anyone help me to review this patch? This is useful to cross-compile ltp for Android without specifying '-D__ANDROID__' in configure step.

> Thanks!
> Zhengwang


> ------------------------------------------------------------------
> 发件人:Zhengwang Ruan <ruanzw@xiaopeng.com>
> 发送时间:2019年4月9日(星期二) 12:05
> 收件人:ltp <ltp@lists.linux.it>
> 抄 送:Zhengwang Ruan <ruanzw@xiaopeng.com>
> 主 题:[PATCH v1] include/mk/env_post.mk: enable __ANDROID__ definition for Android build

> Enable the __ANDROID__ definition by default for Android build, otherwise we
> should manually enable it by configure command.

> Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
> ---
>  include/mk/env_post.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> index 913bdf5..7953e0a 100644
> --- a/include/mk/env_post.mk
> +++ b/include/mk/env_post.mk
> @@ -44,7 +44,7 @@ endif
>  ifeq ($(ANDROID),1)
>  # There are many undeclared functions, it's best not to accidentally overlook
>  # them.
> -CFLAGS    += -Werror-implicit-function-declaration
> +CFLAGS    += -Werror-implicit-function-declaration -D__ANDROID__
Would adding __ANDROID__ definition help building LTP with distro
cross-compiler? (i.e. no NDK, no inside AOSP tree)?
I guess so and therefore, I'd be for this change.
I see some projects added it as well (busybox [1] [2], dnsmasq [3]).
BTW: where is defined for AOSP and NDK?

BTW (@cyril): I guess -Werror-implicit-function-declaration is the code which
requires adding <string.h> and <strings.h> (see my fix 4053a2551 ("lib: Add
missing <string.h> and <strings.h> includes")), I'd be for either adding it to
for all or removing it.

>  LDFLAGS    += -L$(top_builddir)/lib/android_libpthread
>  LDFLAGS    += -L$(top_builddir)/lib/android_librt

Kind regards,
Petr

[1] https://git.busybox.net/busybox/tree/configs/android_defconfig
[2] https://git.busybox.net/busybox/tree/configs/android_ndk_defconfig
[3] http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob_plain;f=bld/Android.mk;hb=HEAD

  reply	other threads:[~2019-04-10 14:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09  4:05 [LTP] [PATCH v1] include/mk/env_post.mk: enable __ANDROID__ definition for Android build Zhengwang Ruan
2019-04-09 16:45 ` [LTP] 回复:[PATCH " =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-10 14:16   ` Petr Vorel [this message]
2019-04-11  3:38     ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-11 16:27     ` Sandeep Patil
2019-04-11 17:37       ` Petr Vorel
2019-04-11 23:40         ` Petr Vorel
2019-04-12  4:45           ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12  6:28             ` Petr Vorel
2019-04-12 16:15               ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12 19:48                 ` Sandeep Patil
2019-04-16 12:27                   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-17 16:39                     ` Sandeep Patil
2019-04-17 17:06                       ` Petr Vorel
2019-04-19 15:49                         ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-21 22:10                           ` Petr Vorel
2019-04-23 17:28                             ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-23 20:38                               ` Petr Vorel
2019-04-12  3:09       ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-24  9:14 ` [LTP] [PATCH " Petr Vorel
2019-04-24 19:23   ` Steve Muckle
2019-04-24 20:19     ` Petr Vorel
2019-04-25  3:08     ` =?unknown-8bit?b?6Ziu5q2j5pe6?=

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=20190410141615.GA10303@x230 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.