Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:greearb/xorp.ct
Browse files Browse the repository at this point in the history
  • Loading branch information
greearb committed Jul 8, 2010
2 parents 15273be + f377040 commit 4e5d93f
Show file tree
Hide file tree
Showing 20 changed files with 150 additions and 13 deletions.
3 changes: 3 additions & 0 deletions xorp/BUILD_NOTES
Expand Up @@ -354,6 +354,9 @@ scons check
to compile XORP 1.7 and above, primarily due to scons and
python dependencies.

* If compiling with shared=no, you should also install static glibc
openssl and other needed libraries.

* Linux Red Hat Enterprise Linux Server release 5 (Tikanga)
(kernel 2.6.18-8.el5)
- Optionally install the following packages:
Expand Down
17 changes: 9 additions & 8 deletions xorp/SConstruct
Expand Up @@ -868,6 +868,14 @@ if env['debug_cb']:
# This allows the package itself to be relocated in the filesystem
# as a whole. This also allows us to run binaries before we ship them.
#

# Go ahead and define some variables here so that SConscript files are not
# so repetitive when dealing with RPATH, etc.
# Since we are building static, they should be ignored anyway.
env['xorp_sbin_rpath'] = env['xorp_libdir']
env['xorp_tool_rpath'] = env['xorp_libdir']
env['xorp_module_rpath'] = env['xorp_libdir']

if env.has_key('SHAREDLIBS'):
if env['rtld_origin']:
#
Expand Down Expand Up @@ -917,14 +925,7 @@ if env.has_key('SHAREDLIBS'):
env['xorp_module_rpath'] = os.path.join('\\$$ORIGIN',
os.path.relpath(env.Dir('$xorp_libdir').abspath,
env.Dir('$xorp_moduledir').abspath))
else:
# Hardcode the RPATH to our final destination.
# Developers will need to set LD_LIBRARY_PATH until they install
# binaries from the BUILDDIR.
env['xorp_sbin_rpath'] = env['xorp_libdir']
env['xorp_tool_rpath'] = env['xorp_libdir']
env['xorp_module_rpath'] = env['xorp_libdir']


# Export global symbols as dynamic in executables for runtime backtraces
# w/o GDB or corefiles in production deployments.
# NOTE: GNU ld specific flag.
Expand Down
10 changes: 8 additions & 2 deletions xorp/bgp/SConscript
Expand Up @@ -28,9 +28,15 @@ subdirs = [

SConscript(dirs = subdirs, exports='env')

bgp_env = env.Clone()
is_shared = env.has_key('SHAREDLIBS')

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

is_shared = bgp_env.has_key('SHAREDLIBS')
bgp_env = env.Clone()

bgp_env.AppendUnique(CPPPATH = [
'#',
Expand Down
12 changes: 12 additions & 0 deletions xorp/bgp/harness/SConscript
Expand Up @@ -68,6 +68,18 @@ if not (env.has_key('disable_profile') and env['disable_profile']):
'xif_profile_client',
])

is_shared = env.has_key('SHAREDLIBS')
if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])
# This is really needed, belive it or not.
env.Append(LIBS = [
'xorp_core',
]);


