[Xorp-users] Cross-Compilation PPC Architecture patches

Pavlin Radoslavov pavlin at icir.org
Thu Nov 29 09:19:45 PST 2007


Scher, Dave <dscher at mitre.org> wrote:

> Thanks for the heads up.  I rechecked out the --prefix and yes it means
> something different than what I had previously thought.  I have removed
> the --prefix incantation from the configure command line which now
> looks something like this: 
> 
> ./configure --host=$CROSS_ARCH
> --with-openssl=/opt/embedded/tools/ppc_85xx/usr
> 
> I read section H and did the following.  I am not familiar with the
> subtle differences between *export and *setenv, but for some reason the
> setenv binary was not present on my system so I used the following:
> 
> Export CROSS_ARCH=powerpc-linux
> Export CROSS_ROOT=/opt/embedded/tools/ppc_85xx/usr
> Export CROSS_LINUX_ROOT=$CROSS_ROOT/$CROSS_ARCH
> Export CC=$CROSS_ROOT/bin/$CROSS_ARCH-gcc
> Export CXX=$CROSS_ROOT/bin/$CROSS_ARCH-g++
> Export LD=$CROSS_ROOT/bin/$CROSS_ARCH-ld
> Export RANLIB=$CROSS_ROOT/bin/$CROSS_ARCH-ranlib
> Export NM=$CROSS_ROOT/bin/$CROSS_ARCH-nm

"setenv" is used in csh/tcsh to set environmental variable.

> Getting farther into compilation, but I now have the following error:
> 
> Cc1plus: warnings being treated as errors
> Yacc.yy_policy_backend_parser.cc:3 warning: 'yyrcsid' defined but not
> used.

Interesting. What cross-compiler (incl. version) are you using?
We are using a variety of gcc compilers, but none of them generates
warning on this particular line. Anyway, you can fix this by just
commenting-out this particular line. E.g., the first 4 lines in file
policy/yacc.yy_policy_parser.cc are:

#ifndef lint
static char const
yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28.2.1 2001/07/19 05:46:39 peter Exp $";
#endif

Just change the first line "#ifndef lint" to "#if 0".
If there are similar errors in some of the other yacc auto-generated
files, then use same solution for all of them.

> Perhaps there is a compiler flag that is only allowing for strict
> compilation.

Yes, there is such flag which is explicitly enabled in configure.in
(and the auto-generated configure and Makefiles), but removing it
there is going to be much more complicated for you: you need to
install the right version of the autotools/etc.

> I seem to have completed compilation of the cli/libtecla library; so
> that's a plus.
> When I checked the configuration script, it seemed to find the correct
> tools without setting env. Var.
> But after setting them, the libtecla library compiled.  
> 
> Any clue on the next error?

See above.

Thanks,
Pavlin



More information about the Xorp-users mailing list