Sam,
 
The important thing is that you must set the --host option to "ppc-ibm-linux"  and precede the configure call with CC=ppc_405-gcc (note the capital letters).
Anyway here's the makefile I'm using to cross compile net-snmp on my ppc_405 board:
 

#-------------------------------- CFLAGS ---------------------------------------

GLOBAL_CFLAGS += -D_REENTRANT

#------------------------------------------------------------------------------

#------------------------------ TARGET_FLAGS --------------------------------------

TARGET_FLAGS += -DCALL_WITHIN_OTHER_MAIN

TARGET_CFLAGS += $(CFLAGS) $(TARGET_FLAGS) $(GLOBAL_CFLAGS)

#------------------------------------------------------------------------------

TARGETCC= CC=ppc_405-gcc CXX=ppc_405-g++

NET_SNMP_CONFIG_COMMON=\
    --quiet \
    --enable-reentrant \
    --without-openssl --enable-internal-md5

NET_SNMP_CONFIG_TARGET=\
    --disable-applications \
    --disable-manuals \
    --disable-scripts \
    --disable-mibs \
    --disable-mib-loading \
    --enable-mini-agent \
    --with-out-mib-modules=examples/ucdDemoPublic \
    --with-mib-modules=agentx \
    --with-cflags="$(TARGET_CFLAGS)" \
    --with-logfile="/var/log/snmp.log" \
    --with-persistent-directory="/var/net-snmp"

NET_SNMP_CONFIG_PPC=$(NET_SNMP_CONFIG_TARGET) \
    --with-endianness=big \
    --host=ppc-ibm-linux

all:  ppc/net-snmp/Makefile
    (cd ppc/net-snmp; $(MAKE) -q all || $(MAKE) all install)

ppc_clean:
    @-rm -rf ppc/*

ppc/net-snmp/Makefile: 
    @if test ! -d ppc ; then mkdir ppc; fi
    @if test ! -d ppc/net-snmp ; then mkdir ppc/net-snmp; fi
    cd ppc/net-snmp; \
    $(TARGETCC) ../../net-snmp-5.2.1/configure --prefix=$(PWD)/ppc $(NET_SNMP_CONFIG_COMMON) $(NET_SNMP_CONFIG_PPC)

 
Regards.

Danilo Giulianelli
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 5:26 AM
To: [email protected]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: compiling Net-SNMP for powerpc_405 target machine
Importance: High
Sensitivity: Confidential

Hi

 

          i have to cross compile the Net-SNMP for ppc_405(powerpc_405) target machine. What parameters i have to use while doing ./configure.

How to do make for that.  

 

           i have to use ppc_405-gcc instead of gcc compiler.  How to change gcc? i had used   --with-cc= ppc_405-gcc but it is not taking…..

 

by

Sam

 

Reply via email to