building gcc-3.2.3 as a cross compiler to make cygwin programs

bertrand marquis bertrand_marquis@yahoo.fr
Tue Mar 23 17:22:00 GMT 2004


hello

i have build gcc-3.2.3 as a cross compiler on a linux pc to make cygwin 
programs (host=i686-pc-gnu-linux target=i686-pc-cygwin).
Those work fine but the programs produced by the compiler doesn't work 
under cygwin. In fact it seems that they cannot access the filesystems.

for example this program:
__Begin_of_program__
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

main()
{
	struct stat st;
	if (stat ("/mnt", &st) < 0
	  || S_ISDIR (st.st_mode))
	printf("-1\n");
	else
	printf("0\n");
}
__end_of_program__

it compile without any error or warning but under cygwin i have 0 as a 
result but the directory /mnt exist and the same program built with 
cygwin's gcc or gcc-3.2.3 compiled under cygwin work.

if anyone had an idea


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list