[Xorp-cvs] SF.net SVN: xorp:[11583] trunk/xorp/SConstruct

bms_fbsd at users.sourceforge.net bms_fbsd at users.sourceforge.net
Thu Nov 26 12:15:21 PST 2009


Revision: 11583
          http://xorp.svn.sourceforge.net/xorp/?rev=11583&view=rev
Author:   bms_fbsd
Date:     2009-11-26 20:15:21 +0000 (Thu, 26 Nov 2009)

Log Message:
-----------
When allowing the user to override CFLAGS/CXXFLAGS/LINKFLAGS on
the command line, don't obliterate what's already there.

SCons stashes some useful defaults in there, and RPATH support
breaks if you clobber LINKFLAGS in this way. This isn't a bug in
SCons, rather how we use it.

We need RPATH working to resolve some issues with:
 1) installing shared libraries in a retargettable system location (i.e.
    by using $ORIGIN relative paths in ELF rtld),
 2) running the regression tests in a non-cross, shared-library build.

Currently, we need to relink every time we change DESTDIR.

Don't forget that the RPATH variable needs to see expanded paths,
as they are passed to the linker unescaped. For $ORIGIN, each SConscript
will need to compute its own relative paths, depending on which directory
layout we're using in the stage tree or installation tree. Use
Python 2.6 os.path.relpath() for this.

While we're here, allow the user to override the AutoTest() builder's
default behaviour to ignore errors during a 'scons check' run,
by passing 'ignore_check_errors=true' on the command line.

SCons bug ID:	http://scons.tigris.org/issues/show_bug.cgi?id=1644

Modified Paths:
--------------
    trunk/xorp/SConstruct

Modified: trunk/xorp/SConstruct
===================================================================
--- trunk/xorp/SConstruct	2009-11-26 19:14:41 UTC (rev 11582)
+++ trunk/xorp/SConstruct	2009-11-26 20:15:21 UTC (rev 11583)
@@ -61,6 +61,7 @@
 vars.AddVariables(
     BoolVariable('shared', 'build with shared libraries', False),
     BoolVariable('strip',  'strip executables and libraries when installed', False),
+    BoolVariable('ignore_check_errors', 'Ignore errors when building tests', False),
     BoolVariable('debug_stl',  'Build with checked STL operations', False),
     BoolVariable('debug_msg',  'Build with debug messages', False),
     BoolVariable('debug_fn',  'Build with function names in debug_msg output', False),
@@ -138,6 +139,10 @@
     env['SHAREDLIBS'] = "defined"
 print 'Shared libraries: ', env.has_key('SHAREDLIBS')
 
+if env['ignore_check_errors']:
+    env['AUTOTEST_SKIP_ERRORS'] = True
+print 'Ignore test errors: ', env.has_key('AUTOTEST_SKIP_ERRORS')
+
 print 'Debug STL:        ', env['debug_stl']
 # XXX Enabling debug messages for the whole tree may not be what you want,
 # as it can lead to premature timeouts.
@@ -317,9 +322,9 @@
 
 ########## end configure magic
 
-env['CFLAGS'] = Split(ARGUMENTS.get('CFLAGS', "-g"))
-env['CXXFLAGS'] = Split(ARGUMENTS.get('CXXFLAGS', "-g"))
-env['LINKFLAGS'] = Split(ARGUMENTS.get('LINKFLAGS', ""))
+env.AppendUnique( CFLAGS = Split(ARGUMENTS.get('CFLAGS', "-g")) )
+env.AppendUnique( CXXFLAGS = Split(ARGUMENTS.get('CXXFLAGS', "-g")) )
+env.AppendUnique( LINKFLAGS = Split(ARGUMENTS.get('LINKFLAGS', "")) )
 
 env.AppendUnique(CPPDEFINES = [
     ( '_FORTIFY_SOURCE', 0 ),
@@ -384,9 +389,11 @@
         '-DDEBUG_CALLBACKS',
     ])
 
-env.AppendUnique(RPATH = [
-    '$libdir',
-    ])
+# XXX: This should not yet be needed, we do not yet install
+# libs into a single libdir in the community XORP installation layout.
+#env.AppendUnique(RPATH = [
+#    '$libdir',
+#    ])
 
 # Export dynamic symbols in executables for runtime backtraces w/o GDB.
 env.AppendUnique(LINKFLAGS = [


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Xorp-cvs mailing list