Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly
@ 2024-08-06 13:05 Woodrow Douglass via buildroot
  2024-08-06 14:26 ` Baruch Siach via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Woodrow Douglass via buildroot @ 2024-08-06 13:05 UTC (permalink / raw)
  To: buildroot; +Cc: Woodrow Douglass

Chicken Scheme's build system wants cflags to be passed as a make variable
in a way that's different then what buildroot expects. this bridges
the gap.

This commit also fixes the xtensa build problems, negating the need
for the xtensa build patch

Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com>
---
 .../0001-xtensa-text-section-literals.patch   | 30 -------------------
 package/chicken/chicken.mk                    |  3 +-
 2 files changed, 1 insertion(+), 32 deletions(-)
 delete 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
deleted file mode 100644
index b93aaf9e21..0000000000
--- a/package/chicken/0001-xtensa-text-section-literals.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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 0520280134..e7a2384f5a 100644
--- a/package/chicken/chicken.mk
+++ b/package/chicken/chicken.mk
@@ -16,8 +16,6 @@ CHICKEN_INSTALL_STAGING = YES
 # values that have an effect, or pass "unused" here
 ifeq ($(NORMALIZED_ARCH),x86_64)
 CHICKEN_ARCH = x86-64
-else ifeq ($(NORMALIZED_ARCH),xtensa)
-CHICKEN_ARCH = xtensa
 else
 CHICKEN_ARCH = unused
 endif
@@ -25,6 +23,7 @@ endif
 CHICKEN_MAKE_OPTS = \
 	ARCH="$(CHICKEN_ARCH)" \
 	C_COMPILER="$(TARGET_CC)" \
+	C_COMPILER_OPTIONS="$(TARGET_CFLAGS) -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES" \
 	CXX_COMPILER="$(TARGET_CXX)" \
 	PREFIX=/usr \
 	PLATFORM=linux \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly
  2024-08-06 13:05 [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly Woodrow Douglass via buildroot
@ 2024-08-06 14:26 ` Baruch Siach via buildroot
  2024-08-12 12:43   ` [Buildroot] [PATCH] Revert "package/chicken: move literals into text section for xtensa architecture" Woodrow Douglass via buildroot
  2024-08-12 12:44   ` [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly Woodrow Douglass via buildroot
  0 siblings, 2 replies; 6+ messages in thread
From: Baruch Siach via buildroot @ 2024-08-06 14:26 UTC (permalink / raw)
  To: Woodrow Douglass via buildroot; +Cc: Woodrow Douglass

Hi Woodrow,

On Tue, Aug 06 2024, Woodrow Douglass via buildroot wrote:
> diff --git a/package/chicken/chicken.mk b/package/chicken/chicken.mk
> index 0520280134..e7a2384f5a 100644
> --- a/package/chicken/chicken.mk
> +++ b/package/chicken/chicken.mk
> @@ -16,8 +16,6 @@ CHICKEN_INSTALL_STAGING = YES
>  # values that have an effect, or pass "unused" here
>  ifeq ($(NORMALIZED_ARCH),x86_64)
>  CHICKEN_ARCH = x86-64
> -else ifeq ($(NORMALIZED_ARCH),xtensa)
> -CHICKEN_ARCH = xtensa
>  else
>  CHICKEN_ARCH = unused
>  endif
> @@ -25,6 +23,7 @@ endif
>  CHICKEN_MAKE_OPTS = \
>  	ARCH="$(CHICKEN_ARCH)" \
>  	C_COMPILER="$(TARGET_CC)" \
> +	C_COMPILER_OPTIONS="$(TARGET_CFLAGS) -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES" \

I think C_COMPILER_OPTIMIZATION_OPTIONS is better for this purpose.
C_COMPILER_OPTIMIZATION_OPTIONS usage is documented in README and
config.make, while C_COMPILER_OPTIONS looks like an internal
implementation detail. C_COMPILER_OPTIMIZATION_OPTIONS allows Buildroot
users to override upstream default optimization options via
BR2_OPTIMIZE_x, or debug options via BR2_DEBUG_x. Another advantage of
not using C_COMPILER_OPTIONS is that you won't have to copy its default
value here.

baruch

>  	CXX_COMPILER="$(TARGET_CXX)" \
>  	PREFIX=/usr \
>  	PLATFORM=linux \

-- 
                                                     ~. .~   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] 6+ messages in thread

