[Xorp-users] Need suggestion about Embedded platform requirments.

Ben Greear greearb at candelatech.com
Tue Jun 29 14:43:38 PDT 2010


On 06/29/2010 02:40 PM, Ben Greear wrote:
> On 06/29/2010 01:02 PM, naresh raga wrote:
>> Hi Ben,
>> I have built xorp.ct-1.8 on my system.The scons command used to build is:
>> scons -j4 disable_ipv6=yes disable_fw=yes enable_olsr=no optimize=size
>> disable_profile=yes strip=yes.
>> The build is successful and the size of /usr/local/xorp came around
>> 13.3 MB.
>> I have tried to build same xorp.ct-1.8 with cross-compiler tool
>> chain.The command used is:
>
> This command below got me past the openssl part, but now we need a
> cross-compiled ncurses library.
>
> scons CC=arm-linux-gcc CXX=arm-linux-g++
> CXXFLAGS=-I/home/greearb/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/usr/local/ssl/include
> LINKFLAGS=-L/home/greearb/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/usr/local/ssl/lib
> CFLAGS=-I/home/greearb/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/usr/local/ssl/include

I should have mentioned..I had these hacks to SConstruct in as well.  Trying to figure out the
right way to do this now:

[greearb at ben-dt2 xorp]$ git diff
diff --git a/xorp/SConstruct b/xorp/SConstruct
index 04307ce..43346c3 100644
--- a/xorp/SConstruct
+++ b/xorp/SConstruct
@@ -159,13 +159,22 @@ if (len(COMMAND_LINE_TARGETS) == 0):

  # XXX TODO: Make initial CPPPATH/LIBPATH derive from
  # autodetected host system *or* command line.
+#env = Environment(
+#                TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen',
+#                         'TOOL_SUBST'],
+#                ENV = os.environ,
+#                BUILDDIR = builddir,
+#                CPPPATH=['/usr/local/include', '$BUILDDIR'],
+#                LIBPATH=['usr/lib', '/usr/local/lib'],
+#                variables = vars)
+
  env = Environment(
                   TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen',
                            'TOOL_SUBST'],
                   ENV = os.environ,
                   BUILDDIR = builddir,
-                 CPPPATH=['/usr/local/include', '$BUILDDIR'],
-                 LIBPATH=['usr/lib', '/usr/local/lib'],
+                 CPPPATH=['$BUILDDIR'],
+                 LIBPATH=['usr/lib'],
                   variables = vars)

  prefix = env['prefix']
@@ -499,6 +508,10 @@ else:
  if not env.GetOption('clean') and \
     not env.GetOption('help'):

+    env.AppendUnique( CFLAGS = Split(ARGUMENTS.get('CFLAGS', '')) )
+    env.AppendUnique( CXXFLAGS = Split(ARGUMENTS.get('CXXFLAGS', '')) )
+    env.AppendUnique( LINKFLAGS = Split(ARGUMENTS.get('LINKFLAGS', '')) )
+
      env['MISSING_DEPS'] = []
      env['SKIPPED_DEPS'] = []

@@ -638,10 +651,6 @@ if SCons.Tool.FindTool(['gcc'], env) is None or \
     SCons.Tool.FindTool(['g++'], env) is None:
      print gnutoolwarning % 'gcc or g++ compiler'

-env.AppendUnique( CFLAGS = Split(ARGUMENTS.get('CFLAGS', '')) )
-env.AppendUnique( CXXFLAGS = Split(ARGUMENTS.get('CXXFLAGS', '')) )
-env.AppendUnique( LINKFLAGS = Split(ARGUMENTS.get('LINKFLAGS', '')) )
-
  # If the user didn't override our default optimization, then
  # sanitize user's CFLAGS/CXXFLAGS to not contain optimization options,
  # and map to an appropriate GCC flag.


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-users mailing list