* [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture @ 2024-07-22 13:11 Woodrow Douglass via buildroot 2024-07-22 13:41 ` Thomas Petazzoni via buildroot 2024-07-22 14:30 ` Woodrow Douglass via buildroot 0 siblings, 2 replies; 10+ messages in thread From: Woodrow Douglass via buildroot @ 2024-07-22 13:11 UTC (permalink / raw) To: buildroot; +Cc: Woodrow Douglass Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> --- .../0001-xtensa-text-section-literals.patch | 30 +++++++++++++++++++ package/chicken/chicken.mk | 3 +- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 package/chicken/0001-xtensa-text-section-literals.patch diff --git a/package/chicken/0001-xtensa-text-section-literals.patch b/package/chicken/0001-xtensa-text-section-literals.patch new file mode 100644 index 0000000000..b93aaf9e21 --- /dev/null +++ b/package/chicken/0001-xtensa-text-section-literals.patch @@ -0,0 +1,30 @@ +From e8d177f4d4e1c6bc41787ea1621e323ff4ad493e Mon Sep 17 00:00:00 2001 +From: Woodrow Douglass <wdouglass@carnegierobotics.com> +Date: Mon, 22 Jul 2024 08:50:37 -0400 +Subject: [PATCH] Move literals into text section for xtensa architecture + +Upstream: https://bugs.call-cc.org/ticket/1840 +Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> +--- + Makefile.linux | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile.linux b/Makefile.linux +index b628cda4..e97c2b94 100644 +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -52,6 +52,11 @@ USES_SONAME = yes + + # architectures + ++ifeq ($(ARCH),xtensa) ++C_COMPILER_OPTIONS += -mtext-section-literals ++LINKER_OPTIONS += -mtext-section-literals ++endif ++ + ifeq ($(ARCH),x32) + C_COMPILER_OPTIONS += -mx32 + LINKER_OPTIONS += -mx32 +-- +2.39.2 + diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk index 2667f7823d..8c7c1c4d8a 100644 --- a/package/chicken/chicken.mk +++ b/package/chicken/chicken.mk @@ -11,9 +11,8 @@ CHICKEN_LICENSE_FILES = LICENSE CHICKEN_CPE_ID_VENDOR = call-cc CHICKEN_INSTALL_STAGING = YES -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. CHICKEN_MAKE_OPTS = \ - ARCH=unused \ + ARCH=$(BR2_NORMALIZED_ARCH) \ C_COMPILER="$(TARGET_CC)" \ CXX_COMPILER="$(TARGET_CXX)" \ PREFIX=/usr \ -- 2.39.2 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 13:11 [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture Woodrow Douglass via buildroot @ 2024-07-22 13:41 ` Thomas Petazzoni via buildroot 2024-07-22 14:30 ` Woodrow Douglass via buildroot 1 sibling, 0 replies; 10+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-07-22 13:41 UTC (permalink / raw) To: Woodrow Douglass via buildroot; +Cc: Woodrow Douglass Hello Woodrow, On Mon, 22 Jul 2024 09:11:16 -0400 Woodrow Douglass via buildroot <buildroot@buildroot.org> wrote: > Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> Thanks for the patch. Would be good to have a non-empty commit message. > -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. > CHICKEN_MAKE_OPTS = \ > - ARCH=unused \ > + ARCH=$(BR2_NORMALIZED_ARCH) \ Are you sure that all values of BR2_NORMALIZED_ARCH are supported by the chicken build system? What happens when the value passed is unknown to the chicken build system? Best regards, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 13:11 [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture Woodrow Douglass via buildroot 2024-07-22 13:41 ` Thomas Petazzoni via buildroot @ 2024-07-22 14:30 ` Woodrow Douglass via buildroot 2024-07-22 14:57 ` Baruch Siach via buildroot 2024-07-22 15:08 ` Woodrow Douglass via buildroot 1 sibling, 2 replies; 10+ messages in thread From: Woodrow Douglass via buildroot @ 2024-07-22 14:30 UTC (permalink / raw) To: buildroot; +Cc: Woodrow Douglass This solves a build problem -- by default xtensa-gcc puts literals in a different section of memory then the program text, and chicken is a very literal-heavy program, so they don't all fit there. This avoids that problem. Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> --- .../0001-xtensa-text-section-literals.patch | 30 +++++++++++++++++++ package/chicken/chicken.mk | 14 +++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 package/chicken/0001-xtensa-text-section-literals.patch diff --git a/package/chicken/0001-xtensa-text-section-literals.patch b/package/chicken/0001-xtensa-text-section-literals.patch new file mode 100644 index 0000000000..b93aaf9e21 --- /dev/null +++ b/package/chicken/0001-xtensa-text-section-literals.patch @@ -0,0 +1,30 @@ +From e8d177f4d4e1c6bc41787ea1621e323ff4ad493e Mon Sep 17 00:00:00 2001 +From: Woodrow Douglass <wdouglass@carnegierobotics.com> +Date: Mon, 22 Jul 2024 08:50:37 -0400 +Subject: [PATCH] Move literals into text section for xtensa architecture + +Upstream: https://bugs.call-cc.org/ticket/1840 +Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> +--- + Makefile.linux | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile.linux b/Makefile.linux +index b628cda4..e97c2b94 100644 +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -52,6 +52,11 @@ USES_SONAME = yes + + # architectures + ++ifeq ($(ARCH),xtensa) ++C_COMPILER_OPTIONS += -mtext-section-literals ++LINKER_OPTIONS += -mtext-section-literals ++endif ++ + ifeq ($(ARCH),x32) + C_COMPILER_OPTIONS += -mx32 + LINKER_OPTIONS += -mx32 +-- +2.39.2 + diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk index 2667f7823d..d0e456f92a 100644 --- a/package/chicken/chicken.mk +++ b/package/chicken/chicken.mk @@ -11,9 +11,19 @@ CHICKEN_LICENSE_FILES = LICENSE CHICKEN_CPE_ID_VENDOR = call-cc CHICKEN_INSTALL_STAGING = YES -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. +#Chicken only uses the "arch" variable for some special-case compile arguments +#If it's empty, it tries to detect the arch host +#Handle some cases, but in most cases the normalized arch is fine here +ifeq ($(BR2_NORMALIZED_ARCH),"i386") +CHICKEN_ARCH="x32" +else ifeq ($(BR2_NORMALIZED_ARCH),"x86_64") +CHICKEN_ARCH="x86-64" +else +CHICKEN_ARCH=$(BR2_NORMALIZED_ARCH) +endif + CHICKEN_MAKE_OPTS = \ - ARCH=unused \ + ARCH=$(CHICKEN_ARCH) \ C_COMPILER="$(TARGET_CC)" \ CXX_COMPILER="$(TARGET_CXX)" \ PREFIX=/usr \ -- 2.39.2 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 14:30 ` Woodrow Douglass via buildroot @ 2024-07-22 14:57 ` Baruch Siach via buildroot 2024-07-22 15:07 ` Woody Douglass via buildroot 2024-07-22 15:08 ` Woodrow Douglass via buildroot 1 sibling, 1 reply; 10+ messages in thread From: Baruch Siach via buildroot @ 2024-07-22 14:57 UTC (permalink / raw) To: Woodrow Douglass via buildroot; +Cc: Woodrow Douglass Hi Woodrow, On Mon, Jul 22 2024, Woodrow Douglass via buildroot wrote: > This solves a build problem -- by default xtensa-gcc puts literals in a > different section of memory then the program text, and chicken is a very > literal-heavy program, so they don't all fit there. This avoids that problem. > > Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> > --- > .../0001-xtensa-text-section-literals.patch | 30 +++++++++++++++++++ > package/chicken/chicken.mk | 14 +++++++-- > 2 files changed, 42 insertions(+), 2 deletions(-) > create mode 100644 package/chicken/0001-xtensa-text-section-literals.patch > > diff --git a/package/chicken/0001-xtensa-text-section-literals.patch b/package/chicken/0001-xtensa-text-section-literals.patch > new file mode 100644 > index 0000000000..b93aaf9e21 > --- /dev/null > +++ b/package/chicken/0001-xtensa-text-section-literals.patch > @@ -0,0 +1,30 @@ > +From e8d177f4d4e1c6bc41787ea1621e323ff4ad493e Mon Sep 17 00:00:00 2001 > +From: Woodrow Douglass <wdouglass@carnegierobotics.com> > +Date: Mon, 22 Jul 2024 08:50:37 -0400 > +Subject: [PATCH] Move literals into text section for xtensa architecture > + > +Upstream: https://bugs.call-cc.org/ticket/1840 > +Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> > +--- > + Makefile.linux | 5 +++++ > + 1 file changed, 5 insertions(+) > + > +diff --git a/Makefile.linux b/Makefile.linux > +index b628cda4..e97c2b94 100644 > +--- a/Makefile.linux > ++++ b/Makefile.linux > +@@ -52,6 +52,11 @@ USES_SONAME = yes > + > + # architectures > + > ++ifeq ($(ARCH),xtensa) > ++C_COMPILER_OPTIONS += -mtext-section-literals > ++LINKER_OPTIONS += -mtext-section-literals > ++endif > ++ > + ifeq ($(ARCH),x32) > + C_COMPILER_OPTIONS += -mx32 > + LINKER_OPTIONS += -mx32 > +-- > +2.39.2 > + > diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk > index 2667f7823d..d0e456f92a 100644 > --- a/package/chicken/chicken.mk > +++ b/package/chicken/chicken.mk > @@ -11,9 +11,19 @@ CHICKEN_LICENSE_FILES = LICENSE > CHICKEN_CPE_ID_VENDOR = call-cc > CHICKEN_INSTALL_STAGING = YES > > -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. > +#Chicken only uses the "arch" variable for some special-case compile arguments > +#If it's empty, it tries to detect the arch host > +#Handle some cases, but in most cases the normalized arch is fine here > +ifeq ($(BR2_NORMALIZED_ARCH),"i386") > +CHICKEN_ARCH="x32" Are you sure about that? x32 requires the 64-bit extension for x86 processors (https://en.wikipedia.org/wiki/X32_ABI). i386 is for 32-bit capable processors. baruch > +else ifeq ($(BR2_NORMALIZED_ARCH),"x86_64") > +CHICKEN_ARCH="x86-64" > +else > +CHICKEN_ARCH=$(BR2_NORMALIZED_ARCH) > +endif > + > CHICKEN_MAKE_OPTS = \ > - ARCH=unused \ > + ARCH=$(CHICKEN_ARCH) \ > C_COMPILER="$(TARGET_CC)" \ > CXX_COMPILER="$(TARGET_CXX)" \ > PREFIX=/usr \ -- ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 14:57 ` Baruch Siach via buildroot @ 2024-07-22 15:07 ` Woody Douglass via buildroot 0 siblings, 0 replies; 10+ messages in thread From: Woody Douglass via buildroot @ 2024-07-22 15:07 UTC (permalink / raw) To: Baruch Siach, Woodrow Douglass via buildroot Baruch, Thank you for pointing this out! I incorrectly assumed this was a different spelling -- I'll revise and resubmit in a few minutes. Thanks, Woodrow Douglass On 7/22/24 10:57, Baruch Siach wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender. > > > Hi Woodrow, > > On Mon, Jul 22 2024, Woodrow Douglass via buildroot wrote: >> This solves a build problem -- by default xtensa-gcc puts literals in a >> different section of memory then the program text, and chicken is a very >> literal-heavy program, so they don't all fit there. This avoids that problem. >> >> Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> >> --- >> .../0001-xtensa-text-section-literals.patch | 30 +++++++++++++++++++ >> package/chicken/chicken.mk | 14 +++++++-- >> 2 files changed, 42 insertions(+), 2 deletions(-) >> create mode 100644 package/chicken/0001-xtensa-text-section-literals.patch >> >> diff --git a/package/chicken/0001-xtensa-text-section-literals.patch b/package/chicken/0001-xtensa-text-section-literals.patch >> new file mode 100644 >> index 0000000000..b93aaf9e21 >> --- /dev/null >> +++ b/package/chicken/0001-xtensa-text-section-literals.patch >> @@ -0,0 +1,30 @@ >> +From e8d177f4d4e1c6bc41787ea1621e323ff4ad493e Mon Sep 17 00:00:00 2001 >> +From: Woodrow Douglass <wdouglass@carnegierobotics.com> >> +Date: Mon, 22 Jul 2024 08:50:37 -0400 >> +Subject: [PATCH] Move literals into text section for xtensa architecture >> + >> +Upstream: https://bugs.call-cc.org/ticket/1840 >> +Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> >> +--- >> + Makefile.linux | 5 +++++ >> + 1 file changed, 5 insertions(+) >> + >> +diff --git a/Makefile.linux b/Makefile.linux >> +index b628cda4..e97c2b94 100644 >> +--- a/Makefile.linux >> ++++ b/Makefile.linux >> +@@ -52,6 +52,11 @@ USES_SONAME = yes >> + >> + # architectures >> + >> ++ifeq ($(ARCH),xtensa) >> ++C_COMPILER_OPTIONS += -mtext-section-literals >> ++LINKER_OPTIONS += -mtext-section-literals >> ++endif >> ++ >> + ifeq ($(ARCH),x32) >> + C_COMPILER_OPTIONS += -mx32 >> + LINKER_OPTIONS += -mx32 >> +-- >> +2.39.2 >> + >> diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk >> index 2667f7823d..d0e456f92a 100644 >> --- a/package/chicken/chicken.mk >> +++ b/package/chicken/chicken.mk >> @@ -11,9 +11,19 @@ CHICKEN_LICENSE_FILES = LICENSE >> CHICKEN_CPE_ID_VENDOR = call-cc >> CHICKEN_INSTALL_STAGING = YES >> >> -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. >> +#Chicken only uses the "arch" variable for some special-case compile arguments >> +#If it's empty, it tries to detect the arch host >> +#Handle some cases, but in most cases the normalized arch is fine here >> +ifeq ($(BR2_NORMALIZED_ARCH),"i386") >> +CHICKEN_ARCH="x32" > Are you sure about that? x32 requires the 64-bit extension for x86 > processors (https://en.wikipedia.org/wiki/X32_ABI). i386 is for 32-bit > capable processors. > > baruch > >> +else ifeq ($(BR2_NORMALIZED_ARCH),"x86_64") >> +CHICKEN_ARCH="x86-64" >> +else >> +CHICKEN_ARCH=$(BR2_NORMALIZED_ARCH) >> +endif >> + >> CHICKEN_MAKE_OPTS = \ >> - ARCH=unused \ >> + ARCH=$(CHICKEN_ARCH) \ >> C_COMPILER="$(TARGET_CC)" \ >> CXX_COMPILER="$(TARGET_CXX)" \ >> PREFIX=/usr \ > -- > ~. .~ Tk Open Systems > =}------------------------------------------------ooO--U--Ooo------------{= > - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 14:30 ` Woodrow Douglass via buildroot 2024-07-22 14:57 ` Baruch Siach via buildroot @ 2024-07-22 15:08 ` Woodrow Douglass via buildroot 2024-07-22 16:15 ` Thomas Petazzoni via buildroot 1 sibling, 1 reply; 10+ messages in thread From: Woodrow Douglass via buildroot @ 2024-07-22 15:08 UTC (permalink / raw) To: buildroot; +Cc: Woodrow Douglass This solves a build problem -- by default xtensa-gcc puts literals in a different section of memory then the program text, and chicken is a very literal-heavy program, so they don't all fit there. This avoids that problem. Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> --- .../0001-xtensa-text-section-literals.patch | 30 +++++++++++++++++++ package/chicken/chicken.mk | 12 ++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 package/chicken/0001-xtensa-text-section-literals.patch diff --git a/package/chicken/0001-xtensa-text-section-literals.patch b/package/chicken/0001-xtensa-text-section-literals.patch new file mode 100644 index 0000000000..b93aaf9e21 --- /dev/null +++ b/package/chicken/0001-xtensa-text-section-literals.patch @@ -0,0 +1,30 @@ +From e8d177f4d4e1c6bc41787ea1621e323ff4ad493e Mon Sep 17 00:00:00 2001 +From: Woodrow Douglass <wdouglass@carnegierobotics.com> +Date: Mon, 22 Jul 2024 08:50:37 -0400 +Subject: [PATCH] Move literals into text section for xtensa architecture + +Upstream: https://bugs.call-cc.org/ticket/1840 +Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> +--- + Makefile.linux | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile.linux b/Makefile.linux +index b628cda4..e97c2b94 100644 +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -52,6 +52,11 @@ USES_SONAME = yes + + # architectures + ++ifeq ($(ARCH),xtensa) ++C_COMPILER_OPTIONS += -mtext-section-literals ++LINKER_OPTIONS += -mtext-section-literals ++endif ++ + ifeq ($(ARCH),x32) + C_COMPILER_OPTIONS += -mx32 + LINKER_OPTIONS += -mx32 +-- +2.39.2 + diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk index 2667f7823d..3679a8afe2 100644 --- a/package/chicken/chicken.mk +++ b/package/chicken/chicken.mk @@ -11,9 +11,17 @@ CHICKEN_LICENSE_FILES = LICENSE CHICKEN_CPE_ID_VENDOR = call-cc CHICKEN_INSTALL_STAGING = YES -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. +#Chicken only uses the "arch" variable for some special-case compile arguments +#If it's empty, it tries to detect the arch host +#x86-64 is spelled differently, but in most cases the normalized arch is fine here +ifeq ($(BR2_NORMALIZED_ARCH),"x86_64") +CHICKEN_ARCH="x86-64" +else +CHICKEN_ARCH=$(BR2_NORMALIZED_ARCH) +endif + CHICKEN_MAKE_OPTS = \ - ARCH=unused \ + ARCH=$(CHICKEN_ARCH) \ C_COMPILER="$(TARGET_CC)" \ CXX_COMPILER="$(TARGET_CXX)" \ PREFIX=/usr \ -- 2.39.2 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 15:08 ` Woodrow Douglass via buildroot @ 2024-07-22 16:15 ` Thomas Petazzoni via buildroot 2024-07-22 17:24 ` Woody Douglass via buildroot 2024-07-22 17:31 ` Woodrow Douglass via buildroot 0 siblings, 2 replies; 10+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-07-22 16:15 UTC (permalink / raw) To: Woodrow Douglass via buildroot; +Cc: Woodrow Douglass Hello Woodrow, On Mon, 22 Jul 2024 11:08:33 -0400 Woodrow Douglass via buildroot <buildroot@buildroot.org> wrote: > -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. > +#Chicken only uses the "arch" variable for some special-case compile arguments > +#If it's empty, it tries to detect the arch host > +#x86-64 is spelled differently, but in most cases the normalized arch is fine here You did not reply to my e-mail on an earlier version in which I asked some questions. I would prefer if we were not blindly passing $(BR2_NORMALIZED_ARCH) here, can we instead handle only the cases for which chicken does something specific based on ARCH=, and for all other cases, pass ARCH=unused, as we used to do? Thanks, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 16:15 ` Thomas Petazzoni via buildroot @ 2024-07-22 17:24 ` Woody Douglass via buildroot 2024-07-22 17:31 ` Woodrow Douglass via buildroot 1 sibling, 0 replies; 10+ messages in thread From: Woody Douglass via buildroot @ 2024-07-22 17:24 UTC (permalink / raw) To: Thomas Petazzoni, Woodrow Douglass via buildroot Thomas, Sorry about that, i was replying with `git send-email`, and it didn't work the way that I expected. I'll update to filter back to `unused` and attempt to reply to this email. Thank you for your patience, and all your work maintaining buildroot! Woodrow Douglass On 7/22/24 12:15, Thomas Petazzoni wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender. > > > Hello Woodrow, > > On Mon, 22 Jul 2024 11:08:33 -0400 > Woodrow Douglass via buildroot <buildroot@buildroot.org> wrote: > >> -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. >> +#Chicken only uses the "arch" variable for some special-case compile arguments >> +#If it's empty, it tries to detect the arch host >> +#x86-64 is spelled differently, but in most cases the normalized arch is fine here > You did not reply to my e-mail on an earlier version in which I asked > some questions. I would prefer if we were not blindly passing > $(BR2_NORMALIZED_ARCH) here, can we instead handle only the cases for > which chicken does something specific based on ARCH=, and for all other > cases, pass ARCH=unused, as we used to do? > > Thanks, > > Thomas > -- > Thomas Petazzoni, co-owner and CEO, Bootlin > Embedded Linux and Kernel engineering and training > https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 16:15 ` Thomas Petazzoni via buildroot 2024-07-22 17:24 ` Woody Douglass via buildroot @ 2024-07-22 17:31 ` Woodrow Douglass via buildroot 2024-08-02 17:10 ` Thomas Petazzoni via buildroot 1 sibling, 1 reply; 10+ messages in thread From: Woodrow Douglass via buildroot @ 2024-07-22 17:31 UTC (permalink / raw) To: buildroot; +Cc: Woodrow Douglass This solves a build problem -- by default xtensa-gcc puts literals in a different section of memory then the program text, and chicken is a very literal-heavy program, so they don't all fit there. This avoids that problem. Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> --- .../0001-xtensa-text-section-literals.patch | 30 +++++++++++++++++++ package/chicken/chicken.mk | 14 +++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 package/chicken/0001-xtensa-text-section-literals.patch diff --git a/package/chicken/0001-xtensa-text-section-literals.patch b/package/chicken/0001-xtensa-text-section-literals.patch new file mode 100644 index 0000000000..b93aaf9e21 --- /dev/null +++ b/package/chicken/0001-xtensa-text-section-literals.patch @@ -0,0 +1,30 @@ +From e8d177f4d4e1c6bc41787ea1621e323ff4ad493e Mon Sep 17 00:00:00 2001 +From: Woodrow Douglass <wdouglass@carnegierobotics.com> +Date: Mon, 22 Jul 2024 08:50:37 -0400 +Subject: [PATCH] Move literals into text section for xtensa architecture + +Upstream: https://bugs.call-cc.org/ticket/1840 +Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> +--- + Makefile.linux | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile.linux b/Makefile.linux +index b628cda4..e97c2b94 100644 +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -52,6 +52,11 @@ USES_SONAME = yes + + # architectures + ++ifeq ($(ARCH),xtensa) ++C_COMPILER_OPTIONS += -mtext-section-literals ++LINKER_OPTIONS += -mtext-section-literals ++endif ++ + ifeq ($(ARCH),x32) + C_COMPILER_OPTIONS += -mx32 + LINKER_OPTIONS += -mx32 +-- +2.39.2 + diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk index 2667f7823d..72d203b9bd 100644 --- a/package/chicken/chicken.mk +++ b/package/chicken/chicken.mk @@ -11,9 +11,19 @@ CHICKEN_LICENSE_FILES = LICENSE CHICKEN_CPE_ID_VENDOR = call-cc CHICKEN_INSTALL_STAGING = YES -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. +#Chicken only uses the "arch" variable for some special-case compile arguments +#If it's empty, it tries to detect the arch host +#Filter out values that have an effect, or pass "unused" here +ifeq ($(BR2_NORMALIZED_ARCH),"x86_64") +CHICKEN_ARCH="x86-64" +else ifeq ($(BR2_NORMALIZED_ARCH),"xtensa") +CHICKEN_ARCH="xtensa" +else +CHICKEN_ARCH="unused" +endif + CHICKEN_MAKE_OPTS = \ - ARCH=unused \ + ARCH=$(CHICKEN_ARCH) \ C_COMPILER="$(TARGET_CC)" \ CXX_COMPILER="$(TARGET_CXX)" \ PREFIX=/usr \ -- 2.39.2 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture 2024-07-22 17:31 ` Woodrow Douglass via buildroot @ 2024-08-02 17:10 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 10+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-08-02 17:10 UTC (permalink / raw) To: Woodrow Douglass via buildroot; +Cc: Woodrow Douglass Hello Woodrow, On Mon, 22 Jul 2024 13:31:36 -0400 Woodrow Douglass via buildroot <buildroot@buildroot.org> wrote: > This solves a build problem -- by default xtensa-gcc puts literals in a > different section of memory then the program text, and chicken is a very > literal-heavy program, so they don't all fit there. This avoids that problem. > > Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com> Thanks, I have applied your patch, with a few fixes. First, I've added a reference to an autobuilder failure fixed by this patch, as follows: """ Fixes: http://autobuild.buildroot.net/results/ce36170d67c4702f34bee025d8a46e5269c4573e/ """ > -# If ARCH is not set, it attempts to autodiscover. But it is anyway not used. > +#Chicken only uses the "arch" variable for some special-case compile arguments > +#If it's empty, it tries to detect the arch host > +#Filter out values that have an effect, or pass "unused" here We always put a space after the # sign starting a comment. > +ifeq ($(BR2_NORMALIZED_ARCH),"x86_64") I've used $(NORMALIZED_ARCH) instead, which already has double quotes stripped, so instead of "x86_64" we can use just x86_64. > +CHICKEN_ARCH="x86-64" Spaces around = sign, no double quotes around x86-64. > +else ifeq ($(BR2_NORMALIZED_ARCH),"xtensa") > +CHICKEN_ARCH="xtensa" > +else > +CHICKEN_ARCH="unused" > +endif > + > CHICKEN_MAKE_OPTS = \ > - ARCH=unused \ > + ARCH=$(CHICKEN_ARCH) \ and instead, used ARCH="$(CHICKEN_ARCH)" here Thanks a lot! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-08-02 17:11 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-07-22 13:11 [Buildroot] [PATCH] package/chicken: move literals into text section for xtensa architecture Woodrow Douglass via buildroot 2024-07-22 13:41 ` Thomas Petazzoni via buildroot 2024-07-22 14:30 ` Woodrow Douglass via buildroot 2024-07-22 14:57 ` Baruch Siach via buildroot 2024-07-22 15:07 ` Woody Douglass via buildroot 2024-07-22 15:08 ` Woodrow Douglass via buildroot 2024-07-22 16:15 ` Thomas Petazzoni via buildroot 2024-07-22 17:24 ` Woody Douglass via buildroot 2024-07-22 17:31 ` Woodrow Douglass via buildroot 2024-08-02 17:10 ` Thomas Petazzoni via buildroot
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.