You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2020/06/01 04:38:42 UTC

[incubator-nuttx] branch master updated (274ee57 -> b932b65)

This is an automated email from the ASF dual-hosted git repository.

btashton pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 274ee57  x86_64: Use gcc compiler instead of clang for macOS
     new f6a87c5  arch: Change dependence from ELF to LIBC_ARCH_ELF
     new b932b65  arch: Select 64bit elf base on the architecture characteristic

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/Kconfig                                                 | 1 +
 arch/arm/src/armv7-m/Kconfig                                 | 2 +-
 arch/arm/src/armv8-m/Kconfig                                 | 2 +-
 arch/arm/src/stm32/Kconfig                                   | 2 +-
 arch/arm/src/stm32f7/Kconfig                                 | 2 +-
 arch/arm/src/stm32h7/Kconfig                                 | 2 +-
 arch/risc-v/Kconfig                                          | 1 +
 arch/sim/Kconfig                                             | 1 +
 binfmt/Kconfig                                               | 7 -------
 boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig | 1 -
 boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig  | 1 -
 boards/arm/stm32/stm32f4discovery/configs/module/defconfig   | 1 -
 boards/risc-v/k210/maix-bit/configs/elf/defconfig            | 1 -
 boards/risc-v/k210/maix-bit/configs/module/defconfig         | 1 -
 boards/risc-v/k210/maix-bit/configs/posix_spawn/defconfig    | 1 -
 boards/sim/sim/sim/configs/module/defconfig                  | 1 -
 include/elf.h                                                | 2 +-
 libs/libc/machine/Kconfig                                    | 5 +++++
 18 files changed, 14 insertions(+), 20 deletions(-)


[incubator-nuttx] 02/02: arch: Select 64bit elf base on the architecture characteristic

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b932b653dd5979f9ae6dc5acac5461ec8b41fc0d
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jun 1 02:41:11 2020 +0800

    arch: Select 64bit elf base on the architecture characteristic
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
    Change-Id: I09eec5a76f255016a910cfec3b3f70cd7577525e
---
 arch/Kconfig                                              | 1 +
 arch/risc-v/Kconfig                                       | 1 +
 arch/sim/Kconfig                                          | 1 +
 binfmt/Kconfig                                            | 7 -------
 boards/risc-v/k210/maix-bit/configs/elf/defconfig         | 1 -
 boards/risc-v/k210/maix-bit/configs/module/defconfig      | 1 -
 boards/risc-v/k210/maix-bit/configs/posix_spawn/defconfig | 1 -
 boards/sim/sim/sim/configs/module/defconfig               | 1 -
 include/elf.h                                             | 2 +-
 libs/libc/machine/Kconfig                                 | 5 +++++
 10 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index d157c4d..eaebb89 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -84,6 +84,7 @@ config ARCH_X86
 
 config ARCH_X86_64
 	bool "x86_64"
+	select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF
 	---help---
 		x86-64 architectures.
 
diff --git a/arch/risc-v/Kconfig b/arch/risc-v/Kconfig
index c7a4115..5b23671 100644
--- a/arch/risc-v/Kconfig
+++ b/arch/risc-v/Kconfig
@@ -58,6 +58,7 @@ config ARCH_RV32IM
 config ARCH_RV64GC
 	bool
 	default n
+	select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF
 
 config ARCH_FAMILY
 	string
diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig
index 6e8a72e..6ffd1a1 100644
--- a/arch/sim/Kconfig
+++ b/arch/sim/Kconfig
@@ -13,6 +13,7 @@ choice
 config HOST_X86_64
 	bool "x86_64"
 	select ARCH_HAVE_STACKCHECK
+	select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF && !SIM_M32
 
 config HOST_X86
 	bool "x86"
diff --git a/binfmt/Kconfig b/binfmt/Kconfig
index 300a137..15e878a 100644
--- a/binfmt/Kconfig
+++ b/binfmt/Kconfig
@@ -10,13 +10,6 @@ config BINFMT_DISABLE
 		By default, support for loadable binary formats is built.  This logic
 		may be suppressed be defining this setting.
 
-config ELF_64BIT
-	bool "64bit ELF support"
-	default n
-	depends on (!BINFMT_DISABLE && ELF) || LIBC_MODLIB
-	---help---
-		This option is used to load 64bit ELF files
-
 if !BINFMT_DISABLE
 
 config PATH_INITIAL
diff --git a/boards/risc-v/k210/maix-bit/configs/elf/defconfig b/boards/risc-v/k210/maix-bit/configs/elf/defconfig
index c313c2c..8137908 100644
--- a/boards/risc-v/k210/maix-bit/configs/elf/defconfig
+++ b/boards/risc-v/k210/maix-bit/configs/elf/defconfig
@@ -21,7 +21,6 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
 CONFIG_ELF=y
-CONFIG_ELF_64BIT=y
 CONFIG_ELF_ALIGN_LOG2=3
 CONFIG_EXAMPLES_ELF=y
 CONFIG_FS_PROCFS=y
diff --git a/boards/risc-v/k210/maix-bit/configs/module/defconfig b/boards/risc-v/k210/maix-bit/configs/module/defconfig
index dc0f20a..69f0059 100644
--- a/boards/risc-v/k210/maix-bit/configs/module/defconfig
+++ b/boards/risc-v/k210/maix-bit/configs/module/defconfig
@@ -21,7 +21,6 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
 CONFIG_ELF=y
-CONFIG_ELF_64BIT=y
 CONFIG_ELF_ALIGN_LOG2=3
 CONFIG_EXAMPLES_MODULE=y
 CONFIG_FS_PROCFS=y
diff --git a/boards/risc-v/k210/maix-bit/configs/posix_spawn/defconfig b/boards/risc-v/k210/maix-bit/configs/posix_spawn/defconfig
index 974b668..b72cf8a 100644
--- a/boards/risc-v/k210/maix-bit/configs/posix_spawn/defconfig
+++ b/boards/risc-v/k210/maix-bit/configs/posix_spawn/defconfig
@@ -21,7 +21,6 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
 CONFIG_ELF=y
-CONFIG_ELF_64BIT=y
 CONFIG_EXAMPLES_POSIXSPAWN=y
 CONFIG_FS_PROCFS=y
 CONFIG_FS_ROMFS=y
diff --git a/boards/sim/sim/sim/configs/module/defconfig b/boards/sim/sim/sim/configs/module/defconfig
index 12fb776..d1e0505 100644
--- a/boards/sim/sim/sim/configs/module/defconfig
+++ b/boards/sim/sim/sim/configs/module/defconfig
@@ -19,7 +19,6 @@ CONFIG_BUILTIN=y
 CONFIG_CLOCK_MONOTONIC=y
 CONFIG_DEV_LOOP=y
 CONFIG_DEV_ZERO=y
-CONFIG_ELF_64BIT=y
 CONFIG_EXAMPLES_MODULE=y
 CONFIG_EXAMPLES_MODULE_DEVMINOR=4
 CONFIG_EXAMPLES_MODULE_DEVPATH="/dev/ram4"
diff --git a/include/elf.h b/include/elf.h
index bff9a49..8f599d7 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -33,7 +33,7 @@
 
 /* NOTE: elf64.h and elf32.h refer EI_NIDENT defined above */
 
-#ifdef CONFIG_ELF_64BIT
+#ifdef CONFIG_LIBC_ARCH_ELF_64BIT
 #  include <elf64.h>
 #else
 #  include <elf32.h>
diff --git a/libs/libc/machine/Kconfig b/libs/libc/machine/Kconfig
index f0c34ac..e02f87e 100644
--- a/libs/libc/machine/Kconfig
+++ b/libs/libc/machine/Kconfig
@@ -88,6 +88,11 @@ config LIBC_ARCH_ELF
 	bool
 	default n
 
+config LIBC_ARCH_ELF_64BIT
+	bool
+	default n
+	depends on LIBC_ARCH_ELF
+
 config LIBM_ARCH_CEIL
 	bool
 	default n


[incubator-nuttx] 01/02: arch: Change dependence from ELF to LIBC_ARCH_ELF

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit f6a87c5c1597ffe626d2813820f7ff989b3dbae4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jun 1 02:32:06 2020 +0800

    arch: Change dependence from ELF to LIBC_ARCH_ELF
    
    since LIBC_MODLIB need to be considered too
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
    Change-Id: I220b25afa08727af954ccbb40ac987b66113b2be
---
 arch/arm/src/armv7-m/Kconfig                                 | 2 +-
 arch/arm/src/armv8-m/Kconfig                                 | 2 +-
 arch/arm/src/stm32/Kconfig                                   | 2 +-
 arch/arm/src/stm32f7/Kconfig                                 | 2 +-
 arch/arm/src/stm32h7/Kconfig                                 | 2 +-
 boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig | 1 -
 boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig  | 1 -
 boards/arm/stm32/stm32f4discovery/configs/module/defconfig   | 1 -
 8 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/arch/arm/src/armv7-m/Kconfig b/arch/arm/src/armv7-m/Kconfig
index fab715a..6c30814 100644
--- a/arch/arm/src/armv7-m/Kconfig
+++ b/arch/arm/src/armv7-m/Kconfig
@@ -183,7 +183,7 @@ config ARMV7M_TARGET2_PREL
 	bool "R_ARM_TARGET2 is PC relative"
 	default n if !CXX_EXCEPTION
 	default y if CXX_EXCEPTION
-	depends on ELF
+	depends on LIBC_ARCH_ELF
 	---help---
 		Perform a PC relative relocation for relocation type R_ARM_TARGET2
 
diff --git a/arch/arm/src/armv8-m/Kconfig b/arch/arm/src/armv8-m/Kconfig
index 5339c75..dfe745b 100644
--- a/arch/arm/src/armv8-m/Kconfig
+++ b/arch/arm/src/armv8-m/Kconfig
@@ -153,7 +153,7 @@ config ARMV8M_TARGET2_PREL
 	bool "R_ARM_TARGET2 is PC relative"
 	default n if !CXX_EXCEPTION
 	default y if CXX_EXCEPTION
-	depends on ELF
+	depends on LIBC_ARCH_ELF
 	---help---
 		Perform a PC relative relocation for relocation type R_ARM_TARGET2
 
diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig
index 00e5d3b..d918726 100644
--- a/arch/arm/src/stm32/Kconfig
+++ b/arch/arm/src/stm32/Kconfig
@@ -3381,7 +3381,7 @@ config STM32_I2SPLL
 
 config STM32_CCMEXCLUDE
 	bool "Exclude CCM SRAM from the heap"
-	default y if  ARCH_DMA || ELF
+	default y if  ARCH_DMA || LIBC_ARCH_ELF
 	depends on STM32_HAVE_CCM
 	---help---
 		Exclude CCM SRAM from the HEAP because (1) it cannot be used for DMA
diff --git a/arch/arm/src/stm32f7/Kconfig b/arch/arm/src/stm32f7/Kconfig
index 1e3589c..bb680d2 100644
--- a/arch/arm/src/stm32f7/Kconfig
+++ b/arch/arm/src/stm32f7/Kconfig
@@ -2609,7 +2609,7 @@ config STM32F7_CUSTOM_CLOCKCONFIG
 
 config STM32F7_DTCMEXCLUDE
 	bool "Exclude DTCM SRAM from the heap"
-	default y if ELF
+	default y if LIBC_ARCH_ELF
 	depends on ARMV7M_HAVE_DTCM
 	---help---
 		Exclude DTCM SRAM from the HEAP because it appears to be impossible
diff --git a/arch/arm/src/stm32h7/Kconfig b/arch/arm/src/stm32h7/Kconfig
index eba848d..ee025a3 100644
--- a/arch/arm/src/stm32h7/Kconfig
+++ b/arch/arm/src/stm32h7/Kconfig
@@ -1653,7 +1653,7 @@ config STM32H7_CUSTOM_CLOCKCONFIG
 
 config STM32H7_DTCMEXCLUDE
 	bool "Exclude DTCM SRAM from the heap"
-	default y if ELF
+	default y if LIBC_ARCH_ELF
 	depends on ARMV7M_HAVE_DTCM
 	---help---
 		Exclude DTCM SRAM from the HEAP because it appears to be impossible
diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig
index 121422d..18c74f3 100644
--- a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig
+++ b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig
@@ -49,7 +49,6 @@ CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_START_DAY=5
 CONFIG_START_MONTH=8
-CONFIG_STM32_CCMEXCLUDE=y
 CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
 CONFIG_STM32_JTAG_SW_ENABLE=y
 CONFIG_STM32_OTGFS=y
diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig
index bb2d408..3038109 100644
--- a/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig
+++ b/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig
@@ -46,7 +46,6 @@ CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_WAITPID=y
 CONFIG_SDCLONE_DISABLE=y
 CONFIG_START_MONTH=6
-CONFIG_STM32_CCMEXCLUDE=y
 CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
 CONFIG_STM32_JTAG_SW_ENABLE=y
 CONFIG_STM32_PWR=y
diff --git a/boards/arm/stm32/stm32f4discovery/configs/module/defconfig b/boards/arm/stm32/stm32f4discovery/configs/module/defconfig
index 60464bb..924d826 100644
--- a/boards/arm/stm32/stm32f4discovery/configs/module/defconfig
+++ b/boards/arm/stm32/stm32f4discovery/configs/module/defconfig
@@ -48,7 +48,6 @@ CONFIG_SDCLONE_DISABLE=y
 CONFIG_START_DAY=6
 CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2011
-CONFIG_STM32_CCMEXCLUDE=y
 CONFIG_STM32_JTAG_SW_ENABLE=y
 CONFIG_STM32_PWR=y
 CONFIG_STM32_SPI1=y