[Spread-users] Cross Compile for ARM
Arkadius Nowakowski
anowa at freenet.de
Sat Oct 2 19:31:09 EDT 2004
Hello,
It worked for me by calling configure like this:
CC=arm-linux-gcc RANLIB=arm-linux-ranlib AR=arm-linux-ar LD=arm-linux-gcc \
./configure --target=arm-linux --host=arm-linux
Furthermore I have had to remove the check for snprintf inside the
configure script. The diff is attached to this mail.
Thankx for your help!
Best regards,
Arkadius
On Sat, Oct 02, 2004 at 06:22:40PM -0400, G. Naik wrote:
> Arkadius,
>
> This may be a little overkill, but it works for me:
>
> - Set the following environment variables
>
> CC=arm-linux-gcc
> RANLIB=arm-linux-ranlib
> AR=arm-linux-ar
> LD=arm-linux-gcc
>
> - execute configure with the following parameters:
>
> ./configure --target=arm-linux --host=arm-linux
>
> Let me know if it works out for you,
> gn
>
>
> On Oct 2, 2004, at 4:48 PM, Arkadius Nowakowski wrote:
>
> >Hi,
> >
> >Is there a way to compile spread for ARM architecture?
> >How can the compiler (gcc) be changed in something like arm-linux-gcc?
> >
> >Best regards,
> >
> >--
> >
> >Arkadius Nowakowski
> >
> >email : anowa at freenet.de
> >gnupg : http://www.fh-augsburg.de/~nowarek/anowa.gpg
> >icq# : 107518121
> >jabber : ting at amessage.de
> >
> >
> >_______________________________________________
> >Spread-users mailing list
> >Spread-users at lists.spread.org
> >http://lists.spread.org/mailman/listinfo/spread-users
>
--
Arkadius Nowakowski
email : anowa at freenet.de
gnupg : http://www.fh-augsburg.de/~nowarek/anowa.gpg
icq# : 107518121
jabber : ting at amessage.de
-------------- next part --------------
--- configure 2004-10-03 01:17:44.000000000 +0200
+++ configure 2004-10-03 01:17:17.000000000 +0200
@@ -1881,6 +1881,44 @@
fi
done
+
+# Check for broken snprintf
+if test "x$ac_cv_func_snprintf" = "xyes" ; then
+ echo $ac_n "checking whether snprintf correctly terminates long strings""... $ac_c" 1>&6
+echo "configure:1890: checking whether snprintf correctly terminates long strings" >&5
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1895 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
+
+EOF
+if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<\EOF
+#define BROKEN_SNPRINTF 1
+EOF
+
+ echo "configure: warning: ****** Your snprintf() function is broken, complain to your vendor" 1>&2
+
+
+fi
+rm -fr conftest*
+fi
+
+fi
+
# Cheap hack to ensure NEWS-OS libraries are arranged right.
if test ! -z "$SONY" ; then
LIBS="$LIBS -liberty";
More information about the Spread-users
mailing list