coord_srcs = [
'bgppp.cc',
'command.cc',
Expand Down
8 changes: 8 additions & 0 deletions xorp/bgp/tools/SConscript
Expand Up @@ -22,6 +22,8 @@ Import('env')

env = env.Clone()

is_shared = env.has_key('SHAREDLIBS')

env.AppendUnique(CPPPATH = [
'#',
'$BUILDDIR',
Expand Down Expand Up @@ -57,6 +59,12 @@ env.AppendUnique(LIBS = [
'xif_finder_event_notifier',
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

if not (env.has_key('disable_profile') and env['disable_profile']):
env.AppendUnique(LIBS = [
'xif_profile_client',
Expand Down
11 changes: 10 additions & 1 deletion xorp/cli/tools/SConscript
Expand Up @@ -22,6 +22,8 @@ Import('env')

env = env.Clone()

is_shared = env.has_key('SHAREDLIBS')

env.AppendUnique(CPPPATH = [
'#',
'$BUILDDIR',
Expand All @@ -45,9 +47,16 @@ env.AppendUnique(LIBS = [
'xorp_comm',
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_tool_rpath'])
])
])


cligensrcs = [
'cli_generic.cc'
Expand Down
6 changes: 6 additions & 0 deletions xorp/contrib/olsr/SConscript
Expand Up @@ -70,6 +70,12 @@ env.AppendUnique(LIBS = [
'xorp_comm',
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

if not (env.has_key('disable_ipv6') and env['disable_ipv6']):
env.AppendUnique(LIBS = [
'xif_fea_rawpkt6',
Expand Down
6 changes: 6 additions & 0 deletions xorp/contrib/olsr/tools/SConscript
Expand Up @@ -49,6 +49,12 @@ env.AppendUnique(LIBS = [
'xif_olsr4',
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

cleardbsrcs = [
'clear_database.cc'
]
Expand Down
6 changes: 6 additions & 0 deletions xorp/fea/SConscript
Expand Up @@ -129,6 +129,12 @@ if env.has_key('has_libpcap') and env['has_libpcap']:
if is_shared:
env.AppendUnique(LINKFLAGS = [ '-Wl,-z,defs', ])

else:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

libxorp_fea_srcs = [
'fea_io.cc',
'fea_node.cc',
Expand Down
8 changes: 8 additions & 0 deletions xorp/fea/tools/SConscript
Expand Up @@ -22,6 +22,8 @@ Import('env')

env = env.Clone()

is_shared = env.has_key('SHAREDLIBS')

env.AppendUnique(CPPPATH = [
'#',
'$BUILDDIR',
Expand Down Expand Up @@ -49,6 +51,12 @@ env.AppendUnique(LIBS = [
'xorp_comm',
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_tool_rpath'])
])
Expand Down
6 changes: 6 additions & 0 deletions xorp/fib2mrib/SConscript
Expand Up @@ -61,6 +61,12 @@ env.AppendUnique(LIBS = [
'xorp_comm'
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_module_rpath'])
])
Expand Down
6 changes: 6 additions & 0 deletions xorp/libxipc/SConscript
Expand Up @@ -210,6 +210,12 @@ env.AppendUnique(LIBS = [
'xorp_core'
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_sbin_rpath'])
])
Expand Down
6 changes: 6 additions & 0 deletions xorp/mld6igmp/SConscript
Expand Up @@ -60,6 +60,12 @@ env.AppendUnique(LIBS = [
'xorp_comm'
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

libxorp_mld6igmp_srcs = [
'mld6igmp_config.cc',
'mld6igmp_group_record.cc',
Expand Down
6 changes: 6 additions & 0 deletions xorp/pim/SConscript
Expand Up @@ -63,6 +63,12 @@ env.AppendUnique(LIBS = [
'xorp_comm'
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

if not (env.has_key('disable_ipv6') and env['disable_ipv6']):
env.AppendUnique(LIBS = [
'xif_fea_rawpkt6',
Expand Down
6 changes: 6 additions & 0 deletions xorp/policy/SConscript
Expand Up @@ -61,6 +61,12 @@ env.AppendUnique(LIBS = [
'xorp_comm'
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_module_rpath'])
])
Expand Down
6 changes: 6 additions & 0 deletions xorp/rib/SConscript
Expand Up @@ -74,6 +74,12 @@ env.AppendUnique(LIBS = [
'xorp_comm'
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_module_rpath'])
])
Expand Down
7 changes: 7 additions & 0 deletions xorp/rib/tools/SConscript
Expand Up @@ -48,6 +48,13 @@ env.AppendUnique(LIBS = [
'xorp_comm',
])

is_shared = env.has_key('SHAREDLIBS')
if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_tool_rpath'])
])
Expand Down
18 changes: 16 additions & 2 deletions xorp/rip/SConscript
Expand Up @@ -123,6 +123,12 @@ e.PrependUnique(LIBS = [
'xorp_core',
])

if not is_shared:
e.AppendUnique(LIBS = [
"crypto",
"rt",
])

e.Replace(RPATH = [
e.Literal(e['xorp_module_rpath'])
])
Expand Down Expand Up @@ -204,12 +210,20 @@ if not (env.has_key('disable_ipv6') and env['disable_ipv6']):
'xorp_proto',
'xorp_ipc',
'xorp_comm',
'xorp_core',
'xorp_ripng',
'xif_socket6',
'xorp_core',
])


if not is_shared:
e.AppendUnique(LIBS = [
"crypto",
"rt",
])
e.Append(LIBS = [
'xorp_policy_backend',
])

e.Replace(RPATH = [
e.Literal(e['xorp_module_rpath'])
])
Expand Down
9 changes: 9 additions & 0 deletions xorp/rtrmgr/SConscript
Expand Up @@ -113,6 +113,15 @@ xorp_paths = {
"XORP_SRC_ROOT" : '\\"' + str(env['xorp_sourcedir']) + '\\"',
}


is_shared = env.has_key('SHAREDLIBS')
if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])


util_cc_env = env.Clone()
util_cc_env.AppendUnique(CPPDEFINES=xorp_paths.items())
obj_util = util_cc_env.StaticObject(source='util.cc')
Expand Down
6 changes: 6 additions & 0 deletions xorp/static_routes/SConscript
Expand Up @@ -60,6 +60,12 @@ env.AppendUnique(LIBS = [
'xorp_comm',
])

if not is_shared:
env.AppendUnique(LIBS = [
"crypto",
"rt",
])

env.Replace(RPATH = [
env.Literal(env['xorp_module_rpath'])
])
Expand Down

0 comments on commit 4e5d93f

Please sign in to comment.