All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 6/7] package/flex: disable reallocarray
Date: Wed, 27 Sep 2017 23:05:45 +0200	[thread overview]
Message-ID: <20170927210545.GG2903@scaer> (raw)
In-Reply-To: <20170923212414.16744-7-romain.naour@gmail.com>

Romain, All,

On 2017-09-23 23:24 +0200, Romain Naour spake thusly:
> This doesn't compile with glibc 2.26 where reallocarray() as been introduced.
> 
> It's a nasty issue, when reallocarray() is available for the target, flex will
> build a small tool called stage1flex for the host (using _FOR_BUILD) but with
> the config.h generated for the target.
> 
> When the host doesn't have a glibc >= 2.26, reallocarray() is never defined
> while building stage1flex:
> 
> misc.c:147:8: warning : implicit declaration of function ? reallocarray ?
> [-Wimplicit-function-declaration]
>   mem = reallocarray(NULL, (size_t) size, element_size);
>         ^~~~~~~~~~~~
> misc.c:147:6: warning : assignment makes pointer from integer without a cast
> [-Wint-conversion]
>   mem = reallocarray(NULL, (size_t) size, element_size);
>       ^
> 
> Disable reallocarray for now, reallocarray() support may be
> enabled in a followup patch.

What about https://patchwork.ozlabs.org/patch/813474/ which just
backports a fix from upstream (or I'm mislead)?

Regards,
Yann E. MORIN.

> Fixes:
> stage1flex-misc.o: In function `allocate_array':
> misc.c:(.text+0x38f): undefined reference to `reallocarray'
> stage1flex-misc.o: In function `reallocate_array':
> misc.c:(.text+0xc8a): undefined reference to `reallocarray'
> collect2: error: ld returned 1 exit status
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/flex/flex.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/flex/flex.mk b/package/flex/flex.mk
> index b782699..0196624 100644
> --- a/package/flex/flex.mk
> +++ b/package/flex/flex.mk
> @@ -10,7 +10,8 @@ FLEX_INSTALL_STAGING = YES
>  FLEX_LICENSE = FLEX
>  FLEX_LICENSE_FILES = COPYING
>  FLEX_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) host-m4
> -FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4
> +FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4 \
> +	ac_cv_func_reallocarray=no
>  HOST_FLEX_DEPENDENCIES = host-m4
>  
>  define FLEX_DISABLE_PROGRAM
> -- 
> 2.9.5
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-09-27 21:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-23 21:23 [Buildroot] [PATCH v3 0/7] glibc: bump to 2.26 Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 1/7] package/gcc: fix build issue with glibc 2.26 Romain Naour
2017-09-27 20:29   ` Yann E. MORIN
2017-09-23 21:24 ` [Buildroot] [PATCH v3 2/7] " Romain Naour
2017-09-27 20:29   ` Yann E. MORIN
2017-09-23 21:24 ` [Buildroot] [PATCH v3 3/7] package/glibc: needs kernel headers >= 3.10 on powerpc64le Romain Naour
2017-09-27 20:32   ` Yann E. MORIN
2017-09-23 21:24 ` [Buildroot] [PATCH v3 4/7] package/gcc: enable float128 on powerpc64le with glibc >= 2.26 toolchains Romain Naour
2017-09-27 20:40   ` Yann E. MORIN
2017-09-27 21:14     ` Arnout Vandecappelle
2017-09-23 21:24 ` [Buildroot] [PATCH v3 5/7] package/diffutils: disable getopt_long replacement with glibc Romain Naour
2017-09-27 21:01   ` Yann E. MORIN
2017-09-23 21:24 ` [Buildroot] [PATCH v3 6/7] package/flex: disable reallocarray Romain Naour
2017-09-27 21:05   ` Yann E. MORIN [this message]
2017-09-27 21:11     ` Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 7/7] package/glibc: bump to 2.26 Romain Naour
2017-09-24  9:16   ` Bernd Kuhls
2017-09-23 21:24 ` [Buildroot] [PATCH v3 0/7] glibc: " Romain Naour
2017-09-23 21:28   ` Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 1/7] package/gcc: fix build issue with glibc 2.26 Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 2/7] " Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 3/7] package/glibc: needs kernel headers >= 3.10 on powerpc64le Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 4/7] package/gcc: enable float128 on powerpc64le with glibc >= 2.26 toolchains Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 5/7] package/diffutils: disable getopt_long replacement with glibc Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 6/7] package/flex: disable reallocarray Romain Naour
2017-09-23 21:24 ` [Buildroot] [PATCH v3 7/7] package/glibc: bump to 2.26 Romain Naour
2017-09-27 21:12 ` [Buildroot] [PATCH v3 0/7] glibc: " Arnout Vandecappelle
2017-10-16 16:25   ` Yann E. MORIN

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=20170927210545.GG2903@scaer \
    --to=yann.morin.1998@free.fr \
    --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 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.