This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gcc 3.2 -mno-cygwin


----- Original Message -----
From: "Jim" <jbuckeyne@greater.net>
To: <cygwin-apps@cygwin.com>
Sent: Sunday, December 15, 2002 11:15 AM
Subject: Gcc 3.2 -mno-cygwin


> Someone broke GCC somewhere....
>
> echo 'int main( void ) { return 1; }' >test.c
> gcc -mno-cygwin -c test.c
>
> results:
> gcc: installation problem, cannot exec `cc1': No such file or directory
>
> there is definatly no cc1 with gcc 3.2 (not sure where it went, but...)
>
> - off to roll back to 2.95.3 or whatever...
>
> Jim


Okay well this fixes not having cc1....

export PATH=$PATH:/usr/lib/gcc-lib/i686-pc-cygwin/3.2

then when it got to linking the executable...

gcc -mno-cygwin -o test test.o

ld: cannot open crt2.o: No such file or directory

I certainly didn't specify crt2.o anywhere....

(for the following assume export GCL=/usr/lib/gcc-lib/i686-pc-cygwin/3.2 )
Hmm - patching /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs ...
  added -L$GCL -L/usr/lib/mingw -L/usr/local/lib/mingw to *link: mno-cygwin
rule
  modified crt%O%s to /lib/mingw/crt2%O%s in *startfile
            added $GCL/ before crtbegin$O$s and crtend$O$s

so now it can find all the libraries (-lgcc in $GCL) crtbegin, end

and now...
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/libgcc.a(unwind-dw2-fde.o)(.text+0x22c):
und
efined reference to `pthread_mutex_lock'
(4 times, and pthread_mutex_unlock 5 times)

Hmm - well if I used pthreads I guess I'd worry... but as it happens this
test program uses none of these.... so lets get rid of -lgcc (which is
auspiciously sittong out in the middle of nowhere)

/usr/lib/gcc-lib/i686-pc-cygwin/3.2/crtbegin.o(.text+0x7): undefined
reference to `__w32_sharedptr_initialize'

The fun just doesn't end does it? remove crtbegin.o if !mno-cygwin, and
crtend has missing symbols, removed that...

test.o(.text+0x15):test.c: undefined reference to `_alloca'

Well heck - I didn't even use that... but I understand - let's see - add -lc
?

/usr/lib/gcc-lib/i686-pc-mingw32/3.2/../../../libc.a(ds00426.o)(.text+0x0):
multiple definition of `atexit'
/lib/mingw/crt2.o(.text+0x40):crt1.c: first defined here

Okay - I'm done - this is much too twisted for my pea brain to comprehend...



and a somewhat off topic thread,
   gcc -c output/whatever.c

should the default of that be output/whatever.o ?  cause it's not...



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