Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Oleg Lyovin <ovlevin@salutedevices.com>
Cc: olegartys@gmail.com, James Hilliard <james.hilliard1@gmail.com>,
	Asaf Kahlon <asafka7@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8
Date: Sun, 29 Oct 2023 00:35:03 +0200	[thread overview]
Message-ID: <20231028223503.GF687180@scaer> (raw)
In-Reply-To: <20231027155221.977752-1-ovlevin@salutedevices.com>

Oleg, All,

On 2023-10-27 18:52 +0300, Oleg Lyovin via buildroot spake thusly:
> python-pycryptodomex uses C99 features like variable
> declaration in for-loop statement, while old compilers
> assumes C89 by default.
> 
> This patch explicitly specifies C99 standard.
> 
> Change-Id: I934211714307cea43541167fbc72ff30fb66ad5f
> Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
> ---
>  package/python-pycryptodomex/python-pycryptodomex.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/python-pycryptodomex/python-pycryptodomex.mk b/package/python-pycryptodomex/python-pycryptodomex.mk
> index 3790aa4787..ee8ce6e069 100644
> --- a/package/python-pycryptodomex/python-pycryptodomex.mk
> +++ b/package/python-pycryptodomex/python-pycryptodomex.mk
> @@ -13,5 +13,11 @@ PYTHON_PYCRYPTODOMEX_LICENSE = \
>  	Public Domain (pycrypto original code)
>  PYTHON_PYCRYPTODOMEX_LICENSE_FILES = LICENSE.rst Doc/LEGAL/COPYRIGHT.pycrypto
>  
> +PYTHON_PYCRYPTODOMEX_CFLAGS = -std=c99
> +
> +PYTHON_PYCRYPTODOMEX_ENV = \
> +	CFLAGS="$(PYTHON_PYCRYPTODOMEX_CFLAGS)"
> +HOST_PYTHON_PYCRYPTODOMEX_ENV = $(PYTHON_PYCRYPTODOMEX_ENV)

It is weird to use the target settings for the host settings, even if
they appear to be identical. Instead, we prefer duplicating the
assignment; indeed if the target variable gains target-related settings
in the future, they would inadvertently leak into the host variant.

The second issue is that (AFAIU) passing CFLAGS in the environment will
override the other CFLAGS we set in our infrastructure, and we instead
must complement them, see for example how it's done in python-brotli.

So, I've done that, and... the target settings leaked into the host
variable...

So, I've fixed that so that the host and target variant are based of the
TARGET/HOST_CFLAGS, plus -std=c99

Applied to master with the above fix, thanks.

Regards,
Yann E. MORIN.

>  $(eval $(python-package))
>  $(eval $(host-python-package))
> -- 
> 2.42.0.270.gbcb6cae296
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

       reply	other threads:[~2023-10-28 22:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231027155221.977752-1-ovlevin@salutedevices.com>
2023-10-28 22:35 ` Yann E. MORIN [this message]
2023-10-29 12:18   ` [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 Oleg Lyovin via buildroot
2023-10-30 22:00 ` Peter Korsgaard

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=20231028223503.GF687180@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=asafka7@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=james.hilliard1@gmail.com \
    --cc=olegartys@gmail.com \
    --cc=ovlevin@salutedevices.com \
    /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