Message ID | 20230429124731.4014394-1-j.neuschaefer@gmx.net |
---|---|
State | Accepted |
Headers | show |
Series | package/micropython: pass $TARGET_LDFLAGS to build | expand |
On Sun, Apr 30, 2023 at 12:47 AM Jonathan Neuschäfer <j.neuschaefer@gmx.net> wrote: > > LDFLAGS need to be passed to the micropython build system via the > LDFLAGS_EXTRA variable, which was so far missing. This patch adds it. > > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Acked-by: Chris Packham <judge.packham@gmail.com> > --- > > (resending due to email issues) > --- > package/micropython/micropython.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk > index 51b45e5e99..5f687c73b9 100644 > --- a/package/micropython/micropython.mk > +++ b/package/micropython/micropython.mk > @@ -36,6 +36,7 @@ MICROPYTHON_MAKE_OPTS += \ > MICROPY_PY_USSL=0 \ > CROSS_COMPILE=$(TARGET_CROSS) \ > CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \ > + LDFLAGS_EXTRA="$(TARGET_LDFLAGS)" \ > CWARN= > > define MICROPYTHON_BUILD_CMDS > -- > 2.39.2 >
Jonathan, All, On 2023-04-29 14:47 +0200, Jonathan Neuschäfer spake thusly: > LDFLAGS need to be passed to the micropython build system via the > LDFLAGS_EXTRA variable, which was so far missing. This patch adds it. Is this fixing an actual issue, or did you just happen to notice by chance? > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Applied to master, thanks. Regards, Yann E. MORIN. > --- > > (resending due to email issues) > --- > package/micropython/micropython.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk > index 51b45e5e99..5f687c73b9 100644 > --- a/package/micropython/micropython.mk > +++ b/package/micropython/micropython.mk > @@ -36,6 +36,7 @@ MICROPYTHON_MAKE_OPTS += \ > MICROPY_PY_USSL=0 \ > CROSS_COMPILE=$(TARGET_CROSS) \ > CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \ > + LDFLAGS_EXTRA="$(TARGET_LDFLAGS)" \ > CWARN= > > define MICROPYTHON_BUILD_CMDS > -- > 2.39.2 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
On Sun, May 07, 2023 at 02:40:56PM +0200, Yann E. MORIN wrote: > Jonathan, All, > > On 2023-04-29 14:47 +0200, Jonathan Neuschäfer spake thusly: > > LDFLAGS need to be passed to the micropython build system via the > > LDFLAGS_EXTRA variable, which was so far missing. This patch adds it. > > Is this fixing an actual issue, or did you just happen to notice by > chance? It fixes the issue that global linker flags (such as from BR2_TARGET_LDFLAGS) are not applied to the micropython build. Extra LDFLAGS are not necessary most of the time, but I was using BR2_TARGET_LDFLAGS="-z text" to check for textrels, because micropython produces one[1] and it causes a crash with musl-libc. Jonathan [1]: https://github.com/micropython/micropython/pull/11353
Jonathan, All, On 2023-05-07 16:17 +0200, Jonathan Neuschäfer spake thusly: > On Sun, May 07, 2023 at 02:40:56PM +0200, Yann E. MORIN wrote: > > Jonathan, All, > > On 2023-04-29 14:47 +0200, Jonathan Neuschäfer spake thusly: > > > LDFLAGS need to be passed to the micropython build system via the > > > LDFLAGS_EXTRA variable, which was so far missing. This patch adds it. > > Is this fixing an actual issue, or did you just happen to notice by > > chance? > It fixes the issue that global linker flags (such as from > BR2_TARGET_LDFLAGS) are not applied to the micropython build. > Extra LDFLAGS are not necessary most of the time, but I was using > BR2_TARGET_LDFLAGS="-z text" to check for textrels, because micropython > produces one[1] and it causes a crash with musl-libc. I see. Thanks for the feedback! Regards, Yann E. MORIN.
>>>>> "Jonathan" == Jonathan Neuschäfer <j.neuschaefer@gmx.net> writes: > LDFLAGS need to be passed to the micropython build system via the > LDFLAGS_EXTRA variable, which was so far missing. This patch adds it. > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Committed to 2023.02.x, thanks.
diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk index 51b45e5e99..5f687c73b9 100644 --- a/package/micropython/micropython.mk +++ b/package/micropython/micropython.mk @@ -36,6 +36,7 @@ MICROPYTHON_MAKE_OPTS += \ MICROPY_PY_USSL=0 \ CROSS_COMPILE=$(TARGET_CROSS) \ CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \ + LDFLAGS_EXTRA="$(TARGET_LDFLAGS)" \ CWARN= define MICROPYTHON_BUILD_CMDS
LDFLAGS need to be passed to the micropython build system via the LDFLAGS_EXTRA variable, which was so far missing. This patch adds it. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> --- (resending due to email issues) --- package/micropython/micropython.mk | 1 + 1 file changed, 1 insertion(+) -- 2.39.2