This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Newbie - simple linux-> win 32 cross-compiler : build fails ?


>-----Original Message-----
>From: Pieter Thysebaert [mailto:pieter.thysebaert@intec.rug.ac.be]
>Sent: 19 September 2001 14:39


>>   Oops.  The headers needed are those that apply to the target, not those
>> for the host machine.  You'll need the headers that go with the mingw
>> library itself.  Take a look at...
>
>Ok... That solved my header-file problems 
>(BTW why are these windows-oriented libs (mingw runtime) needed to compile 
>the cross-compiler itself (a linux program))

  Because part of building the compiler involves building the libgcc.a
library that contains support routines for the compiled programs, and these
routines are code for the target.  This is also why you have to have the
binutils linker and assembler for the cross target installed before you can
even begin to build the compiler.

>But even with the latest MingW runtime (1.1 as it seems) 
>I still get the second error (redeclaration of 'getpagesize')
>
>(And yes I reconfigured gcc without the --with-headers= option)
>
>FYI the native compiler is gcc 2.95.2 on Debian potato
>
>Pieter

  I can't say why exactly the bug happens, not having the source code to
hand, but.... the error message you get says:

>./libgcc2.c:2582: conflicting types for `getpagesize'
>/usr/local/cross2win32/lib/gcc-lib/i386-mingw32/2.95.3/../../../../i386-
>mingw32/sys-include/unistd.h:813: 
>previous declaration of `getpagesize'
>make[1]: *** [libgcc2.a] Error 1

  So perhaps it is the case that the compiler build doesn't expect to find
getpagesize prototyped in unistd.h, and so it prototypes it locally in 
libgcc2.c; perhaps there is meant to be a test, and the prototype in 
libgcc2.c is protected by a #ifdef, but the test is going wrong and the
#ifdef is being executed when it shouldn't be.

  In this case, you could just compare the prototypes in libgcc2.c and
unistd.h, and as long as the args and return values are compatible, you
could just delete the prototype from libgcc2.c.

  However, as Reinhard is suggesting, that might not be the only problem
with the build process as described there.


     DaveK
-- 
 We explore... and you call us criminals. We seek after knowledge... and you
call us criminals. We exist without skin color, without nationality, without
religious bias... and you call us criminals. You build atomic bombs, you 
wage wars, you murder, cheat, and lie to us and try to make us believe it's
for our own good, yet we're the criminals.
 We explore... and you call us criminals. (TEH HAX0R'S CREED) 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]