You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/14 13:34:09 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request, #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

anchao opened a new pull request, #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094

   ## Summary
   
   arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain
   
   migrate the toolchain define to arch/Kconfig.toolchain to simplify new toolchain registration
   
   Signed-off-by: chao an <an...@xiaomi.com>
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ci-check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970906867


##########
arch/Kconfig:
##########
@@ -230,57 +230,7 @@ endmenu # Custom Chip Configuration
 endif #ARCH_CHIP_CUSTOM
 
 source "arch/dummy/Kconfig"
-
-config ARCH_TOOLCHAIN_IAR
-	bool
-	default n
-
-config ARCH_TOOLCHAIN_GNU
-	bool
-	default n
-
-config ARCH_TOOLCHAIN_CLANG
-	bool
-	select ARCH_TOOLCHAIN_GNU
-	default n
-
-choice
-	prompt "Link Time Optimization (LTO)"
-	default LTO_NONE
-	---help---
-		This option enables Link Time Optimization (LTO), which allows the
-		compiler to optimize binaries globally.
-
-		If unsure, select LTO_NONE. Note that LTO is very resource-intensive
-		so it's disabled by default.
-
-config LTO_NONE
-	bool "None"
-	---help---
-		Build the kernel normally, without Link Time Optimization (LTO).
-
-config LTO_FULL
-	bool "GNU Full LTO (EXPERIMENTAL)"
-	depends on ARCH_TOOLCHAIN_GNU
-	---help---
-		Link time optimization is implemented as a GCC front end for a bytecode
-		bytecode representation of GIMPLE that is emitted in special sections
-		of .o files. Currently, LTO support is enabled in most ELF-based systems,
-		as well as darwin, cygwin and mingw systems.
-
-config LTO_THIN
-	bool "Clang ThinLTO (EXPERIMENTAL)"
-	depends on ARCH_TOOLCHAIN_CLANG
-	---help---
-		This option enables Clang's ThinLTO, which allows for parallel
-		optimization and faster incremental compiles compared to the
-		CONFIG_LTO_FULL option. More information can be found
-		from Clang's documentation:
-
-		https://clang.llvm.org/docs/ThinLTO.html
-
-		If unsure, say Y.
-endchoice
+source "arch/Kconfig.toolchain"

Review Comment:
   why split to Kconfig.toolchain?



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU

Review Comment:
   TOOLCHAIN_IS_GNU



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG
+	bool
+	select ARCH_TOOLCHAIN_GNU
+	default n
+
+choice
+	prompt "Toolchain Selection"
+	default TOOLCHAIN_GNU_EABI
+
+config TOOLCHAIN_IAR
+	bool "IAR ANSI C/C++ toolchain"
+	select CYGWIN_WINTOOL if WINDOWS_CYGWIN
+	select ARCH_TOOLCHAIN_IAR
+
+config TOOLCHAIN_BUILDROOT
+	bool "Buildroot (Cygwin or Linux)"
+	depends on !WINDOWS_NATIVE
+	select ARCH_TOOLCHAIN_GNU
+
+config TOOLCHAIN_GNU_EABI
+	bool "Generic GNU EABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any modern GNU toolchain (GCC 4.5 or newer)
+
+config TOOLCHAIN_GNU_OABI
+	bool "Generic GNU OABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any GNU toolchain.
+
+config TOOLCHAIN_CLANG
+	bool "Generic Clang toolchain"
+	select ARCH_TOOLCHAIN_CLANG
+
+endchoice
+
+config TOOLCHAIN_BUILDROOT_OABI

Review Comment:
   merge to choice?



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG

Review Comment:
   TOOLCHAIN_IS_CLANG



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR

Review Comment:
   remove check TOOLCHAIN_IAR instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r971024637


##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG
+	bool
+	select ARCH_TOOLCHAIN_GNU
+	default n
+
+choice
+	prompt "Toolchain Selection"
+	default TOOLCHAIN_GNU_EABI
+
+config TOOLCHAIN_IAR
+	bool "IAR ANSI C/C++ toolchain"
+	select CYGWIN_WINTOOL if WINDOWS_CYGWIN
+	select ARCH_TOOLCHAIN_IAR
+
+config TOOLCHAIN_BUILDROOT
+	bool "Buildroot (Cygwin or Linux)"
+	depends on !WINDOWS_NATIVE
+	select ARCH_TOOLCHAIN_GNU
+
+config TOOLCHAIN_GNU_EABI
+	bool "Generic GNU EABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any modern GNU toolchain (GCC 4.5 or newer)
+
+config TOOLCHAIN_GNU_OABI
+	bool "Generic GNU OABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any GNU toolchain.
+
+config TOOLCHAIN_CLANG
+	bool "Generic Clang toolchain"
+	select ARCH_TOOLCHAIN_CLANG
+
+endchoice
+
+config TOOLCHAIN_BUILDROOT_OABI

Review Comment:
   OK



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970946108


##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG

Review Comment:
   Done



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970939768