* [Buildroot] [PATCH] Revert "package/chicken: move literals into text section for xtensa architecture"
  2024-08-06 14:26 ` Baruch Siach via buildroot
@ 2024-08-12 12:43   ` Woodrow Douglass via buildroot
  2024-08-12 12:44   ` [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly Woodrow Douglass via buildroot
  1 sibling, 0 replies; 6+ messages in thread
From: Woodrow Douglass via buildroot @ 2024-08-12 12:43 UTC (permalink / raw)
  To: buildroot; +Cc: Woodrow Douglass

From: Max Filippov <jcmvbkbc@gmail.com>

This reverts commit 86e51fd5fe2810bbf833b48c4914dcd2de01bdbe.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 .../0001-xtensa-text-section-literals.patch   | 30 -------------------
 package/chicken/chicken.mk                    | 14 ++-------
 2 files changed, 2 insertions(+), 42 deletions(-)
 delete 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
deleted file mode 100644
index b93aaf9e21..0000000000
--- a/package/chicken/0001-xtensa-text-section-literals.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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 0520280134..2667f7823d 100644
--- a/package/chicken/chicken.mk
+++ b/package/chicken/chicken.mk
@@ -11,19 +11,9 @@ CHICKEN_LICENSE_FILES = LICENSE
 CHICKEN_CPE_ID_VENDOR = call-cc
 CHICKEN_INSTALL_STAGING = YES
 
-# 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 ($(NORMALIZED_ARCH),x86_64)
-CHICKEN_ARCH = x86-64
-else ifeq ($(NORMALIZED_ARCH),xtensa)
-CHICKEN_ARCH = xtensa
-else
-CHICKEN_ARCH = unused
-endif
-
+# If ARCH is not set, it attempts to autodiscover. But it is anyway not used.
 CHICKEN_MAKE_OPTS = \
-	ARCH="$(CHICKEN_ARCH)" \
+	ARCH=unused \
 	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] 6+ messages in thread

* [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly
  2024-08-06 14:26 ` Baruch Siach via buildroot
  2024-08-12 12:43   ` [Buildroot] [PATCH] Revert "package/chicken: move literals into text section for xtensa architecture" Woodrow Douglass via buildroot
@ 2024-08-12 12:44   ` Woodrow Douglass via buildroot
  2024-08-12 12:46     ` Woodrow Douglass via buildroot
  1 sibling, 1 reply; 6+ messages in thread
From: Woodrow Douglass via buildroot @ 2024-08-12 12:44 UTC (permalink / raw)
  To: buildroot; +Cc: Woodrow Douglass

Chicken Scheme's build system wants cflags to be passed as a make variable
in a way that's different then what buildroot expects. this bridges
the gap.

This commit also fixes the xtensa build problems, negating the need
for the xtensa build patch

Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com>
---
 .../0001-xtensa-text-section-literals.patch   | 30 -------------------
 package/chicken/chicken.mk                    |  3 +-
 2 files changed, 1 insertion(+), 32 deletions(-)
 delete 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
deleted file mode 100644
index b93aaf9e21..0000000000
--- a/package/chicken/0001-xtensa-text-section-literals.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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 0520280134..2bd1181fc6 100644
--- a/package/chicken/chicken.mk
+++ b/package/chicken/chicken.mk
@@ -16,8 +16,6 @@ CHICKEN_INSTALL_STAGING = YES
 # values that have an effect, or pass "unused" here
 ifeq ($(NORMALIZED_ARCH),x86_64)
 CHICKEN_ARCH = x86-64
-else ifeq ($(NORMALIZED_ARCH),xtensa)
-CHICKEN_ARCH = xtensa
 else
 CHICKEN_ARCH = unused
 endif
@@ -25,6 +23,7 @@ endif
 CHICKEN_MAKE_OPTS = \
 	ARCH="$(CHICKEN_ARCH)" \
 	C_COMPILER="$(TARGET_CC)" \
+	C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS) -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES" \
 	CXX_COMPILER="$(TARGET_CXX)" \
 	PREFIX=/usr \
 	PLATFORM=linux \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly
  2024-08-12 12:44   ` [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly Woodrow Douglass via buildroot
@ 2024-08-12 12:46     ` Woodrow Douglass via buildroot
  2024-08-12 12:56       ` Woodrow Douglass via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Woodrow Douglass via buildroot @ 2024-08-12 12:46 UTC (permalink / raw)
  To: buildroot; +Cc: Woodrow Douglass

Chicken Scheme's build system wants cflags to be passed as a make variable
in a way that's different then what buildroot expects. this bridges
the gap.

This commit also fixes the xtensa build problems, negating the need
for the xtensa build patch

Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com>
---
 .../0001-xtensa-text-section-literals.patch   | 30 -------------------
 package/chicken/chicken.mk                    |  3 +-
 2 files changed, 1 insertion(+), 32 deletions(-)
 delete 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
deleted file mode 100644
index b93aaf9e21..0000000000
--- a/package/chicken/0001-xtensa-text-section-literals.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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 0520280134..2bd1181fc6 100644
--- a/package/chicken/chicken.mk
+++ b/package/chicken/chicken.mk
@@ -16,8 +16,6 @@ CHICKEN_INSTALL_STAGING = YES
 # values that have an effect, or pass "unused" here
 ifeq ($(NORMALIZED_ARCH),x86_64)
 CHICKEN_ARCH = x86-64
-else ifeq ($(NORMALIZED_ARCH),xtensa)
-CHICKEN_ARCH = xtensa
 else
 CHICKEN_ARCH = unused
 endif
@@ -25,6 +23,7 @@ endif
 CHICKEN_MAKE_OPTS = \
 	ARCH="$(CHICKEN_ARCH)" \
 	C_COMPILER="$(TARGET_CC)" \
+	C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS) -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES" \
 	CXX_COMPILER="$(TARGET_CXX)" \
 	PREFIX=/usr \
 	PLATFORM=linux \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly
  2024-08-12 12:46     ` Woodrow Douglass via buildroot
@ 2024-08-12 12:56       ` Woodrow Douglass via buildroot
  0 siblings, 0 replies; 6+ messages in thread
