[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r6846 - in gnuradio/branches/developers/eb/cross: conf
From: |
eb |
Subject: |
[Commit-gnuradio] r6846 - in gnuradio/branches/developers/eb/cross: config dtools/bin |
Date: |
Fri, 9 Nov 2007 16:16:46 -0700 (MST) |
Author: eb
Date: 2007-11-09 16:16:45 -0700 (Fri, 09 Nov 2007)
New Revision: 6846
Modified:
gnuradio/branches/developers/eb/cross/config/pkg.m4
gnuradio/branches/developers/eb/cross/dtools/bin/tweak-cell-for-cross-compiling
Log:
work-in-progress
Modified: gnuradio/branches/developers/eb/cross/config/pkg.m4
===================================================================
--- gnuradio/branches/developers/eb/cross/config/pkg.m4 2007-11-09 06:21:48 UTC
(rev 6845)
+++ gnuradio/branches/developers/eb/cross/config/pkg.m4 2007-11-09 23:16:45 UTC
(rev 6846)
@@ -31,7 +31,7 @@
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
+ _pkg_min_version=m4_default([$1], [0.18])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
@@ -116,9 +116,9 @@
if test x$cross_compiling = xyes
then
- _PKG_CONFIG([$1][_LIBS], [libs-only-l], [$2])
+ _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2])
else
- _PKG_CONFIG([$1][_LIBS], [libs], [$2])
+ _PKG_CONFIG([$1][_LIBS], [libs --static], [$2])
fi
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables
$1[]_CFLAGS
Modified:
gnuradio/branches/developers/eb/cross/dtools/bin/tweak-cell-for-cross-compiling
===================================================================
---
gnuradio/branches/developers/eb/cross/dtools/bin/tweak-cell-for-cross-compiling
2007-11-09 06:21:48 UTC (rev 6845)
+++
gnuradio/branches/developers/eb/cross/dtools/bin/tweak-cell-for-cross-compiling
2007-11-09 23:16:45 UTC (rev 6846)
@@ -44,8 +44,7 @@
import shutil
import re
-symlink_path = '/mnt/cell-root'
-symlink_contents = '..'
+cell_root_path = '/mnt/cell-root'
def ensure_cell():
s = open('/proc/cpuinfo','r').read()
@@ -53,31 +52,44 @@
sys.stderr.write('This program should only be run on Cell machines.\n')
raise SystemExit, 1
-def symlink_exists_and_is_ok():
- return (os.path.islink(symlink_path)
- and os.readlink(symlink_path) == symlink_contents)
+def make_symlinks():
+ create_symlink_if_reqd(cell_root_path, "..")
+ create_symlink_if_reqd("/opt/cell/toolchain", "../../usr")
+ create_symlink_if_reqd("/opt/cell/sysroot", "../..")
-def make_symlink():
- os.symlink(symlink_contents, symlink_path)
+def symlink_exists_and_is_ok(path, contents):
+ return (os.path.islink(path) and os.readlink(path) == contents)
-def create_cell_root_symlink():
- if symlink_exists_and_is_ok():
+def create_symlink_if_reqd(path, contents):
+ if symlink_exists_and_is_ok(path, contents):
return
- if os.path.islink(symlink_path):
+ if os.path.islink(path):
# Is a symlink but points wrong place
- os.remove(symlink_path)
- make_symlink()
+ os.remove(path)
+ os.symlink(contents, path)
return
- if os.path.exists(symlink_path):
+ if os.path.isdir(path):
+ # if it's empty we'll remove it and create the link
+ try:
+ os.rmdir(path)
+ except:
+ # directory wasn't empty
+ sys.stderr.write("There's already something at %s.\n" % (path,))
+ sys.stderr.write("Please remove it or move it out of the way and
try again.\n")
+ raise SystemExit, 1
+ os.symlink(contents, path)
+ return
+
+ if os.path.exists(path):
# There's something here, return an error
- sys.stderr.write("There's already something at %s.\n" %
(symlink_path,))
+ sys.stderr.write("There's already something at %s.\n" % (path,))
sys.stderr.write("Please remove it or move it out of the way and try
again.\n")
raise SystemExit, 1
# nothing there; go ahead and create the symlink
- make_symlink()
+ os.symlink(contents, path)
def find_ascii_shared_libs():
@@ -92,10 +104,11 @@
if not os.path.exists(dst):
shutil.copy2(src, dst)
+
def edit_file(name):
def replace_group_body(mo):
- pat = ' /(?!' + symlink_path[1:] + ')' # negative lookahead assertion
- new = re.sub(pat, ' ' + symlink_path + '/', mo.group(2))
+ pat = ' /(?!' + cell_root_path[1:] + ')' # negative lookahead
assertion
+ new = re.sub(pat, ' ' + cell_root_path + '/', mo.group(2))
return mo.group(1) + new + mo.group(3)
f = open(name,'r')
@@ -111,6 +124,7 @@
def edit_ascii_shared_libs():
+ print "Please be patient, this takes awhile..."
filenames = find_ascii_shared_libs()
for f in filenames:
make_backup_copy(f)
@@ -119,7 +133,7 @@
def main():
ensure_cell()
- create_cell_root_symlink()
+ make_symlinks()
edit_ascii_shared_libs()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r6846 - in gnuradio/branches/developers/eb/cross: config dtools/bin,
eb <=