* [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error @ 2021-09-13 3:06 Miles Chen 2021-09-13 5:19 ` Stefan Wahren 2021-09-15 13:54 ` Jisheng Zhang 0 siblings, 2 replies; 6+ messages in thread From: Miles Chen @ 2021-09-13 3:06 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang Cc: linux-kernel, linux-riscv, linux-mediatek, wsd_upstream, Miles Chen Fix the following build break by adding a conditional definition of EM_RISCV in order to allow cross-compilation on machines which do not have EM_RISCV definition in their host. build break log from [1]: scripts/sorttable.c:352:7: error: use of undeclared identifier 'EM_RISCV' [1] https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/ Cc: Jisheng Zhang <jszhang@kernel.org> Reported-by: Stefan Wahren <stefan.wahren@i2se.com> Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") Signed-off-by: Miles Chen <miles.chen@mediatek.com> --- scripts/sorttable.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/sorttable.c b/scripts/sorttable.c index f355869c65cd..6ee4fa882919 100644 --- a/scripts/sorttable.c +++ b/scripts/sorttable.c @@ -54,6 +54,10 @@ #define EM_ARCV2 195 #endif +#ifndef EM_RISCV +#define EM_RISCV 243 +#endif + static uint32_t (*r)(const uint32_t *); static uint16_t (*r2)(const uint16_t *); static uint64_t (*r8)(const uint64_t *); -- 2.18.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error 2021-09-13 3:06 [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error Miles Chen @ 2021-09-13 5:19 ` Stefan Wahren 2021-09-15 13:54 ` Jisheng Zhang 1 sibling, 0 replies; 6+ messages in thread From: Stefan Wahren @ 2021-09-13 5:19 UTC (permalink / raw) To: miles.chen Cc: aou, jszhang, linux-kernel, linux-mediatek, linux-riscv, palmer, paul.walmsley, wsd_upstream Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Thanks _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error 2021-09-13 3:06 [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error Miles Chen 2021-09-13 5:19 ` Stefan Wahren @ 2021-09-15 13:54 ` Jisheng Zhang 2021-09-15 16:05 ` Michal Kubecek 1 sibling, 1 reply; 6+ messages in thread From: Jisheng Zhang @ 2021-09-15 13:54 UTC (permalink / raw) To: Miles Chen Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang, linux-kernel, linux-riscv, linux-mediatek, wsd_upstream On Mon, 13 Sep 2021 11:06:25 +0800 Miles Chen <miles.chen@mediatek.com> wrote: > Fix the following build break by adding a conditional definition > of EM_RISCV in order to allow cross-compilation on machines > which do not have EM_RISCV definition in their host. > > build break log from [1]: > scripts/sorttable.c:352:7: error: use of undeclared identifier 'EM_RISCV' Looks strange I can't reproduce it. FWICT, this may be seen with some old toolchains. > > [1] https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/ > > Cc: Jisheng Zhang <jszhang@kernel.org> > Reported-by: Stefan Wahren <stefan.wahren@i2se.com> > Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") > Signed-off-by: Miles Chen <miles.chen@mediatek.com> Reviewed-by: Jisheng Zhang <jszhang@kernel.org> > --- > scripts/sorttable.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/scripts/sorttable.c b/scripts/sorttable.c > index f355869c65cd..6ee4fa882919 100644 > --- a/scripts/sorttable.c > +++ b/scripts/sorttable.c > @@ -54,6 +54,10 @@ > #define EM_ARCV2 195 > #endif > > +#ifndef EM_RISCV > +#define EM_RISCV 243 > +#endif > + > static uint32_t (*r)(const uint32_t *); > static uint16_t (*r2)(const uint16_t *); > static uint64_t (*r8)(const uint64_t *); _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error 2021-09-15 13:54 ` Jisheng Zhang @ 2021-09-15 16:05 ` Michal Kubecek 2021-09-17 4:27 ` Miles Chen 0 siblings, 1 reply; 6+ messages in thread From: Michal Kubecek @ 2021-09-15 16:05 UTC (permalink / raw) To: Jisheng Zhang Cc: Miles Chen, Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang, linux-kernel, linux-riscv, linux-mediatek, wsd_upstream On Wed, Sep 15, 2021 at 09:54:32PM +0800, Jisheng Zhang wrote: > On Mon, 13 Sep 2021 11:06:25 +0800 > Miles Chen <miles.chen@mediatek.com> wrote: > > > Fix the following build break by adding a conditional definition > > of EM_RISCV in order to allow cross-compilation on machines > > which do not have EM_RISCV definition in their host. > > > > build break log from [1]: > > scripts/sorttable.c:352:7: error: use of undeclared identifier 'EM_RISCV' > > Looks strange I can't reproduce it. FWICT, this may be seen with some old > toolchains. I checked the history and EM_RISCV was added to <elf.h> in glibc 2.24 so builds on systems with glibc headers < 2.24 should show this error. Michal > > [1] https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/ > > > > Cc: Jisheng Zhang <jszhang@kernel.org> > > Reported-by: Stefan Wahren <stefan.wahren@i2se.com> > > Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") > > Signed-off-by: Miles Chen <miles.chen@mediatek.com> > > Reviewed-by: Jisheng Zhang <jszhang@kernel.org> > > > --- > > scripts/sorttable.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/scripts/sorttable.c b/scripts/sorttable.c > > index f355869c65cd..6ee4fa882919 100644 > > --- a/scripts/sorttable.c > > +++ b/scripts/sorttable.c > > @@ -54,6 +54,10 @@ > > #define EM_ARCV2 195 > > #endif > > > > +#ifndef EM_RISCV > > +#define EM_RISCV 243 > > +#endif > > + > > static uint32_t (*r)(const uint32_t *); > > static uint16_t (*r2)(const uint16_t *); > > static uint64_t (*r8)(const uint64_t *); > > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error 2021-09-15 16:05 ` Michal Kubecek @ 2021-09-17 4:27 ` Miles Chen 2021-09-21 20:06 ` Markus Mayer 0 siblings, 1 reply; 6+ messages in thread From: Miles Chen @ 2021-09-17 4:27 UTC (permalink / raw) To: Michal Kubecek, Jisheng Zhang, Andrew Morton Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang, linux-kernel, linux-riscv, linux-mediatek, wsd_upstream cc Andrew, On Wed, 2021-09-15 at 18:05 +0200, Michal Kubecek wrote: > On Wed, Sep 15, 2021 at 09:54:32PM +0800, Jisheng Zhang wrote: > > On Mon, 13 Sep 2021 11:06:25 +0800 > > Miles Chen <miles.chen@mediatek.com> wrote: > > > > > Fix the following build break by adding a conditional definition > > > of EM_RISCV in order to allow cross-compilation on machines > > > which do not have EM_RISCV definition in their host. > > > > > > build break log from [1]: > > > scripts/sorttable.c:352:7: error: use of undeclared identifier > > > 'EM_RISCV' > > > > Looks strange I can't reproduce it. FWICT, this may be seen with > > some old > > toolchains. > > I checked the history and EM_RISCV was added to <elf.h> in glibc 2.24 > so > builds on systems with glibc headers < 2.24 should show this error. > > Michal > > > > [1] > > > https://urldefense.com/v3/__https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/__;!!CTRNKA9wMg0ARbw!2wBeUUDf3Z2m7uJLF51GeZnBFWXRlEQrzGJ72JWIT0MPUcS_RgW98QWTXkEjy9-lhg$ > > > > > > > > > Cc: Jisheng Zhang <jszhang@kernel.org> > > > Reported-by: Stefan Wahren <stefan.wahren@i2se.com> > > > Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") > > > Signed-off-by: Miles Chen <miles.chen@mediatek.com> > > > > Reviewed-by: Jisheng Zhang <jszhang@kernel.org> Hi Andrew, I cannot find the maintainer for scripts/sorttable.c, would you pick up this change, please? thanks Miles > > > > > --- > > > scripts/sorttable.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/scripts/sorttable.c b/scripts/sorttable.c > > > index f355869c65cd..6ee4fa882919 100644 > > > --- a/scripts/sorttable.c > > > +++ b/scripts/sorttable.c > > > @@ -54,6 +54,10 @@ > > > #define EM_ARCV2 195 > > > #endif > > > > > > +#ifndef EM_RISCV > > > +#define EM_RISCV 243 > > > +#endif > > > + > > > static uint32_t (*r)(const uint32_t *); > > > static uint16_t (*r2)(const uint16_t *); > > > static uint64_t (*r8)(const uint64_t *); > > > > > > > > _______________________________________________ > > Linux-mediatek mailing list > > Linux-mediatek@lists.infradead.org > > https://urldefense.com/v3/__http://lists.infradead.org/mailman/listinfo/linux-mediatek__;!!CTRNKA9wMg0ARbw!2wBeUUDf3Z2m7uJLF51GeZnBFWXRlEQrzGJ72JWIT0MPUcS_RgW98QWTXkH74aYBWQ$ > > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error 2021-09-17 4:27 ` Miles Chen @ 2021-09-21 20:06 ` Markus Mayer 0 siblings, 0 replies; 6+ messages in thread From: Markus Mayer @ 2021-09-21 20:06 UTC (permalink / raw) To: Miles Chen, Andrew Morton Cc: Michal Kubecek, Jisheng Zhang, Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang, linux-kernel, linux-riscv, linux-mediatek, wsd_upstream On Fri, Sep 17, 2021 at 12:27:24PM +0800, Miles Chen wrote: > cc Andrew, > > On Wed, 2021-09-15 at 18:05 +0200, Michal Kubecek wrote: > > On Wed, Sep 15, 2021 at 09:54:32PM +0800, Jisheng Zhang wrote: > > > On Mon, 13 Sep 2021 11:06:25 +0800 > > > Miles Chen <miles.chen@mediatek.com> wrote: > > > > > > > Fix the following build break by adding a conditional > > > > definition of EM_RISCV in order to allow cross-compilation on > > > > machines which do not have EM_RISCV definition in their host. > > > > > > > > build break log from [1]: > > > > scripts/sorttable.c:352:7: error: use of undeclared identifier > > > > 'EM_RISCV' > > > > > > Looks strange I can't reproduce it. FWICT, this may be seen with > > > some old toolchains. > > > > I checked the history and EM_RISCV was added to <elf.h> in glibc > > 2.24 so builds on systems with glibc headers < 2.24 should show > > this error. This is happening for us when we try to build ARM(64) cross-builds on Ubuntu 16.04. Yes, I know, that's a fairly old distro. At the same time it isn't ancient (extended support is still available), and it *should* be possible to build the 5.15 kernel on it. And yes, some of our build machines have been updated to Ubuntu 20.04, but not all of them. We'll get there eventually. For now this error is posing a bit of a problem. > > Michal > > > > > > [1] > > > > https://urldefense.com/v3/__https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/__;!!CTRNKA9wMg0ARbw!2wBeUUDf3Z2m7uJLF51GeZnBFWXRlEQrzGJ72JWIT0MPUcS_RgW98QWTXkEjy9-lhg$ > > > > > > > > > > > > Cc: Jisheng Zhang <jszhang@kernel.org> > > > > Reported-by: Stefan Wahren <stefan.wahren@i2se.com> > > > > Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") > > > > Signed-off-by: Miles Chen <miles.chen@mediatek.com> > > > > > > Reviewed-by: Jisheng Zhang <jszhang@kernel.org> > > > Hi Andrew, > > I cannot find the maintainer for scripts/sorttable.c, would you pick > up this change, please? Yes, please. I've been looking at failed nightly builds since September 12. It's only a forward looking build (so nothing mission critical), but it would still be nice to have it build again. Regards, -Markus > thanks > Miles > > > > > > > > --- > > > > scripts/sorttable.c | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > > > > > > diff --git a/scripts/sorttable.c b/scripts/sorttable.c > > > > index f355869c65cd..6ee4fa882919 100644 > > > > --- a/scripts/sorttable.c > > > > +++ b/scripts/sorttable.c > > > > @@ -54,6 +54,10 @@ > > > > #define EM_ARCV2 195 > > > > #endif > > > > > > > > +#ifndef EM_RISCV > > > > +#define EM_RISCV 243 > > > > +#endif > > > > + > > > > static uint32_t (*r)(const uint32_t *); > > > > static uint16_t (*r2)(const uint16_t *); > > > > static uint64_t (*r8)(const uint64_t *); _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-21 20:13 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-13 3:06 [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error Miles Chen 2021-09-13 5:19 ` Stefan Wahren 2021-09-15 13:54 ` Jisheng Zhang 2021-09-15 16:05 ` Michal Kubecek 2021-09-17 4:27 ` Miles Chen 2021-09-21 20:06 ` Markus Mayer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).