From 9705ec34cff5494d99ec9b8fb146fa5f55f84da3 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Mon, 19 Nov 2012 11:21:31 +0100 Subject: binutils: introduce the infrastructure to support binutils alternatives Rework binutils in order to provide soon binutils alternative. Signed-off-by: Yann Diorcet [yann.morin.1998@free.fr: split up original patch for self-contained changes] Signed-off-by: "Yann E. MORIN" Message-Id: Patchwork-Id: 199971 --- config/binutils.in | 7 ++++-- config/binutils/binutils.in.2 | 56 +++++++++++++++++++++++++++++++++++++++++++ config/binutils/elf2flt.in | 56 ------------------------------------------- config/config.mk | 8 +++++++ 4 files changed, 69 insertions(+), 58 deletions(-) create mode 100644 config/binutils/binutils.in.2 delete mode 100644 config/binutils/elf2flt.in (limited to 'config') diff --git a/config/binutils.in b/config/binutils.in index 869d8198..99b8b9f4 100644 --- a/config/binutils.in +++ b/config/binutils.in @@ -33,7 +33,10 @@ config ARCH_BINFMT_FDPIC endchoice -source "config/binutils/binutils.in" -source "config/binutils/elf2flt.in" +config BINUTILS + string + +source "config.gen/binutils.in" +source "config.gen/binutils.in.2" endmenu diff --git a/config/binutils/binutils.in.2 b/config/binutils/binutils.in.2 new file mode 100644 index 00000000..0e74886d --- /dev/null +++ b/config/binutils/binutils.in.2 @@ -0,0 +1,56 @@ +# elf2flt options + +if ARCH_BINFMT_FLAT + +comment "elf2flt" + +choice + bool + prompt "elf2flt version" +# Don't remove next line +# CT_INSERT_VERSION_BELOW + +config ELF2FLT_CVSHEAD + bool + prompt "CVS Head" + help + Grab the latest version of elf2flt from the CVS repository + +config ELF2FLT_CUSTOM + bool + prompt "Custom elf2flt" + depends on EXPERIMENTAL + +endchoice + +if ELF2FLT_CUSTOM + +config ELF2FLT_CUSTOM_LOCATION + string + prompt "Full path to custom elf2flt source" + default "" + help + Enter the path to the directory (or tarball) of your source for elf2flt, + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/elf2flt + +endif # ELF2FLT_CUSTOM + +config ELF2FLT_VERSION + string + default "cvs" if ELF2FLT_CVSHEAD + default "custom" if ELF2FLT_CUSTOM +# Don't remove next line +# CT_INSERT_VERSION_STRING_BELOW + +config ELF2FLT_EXTRA_CONFIG_ARRAY + string + prompt "elf2flt extra config" + default "" + help + Extra flags passed onto ./configure when configuring + + You can enter multiple arguments here, and arguments can contain spaces + if they are properly quoted (or escaped, but prefer quotes). Eg.: + --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space + +endif diff --git a/config/binutils/elf2flt.in b/config/binutils/elf2flt.in deleted file mode 100644 index 0e74886d..00000000 --- a/config/binutils/elf2flt.in +++ /dev/null @@ -1,56 +0,0 @@ -# elf2flt options - -if ARCH_BINFMT_FLAT - -comment "elf2flt" - -choice - bool - prompt "elf2flt version" -# Don't remove next line -# CT_INSERT_VERSION_BELOW - -config ELF2FLT_CVSHEAD - bool - prompt "CVS Head" - help - Grab the latest version of elf2flt from the CVS repository - -config ELF2FLT_CUSTOM - bool - prompt "Custom elf2flt" - depends on EXPERIMENTAL - -endchoice - -if ELF2FLT_CUSTOM - -config ELF2FLT_CUSTOM_LOCATION - string - prompt "Full path to custom elf2flt source" - default "" - help - Enter the path to the directory (or tarball) of your source for elf2flt, - or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/elf2flt - -endif # ELF2FLT_CUSTOM - -config ELF2FLT_VERSION - string - default "cvs" if ELF2FLT_CVSHEAD - default "custom" if ELF2FLT_CUSTOM -# Don't remove next line -# CT_INSERT_VERSION_STRING_BELOW - -config ELF2FLT_EXTRA_CONFIG_ARRAY - string - prompt "elf2flt extra config" - default "" - help - Extra flags passed onto ./configure when configuring - - You can enter multiple arguments here, and arguments can contain spaces - if they are properly quoted (or escaped, but prefer quotes). Eg.: - --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space - -endif diff --git a/config/config.mk b/config/config.mk index dc1e56c9..4f204f82 100644 --- a/config/config.mk +++ b/config/config.mk @@ -21,6 +21,8 @@ KERNEL_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/co KERNEL_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/kernel/*.in.2)) CC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in)) CC_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in.2)) +BINUTILS_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/binutils/*.in)) +BINUTILS_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/binutils/*.in.2)) LIBC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in)) LIBC_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in.2)) DEBUG_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/debug/*.in)) @@ -29,6 +31,7 @@ DEBUG_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/co GEN_CONFIG_FILES = config.gen/arch.in \ config.gen/kernel.in \ config.gen/cc.in \ + config.gen/binutils.in \ config.gen/libc.in \ config.gen/debug.in # ... and how to access them: @@ -61,6 +64,7 @@ config.gen: ARCHS = $(patsubst config/arch/%.in,%,$(ARCH_CONFIG_FILES)) KERNELS = $(patsubst config/kernel/%.in,%,$(KERNEL_CONFIG_FILES)) CCS = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES)) +BINUTILSS = $(patsubst config/binutils/%.in,%,$(BINUTILS_CONFIG_FILES)) LIBCS = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES)) DEBUGS = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES)) @@ -81,6 +85,10 @@ config.gen/cc.in: $(CC_CONFIG_FILES) $(CC_CONFIG_FILES_2) @$(ECHO) ' IN $(@)' $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C compiler" "CC" "config/cc" "N" $(CCS) +config.gen/binutils.in: $(CC_BINUTILS_FILES) $(CC_BINUTILS_FILES_2) + @$(ECHO) ' IN $(@)' + $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Binutils" "BINUTILS" "config/binutils" "N" $(BINUTILSS) + config.gen/libc.in: $(LIBC_CONFIG_FILES) $(LIBC_CONFIG_FILES_2) @$(ECHO) ' IN $(@)' $(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C library" "LIBC" "config/libc" "Y" $(LIBCS) -- cgit v1.2.3