The old cross compiler I was using was an arm-linux rather than arm-elf. It would compile OK bu the programs wouldn't run on the board beacuse they were trying to make system calls. This new compiler works fine other than for the configure problem.
I did a search for that sys/param.h file. It does exists for the new comiler but it is very short:
/* ARM configuration file; HZ is 100 rather than the default 60 */
#ifndef _SYS_PARAM_H # define _SYS_PARAM_H
# define HZ (100) # define NOFILE (60) # define PATHSIZE (1024)
#endif
There is no mention of BIG_ENDIAN LITTLE_ENDIAN etc. Here is the param.h from the compiler that worked :
#ifndef _SYS_PARAM_H #define _SYS_PARAM_H 1
#include <limits.h> #include <linux/limits.h> #include <linux/param.h>
/* BSD names for some <limits.h> values. */
#define NBBY CHAR_BIT #ifndef NGROUPS # define NGROUPS NGROUPS_MAX #endif #define MAXSYMLINKS 20 #define CANBSIZ MAX_CANON #define NCARGS ARG_MAX #define MAXPATHLEN PATH_MAX /* The following is not really correct but it is a value we used for a long time and which seems to be usable. People should not use NOFILE anyway. */ #define NOFILE 256
#include <sys/types.h>
/* Bit map related macros. */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
/* Macros for counting and rounding. */ #ifndef howmany # define howmany(x, y) (((x)+((y)-1))/(y)) #endif #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #define powerof2(x) ((((x)-1)&(x))==0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b))
/* Unit of `st_blocks'. */ #define DEV_BSIZE 512
#endif /* sys/param.h */
This doesn't mention BIG_ENDIAN LITTLE_ENDIAN or anything either. Is there anwhere else it could be getting the information from?
On Mon, 6 May 2002 02:35:54 +0100 (BST) Andre armccurdy@yahoo.co.uk wrote:
Gareth Bransby G.C.Bransby-99@student.lboro.ac.uk wrote:
Now when i do ./configure I get the error :
configure: error: can not run test program while cross compiling
I understand why it can't run the test program but it never had a problem with the other cross-compiler. I tried giving it the --build=1686-linux along with the --host=arm-elf option so it would _know_ it was cross compiling but this made no difference.
Most likely, your 'new' cross compiler doesn't come with a full set of header files and there is a property of the target system which isn't known (and can't be found without running a test program).
First guess at solution: try making sure that sys/param.h exists in your new cross compiler environment, and that it correctly defines BIG_ENDIAN, LITTLE_ENDIAN and BYTE_ORDER.
(A quick description of what was wrong with the old cross compiler, and what is different about the new one, might be useful if you want any more help than this.... ).
Andre
Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com