This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] populate: add support for alternate sysroot


Add a new command line option, "-r", which allows the user to specify
an alternate sysroot location to copy libraries from.  This is useful
when using the toolchain in combination with a separate root filesystem,
or when working with multiple different root filesystems.

Signed-off-by: Nate Case <ncase@xes-inc.com>

diff -r 76b1923da63d -r 0a8779de742c scripts/populate.in
--- a/scripts/populate.in	Sat Mar 20 18:42:34 2010 +0100
+++ b/scripts/populate.in	Tue Mar 23 13:19:59 2010 -0500
@@ -38,6 +38,9 @@
     -d dst_dir
         use 'dst_dir' as the place to put the populated root directory
 
+    -r sysroot_dir
+        use 'sysroot_dir' as the sysroot instead of the toolchain default
+
     -l name1[:name2[...]]
         Always add the specified shared library/ies name1, name2... from the
         toolchain (in the sys-root). Actual library names are searched as
@@ -71,10 +74,11 @@
 CT_FORCE=no
 CT_PRINTF=:
 OPTIND=1
-while getopts ":s:d:l:L:fvh" CT_OPT; do
+while getopts ":s:d:r:l:L:fvh" CT_OPT; do
     case "${CT_OPT}" in
         s)  CT_ROOT_SRC_DIR="${OPTARG}";;
         d)  CT_ROOT_DST_DIR="${OPTARG}";;
+        r)  CT_SYSROOT_DIR="${OPTARG}";;
         l)  CT_LIB_LIST="${CT_LIB_LIST}:${OPTARG}";;
         L)  CT_LIB_FILE="${OPTARG}";;
         f)  CT_FORCE=y;;
@@ -100,6 +104,10 @@
     echo "$myname: '${CT_ROOT_SRC_DIR}': no such file or directory"
     exit 1
 fi
+if [ ! -d "${CT_SYSROOT_DIR}" ]; then
+    echo "$myname: '${CT_SYSROOT_DIR}': no such file or directory"
+    exit 1
+fi
 if [ -d "${CT_ROOT_DST_DIR}" -a "${CT_FORCE}" != "y" ]; then
     echo "$myname: '${CT_ROOT_DST_DIR}': already exists"
     exit 1



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]