From: Woodrow Douglass via buildroot @ 2024-08-12 12:56 UTC (permalink / raw)
  To: buildroot; +Cc: Woodrow Douglass

Chicken Scheme's build system wants cflags to be passed as a make variable
in a way that's different then what buildroot expects. this bridges
the gap.

This commit also fixes the xtensa build problems, negating the need
for the xtensa build patch

Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com>
---
 .../0001-xtensa-text-section-literals.patch   | 30 -------------------
 package/chicken/chicken.mk                    |  3 +-
 2 files changed, 1 insertion(+), 32 deletions(-)
 delete 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
deleted file mode 100644
index b93aaf9e21..0000000000
--- a/package/chicken/0001-xtensa-text-section-literals.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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 0520280134..f596129a18 100644
--- a/package/chicken/chicken.mk
+++ b/package/chicken/chicken.mk
@@ -16,8 +16,6 @@ CHICKEN_INSTALL_STAGING = YES
 # values that have an effect, or pass "unused" here
 ifeq ($(NORMALIZED_ARCH),x86_64)
 CHICKEN_ARCH = x86-64
-else ifeq ($(NORMALIZED_ARCH),xtensa)
-CHICKEN_ARCH = xtensa
 else
 CHICKEN_ARCH = unused
 endif
@@ -25,6 +23,7 @@ endif
 CHICKEN_MAKE_OPTS = \
 	ARCH="$(CHICKEN_ARCH)" \
 	C_COMPILER="$(TARGET_CC)" \
+	C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)" \
 	CXX_COMPILER="$(TARGET_CXX)" \
 	PREFIX=/usr \
 	PLATFORM=linux \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-12 12:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-06 13:05 [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly Woodrow Douglass via buildroot
2024-08-06 14:26 ` Baruch Siach via buildroot
2024-08-12 12:43   ` [Buildroot] [PATCH] Revert "package/chicken: move literals into text section for xtensa architecture" Woodrow Douglass via buildroot
2024-08-12 12:44   ` [Buildroot] [PATCH] package/chicken: pass TARGET_CFLAGS to chicken build system explicitly Woodrow Douglass via buildroot
2024-08-12 12:46     ` Woodrow Douglass via buildroot
2024-08-12 12:56       ` Woodrow Douglass via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox