diff mbox

[07,of,13] binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom

Message ID 288db3721a37844defa5.1349931196@localhost.localdomain
State Accepted
Commit a221c86d9b33
Headers show

Commit Message

David Holsgrove Oct. 11, 2012, 4:53 a.m. UTC
# HG changeset patch
# User David Holsgrove <david.holsgrove@xilinx.com>
# Date 1349930382 -36000
# Node ID 288db3721a37844defa55bb6f588c8f7a1ac3dae
# Parent  7a604b5df9c84a1e20c3de3f04df0ed25bd491cb
binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom

CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Change elf2flt CT_ELF2FLT_VERSION from 'head' to 'cvs' if cvs selected in config

Also remove hardcoded 'cvs-' from elf2flt component name, used in CT_Extract,
CT_Patch and as the CT_SRC_DIR location for the configure stage.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>


--
For unsubscribe information see http://sourceware.org/lists.html#faq

Comments

Yann E. MORIN Oct. 29, 2012, 11:27 p.m. UTC | #1
David, All,

Your patch:
    binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom

has been applied as: #a221c86d9b33
    http://crosstool-ng.org/hg/crosstool-ng/rev/a221c86d9b33

Thank you!

Regards,
Yann E. MORIN.



--
For unsubscribe information see http://sourceware.org/lists.html#faq
diff mbox

Patch

diff -r 7a604b5df9c8 -r 288db3721a37 config/binutils/elf2flt.in
--- a/config/binutils/elf2flt.in	Thu Oct 11 14:39:41 2012 +1000
+++ b/config/binutils/elf2flt.in	Thu Oct 11 14:39:42 2012 +1000
@@ -20,8 +20,26 @@ 
     bool
     prompt "CVS Snapshot"
 
+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
+if ! ELF2FLT_CUSTOM
+
 config ELF2FLT_CVS_SNAPSHOT_SPEC
     string
     depends on ELF2FLT_CVS_SNAPSHOT
@@ -31,9 +49,12 @@ 
        What you enter here will be passed verbatim to the cvs checkout command
        so be careful!
 
+endif # ! ELF2FLT_CUSTOM
+
 config ELF2FLT_VERSION
     string
-    default "head" if ELF2FLT_CVSHEAD
+    default "cvs" if ELF2FLT_CVSHEAD
+    default "custom" if ELF2FLT_CUSTOM
 # Don't remove next line
 # CT_INSERT_VERSION_STRING_BELOW
 
diff -r 7a604b5df9c8 -r 288db3721a37 scripts/build/binutils/elf2flt.sh
--- a/scripts/build/binutils/elf2flt.sh	Thu Oct 11 14:39:41 2012 +1000
+++ b/scripts/build/binutils/elf2flt.sh	Thu Oct 11 14:39:42 2012 +1000
@@ -13,17 +13,25 @@ 
 
 # Download elf2flt
 do_elf2flt_get() {
-    CT_GetCVS "elf2flt-cvs-${CT_ELF2FLT_VERSION}"           \
-              ":pserver:anonymous@cvs.uclinux.org:/var/cvs" \
-              "elf2flt"                                     \
-              "" \
-              "elf2flt-cvs-${CT_ELF2FLT_VERSION}"
+    if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then
+        CT_GetCustom "elf2flt" "${ELF2FLT_VERSION}" \
+        "${CT_ELF2FLT_CUSTOM_LOCATION}"
+    else
+        CT_GetCVS "elf2flt-${CT_ELF2FLT_VERSION}"           \
+                  ":pserver:anonymous@cvs.uclinux.org:/var/cvs" \
+                  "elf2flt"                                     \
+                  "" \
+                  "elf2flt-${CT_ELF2FLT_VERSION}"
+    fi
 }
 
 # Extract elf2flt
 do_elf2flt_extract() {
-    CT_Extract "elf2flt-cvs-${CT_ELF2FLT_VERSION}"
-    CT_Patch "elf2flt-cvs" "${CT_ELF2FLT_VERSION}"
+    if [ "${CT_ELF2FLT_CUSTOM}" != "y" \
+         -o ! -d "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}" ]; then
+        CT_Extract "elf2flt-${CT_ELF2FLT_VERSION}"
+    fi
+    CT_Patch "elf2flt" "${CT_ELF2FLT_VERSION}"
 }
 
 # Build elf2flt for build -> target
@@ -111,7 +119,7 @@ 
     CT_DoLog EXTRA "Configuring elf2flt"
     CT_DoExecLog CFG                                            \
     CFLAGS="${host_cflags}"                                     \
-    "${CT_SRC_DIR}/elf2flt-cvs-${CT_ELF2FLT_VERSION}/configure" \
+    "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \
         --build=${CT_BUILD}                                     \
         --host=${host}                                          \
         --target=${CT_TARGET}                                   \