[ovs-discuss] Cross-compile to mipsel host

Ben Pfaff blp at nicira.com
Tue Sep 25 06:00:09 UTC 2012


On Mon, Sep 24, 2012 at 05:35:15PM -0700, Russ Weeks wrote:
> I've already cross-compiled Linux 2.6.23 for mipsel.  I configure
> openvswitch using this command:
> 
> ./configure \
>   --prefix=$OUTPUT_DIR \
>   --with-linux=/opt/netgear/ddwrt_src/src/linux/brcm/linux-2.6.23 \
>   KARCH=mipsel \
>   CC=mipsel-linux-uclibc-gcc \
>   AR=mipsel-linux-uclibc-ar \
>   LD=mipsel-linux-uclibc-ld \
>   RANLIB=mipsel-linux-uclibc-ranlib \
>   STRIP=mipsel-linux-uclibc-strip \
>   --host=mipsel \
>   CFLAGS="-std=gnu99 -g -I${TOOL}/include/
> -I/opt/netgear/openvswitch-1.7.1/datapath/linux/compat/include/
> -L${TOOL}/lib/" \

The -I here must be wrong.  The files under datapath/linux/... are
intended only for internal use by the OVS kernel module, but adding this
-I to CFLAGS will make them visible to the OVS userspace.

I wouldn't add any special -I to CFLAGS at all, unless there are no
Linux kernel headers in mipsel-linux-uclibc-gcc's default include path.



More information about the discuss mailing list