* Re: [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 [not found] <20231027155221.977752-1-ovlevin@salutedevices.com> @ 2023-10-28 22:35 ` Yann E. MORIN 2023-10-29 12:18 ` Oleg Lyovin via buildroot 2023-10-30 22:00 ` Peter Korsgaard 1 sibling, 1 reply; 3+ messages in thread From: Yann E. MORIN @ 2023-10-28 22:35 UTC (permalink / raw) To: Oleg Lyovin; +Cc: olegartys, James Hilliard, Asaf Kahlon, buildroot 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 2023-10-28 22:35 ` [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 Yann E. MORIN @ 2023-10-29 12:18 ` Oleg Lyovin via buildroot 0 siblings, 0 replies; 3+ messages in thread From: Oleg Lyovin via buildroot @ 2023-10-29 12:18 UTC (permalink / raw) To: Yann E. MORIN; +Cc: olegartys, James Hilliard, Asaf Kahlon, buildroot Yann, On 29.10.2023 01:35, Yann E. MORIN wrote: > 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 > Much appreciate for the great explanation and patch fix! _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 [not found] <20231027155221.977752-1-ovlevin@salutedevices.com> 2023-10-28 22:35 ` [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 Yann E. MORIN @ 2023-10-30 22:00 ` Peter Korsgaard 1 sibling, 0 replies; 3+ messages in thread From: Peter Korsgaard @ 2023-10-30 22:00 UTC (permalink / raw) To: Oleg Lyovin via buildroot Cc: olegartys, James Hilliard, Oleg Lyovin, Asaf Kahlon >>>>> "Oleg" == Oleg Lyovin via buildroot <buildroot@buildroot.org> writes: > 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> Committed to 2023.08.x, thanks. -- Bye, Peter Korsgaard _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-30 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231027155221.977752-1-ovlevin@salutedevices.com>
2023-10-28 22:35 ` [Buildroot] [PATCH 1/1] package/python-pycryptodomex: fix package build with gcc 4.8 Yann E. MORIN
2023-10-29 12:18 ` Oleg Lyovin via buildroot
2023-10-30 22:00 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox