diff options
-rw-r--r-- | mk/vars.mk | 10 | ||||
-rw-r--r-- | target/bfin/systems/toolchain-bfin | 1 | ||||
-rw-r--r-- | target/config/Config.in.binfmt | 8 | ||||
-rw-r--r-- | toolchain/elf2flt/Makefile | 3 | ||||
-rw-r--r-- | toolchain/uclibc-ng/Makefile | 17 | ||||
-rw-r--r-- | toolchain/uclibc/Makefile | 27 |
6 files changed, 60 insertions, 6 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index 9dd7e8735..4ad638164 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -159,6 +159,16 @@ TARGET_CXXFLAGS+= -Wl,-elf2flt endif endif +ifeq ($(ADK_TARGET_ARCH_BFIN),y) +ifeq ($(ADK_TARGET_BINFMT_FLAT),y) +TARGET_LDFLAGS+= -elf2flt +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) +TARGET_CFLAGS+= -msep-data +TARGET_CXXFLAGS+= -msep-data +endif +endif + ifeq ($(ADK_TARGET_ARCH_M68K),y) ifeq ($(ADK_TARGET_BINFMT_FLAT),y) TARGET_LDFLAGS+= -elf2flt diff --git a/target/bfin/systems/toolchain-bfin b/target/bfin/systems/toolchain-bfin index 41d09d82e..79256a506 100644 --- a/target/bfin/systems/toolchain-bfin +++ b/target/bfin/systems/toolchain-bfin @@ -2,6 +2,7 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_BFIN bool "Toolchain only" select ADK_bfin select ADK_toolchain_bfin + select ADK_TARGET_UCLINUX select ADK_CPU_BFIN select ADK_TARGET_TOOLCHAIN select ADK_TARGET_PACKAGE_TXZ diff --git a/target/config/Config.in.binfmt b/target/config/Config.in.binfmt index 239442da4..283885265 100644 --- a/target/config/Config.in.binfmt +++ b/target/config/Config.in.binfmt @@ -9,6 +9,10 @@ config ADK_TARGET_BINFMT_ELF bool "ELF" depends on (ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_M68K) && !ADK_TARGET_UCLINUX +config ADK_TARGET_BINFMT_FLAT + bool "FLAT" + depends on (ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_M68K) && ADK_TARGET_UCLINUX + config ADK_TARGET_BINFMT_DSBT bool "DSBT" depends on ADK_TARGET_ARCH_C6X @@ -17,10 +21,6 @@ config ADK_TARGET_BINFMT_FDPIC bool "FDPIC" depends on ADK_TARGET_ARCH_BFIN -config ADK_TARGET_BINFMT_FLAT - bool "FLAT" - depends on (ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_M68K) && ADK_TARGET_UCLINUX - endchoice # Set up flat binary type diff --git a/toolchain/elf2flt/Makefile b/toolchain/elf2flt/Makefile index 27d0942a2..e51546537 100644 --- a/toolchain/elf2flt/Makefile +++ b/toolchain/elf2flt/Makefile @@ -9,6 +9,9 @@ include ${ADK_TOPDIR}/mk/buildhlp.mk ifeq ($(ADK_TOOLCHAIN_BINUTILS_GIT),y) BINUTILS_VERSION:= git endif +ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_22),y) +BINUTILS_VERSION:= 2.22 +endif ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_24),y) BINUTILS_VERSION:= 2.24 endif diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile index 1fd4a5829..8ceadc2d4 100644 --- a/toolchain/uclibc-ng/Makefile +++ b/toolchain/uclibc-ng/Makefile @@ -60,15 +60,30 @@ ifeq ($(ADK_TARGET_HARD_FLOAT),y) $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config endif +ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config +endif ifeq ($(ADK_TARGET_BINFMT_FLAT),y) ifeq ($(ADK_TARGET_BINFMT_FLAT_ONE),y) - $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_ONE\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config endif ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config endif ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y) $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config endif endif ifeq ($(ADK_TARGET_UCLINUX),y) diff --git a/toolchain/uclibc/Makefile b/toolchain/uclibc/Makefile index 57b615177..7214e17ed 100644 --- a/toolchain/uclibc/Makefile +++ b/toolchain/uclibc/Makefile @@ -57,8 +57,33 @@ ifeq ($(ADK_TARGET_HARD_FLOAT),y) $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config endif -ifeq ($(ADK_TARGET_UCLINUX),y) +ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT),y) +ifeq ($(ADK_TARGET_BINFMT_FLAT_ONE),y) + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y) + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SHARED\).*/\1=y/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config +endif +endif +ifeq ($(ADK_TARGET_UCLINUX),y) $(SED) 's/.*\(ARCH_USE_MMU\).*/# \1 is not set/' ${WRKBUILD}/.config endif ifeq ($(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_FLAT),) |