##########
arch/Kconfig:
##########
@@ -230,57 +230,7 @@ endmenu # Custom Chip Configuration
 endif #ARCH_CHIP_CUSTOM
 
 source "arch/dummy/Kconfig"
-
-config ARCH_TOOLCHAIN_IAR
-	bool
-	default n
-
-config ARCH_TOOLCHAIN_GNU
-	bool
-	default n
-
-config ARCH_TOOLCHAIN_CLANG
-	bool
-	select ARCH_TOOLCHAIN_GNU
-	default n
-
-choice
-	prompt "Link Time Optimization (LTO)"
-	default LTO_NONE
-	---help---
-		This option enables Link Time Optimization (LTO), which allows the
-		compiler to optimize binaries globally.
-
-		If unsure, select LTO_NONE. Note that LTO is very resource-intensive
-		so it's disabled by default.
-
-config LTO_NONE
-	bool "None"
-	---help---
-		Build the kernel normally, without Link Time Optimization (LTO).
-
-config LTO_FULL
-	bool "GNU Full LTO (EXPERIMENTAL)"
-	depends on ARCH_TOOLCHAIN_GNU
-	---help---
-		Link time optimization is implemented as a GCC front end for a bytecode
-		bytecode representation of GIMPLE that is emitted in special sections
-		of .o files. Currently, LTO support is enabled in most ELF-based systems,
-		as well as darwin, cygwin and mingw systems.
-
-config LTO_THIN
-	bool "Clang ThinLTO (EXPERIMENTAL)"
-	depends on ARCH_TOOLCHAIN_CLANG
-	---help---
-		This option enables Clang's ThinLTO, which allows for parallel
-		optimization and faster incremental compiles compared to the
-		CONFIG_LTO_FULL option. More information can be found
-		from Clang's documentation:
-
-		https://clang.llvm.org/docs/ThinLTO.html
-
-		If unsure, say Y.
-endchoice
+source "arch/Kconfig.toolchain"

Review Comment:
   Just separates the toolchain related configuration into Kconfig.toolchain, new toolchain support can be added to this file



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970945798


##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG
+	bool
+	select ARCH_TOOLCHAIN_GNU
+	default n
+
+choice
+	prompt "Toolchain Selection"
+	default TOOLCHAIN_GNU_EABI
+
+config TOOLCHAIN_IAR
+	bool "IAR ANSI C/C++ toolchain"
+	select CYGWIN_WINTOOL if WINDOWS_CYGWIN
+	select ARCH_TOOLCHAIN_IAR
+
+config TOOLCHAIN_BUILDROOT
+	bool "Buildroot (Cygwin or Linux)"
+	depends on !WINDOWS_NATIVE
+	select ARCH_TOOLCHAIN_GNU
+
+config TOOLCHAIN_GNU_EABI
+	bool "Generic GNU EABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any modern GNU toolchain (GCC 4.5 or newer)
+
+config TOOLCHAIN_GNU_OABI
+	bool "Generic GNU OABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any GNU toolchain.
+
+config TOOLCHAIN_CLANG
+	bool "Generic Clang toolchain"
+	select ARCH_TOOLCHAIN_CLANG
+
+endchoice
+
+config TOOLCHAIN_BUILDROOT_OABI

Review Comment:
   let us keep the original configuration for this PR, BUILDROOT_OABI needs some additional changes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 closed pull request #7094: arch/arm/toolchain: migrate the toolchain define to arch/arm/Kconfig

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed pull request #7094: arch/arm/toolchain: migrate the toolchain define to arch/arm/Kconfig
URL: https://github.com/apache/incubator-nuttx/pull/7094


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7094: arch/arm/toolchain: migrate the toolchain define to arch/arm/Kconfig

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#issuecomment-1248434301

   let's track by https://github.com/apache/incubator-nuttx/pull/7100?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970951812


##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970986285


##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG
+	bool
+	select ARCH_TOOLCHAIN_GNU
+	default n
+
+choice
+	prompt "Toolchain Selection"
+	default TOOLCHAIN_GNU_EABI
+
+config TOOLCHAIN_IAR
+	bool "IAR ANSI C/C++ toolchain"
+	select CYGWIN_WINTOOL if WINDOWS_CYGWIN
+	select ARCH_TOOLCHAIN_IAR
+
+config TOOLCHAIN_BUILDROOT
+	bool "Buildroot (Cygwin or Linux)"
+	depends on !WINDOWS_NATIVE
+	select ARCH_TOOLCHAIN_GNU
+
+config TOOLCHAIN_GNU_EABI
+	bool "Generic GNU EABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any modern GNU toolchain (GCC 4.5 or newer)
+
+config TOOLCHAIN_GNU_OABI
+	bool "Generic GNU OABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any GNU toolchain.
+
+config TOOLCHAIN_CLANG
+	bool "Generic Clang toolchain"
+	select ARCH_TOOLCHAIN_CLANG
+
+endchoice
+
+config TOOLCHAIN_BUILDROOT_OABI

Review Comment:
   but this change is already huge, you even rename ARM_OABI_TOOLCHAIN to TOOLCHAIN_BUILDROOT_OABI



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org