You are not logged in.

#1 2010-07-30 16:49:13

y27
Member
Registered: 2009-05-27
Posts: 147
Website

MinGW using wrong as?

Hi,

I tried to use MinGW to cross compile a simple test program for windows on linux. (If you really want to see it, here it is:

#include <stdio.h>

int main()
{
  printf("hello!\n");
}

)

I tried running

i486-mingw-gcc test.c

, but it spits out (with verbose):

Using built-in specs.
COLLECT_GCC=i486-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-mingw32/4.5.0/lto-wrapper
Target: i486-mingw32
Configured with: /home/sergej/community-my.svn/mingw32-gcc/trunk/src/gcc-4.5.0/configure --target=i486-mingw32 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --prefix=/usr --enable-languages=c,c++ --enable-shared --enable-sjlj-exceptions --enable-hash-synchronization --disable-nls --disable-libssp
Thread model: win32
gcc version 4.5.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-mtune=i486' '-march=i486'
 /usr/libexec/gcc/i486-mingw32/4.5.0/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=i486 -march=i486 -auxbase test -version -o /tmp/ccRkIP7L.s
GNU C (GCC) version 4.5.0 (i486-mingw32)
    compiled by GNU C version 4.5.0 20100610 (prerelease), GMP version 5.0.1, MPFR version 3.0.0, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=127371
ignoring nonexistent directory "/usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i486-mingw32/4.5.0/include
 /usr/lib/gcc/i486-mingw32/4.5.0/include-fixed
 /usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/include
End of search list.
GNU C (GCC) version 4.5.0 (i486-mingw32)
    compiled by GNU C version 4.5.0 20100610 (prerelease), GMP version 5.0.1, MPFR version 3.0.0, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=127371
Compiler executable checksum: 2fbd095cb1a96c1fff6e4de20a8784a4
COLLECT_GCC_OPTIONS='-v' '-mtune=i486' '-march=i486'
 as -o /tmp/cc8WKGhw.o /tmp/ccRkIP7L.s
/tmp/ccRkIP7L.s: Assembler messages:
/tmp/ccRkIP7L.s:2: Error: unknown pseudo-op: `.def'
/tmp/ccRkIP7L.s:2: Error: unknown pseudo-op: `.scl'
/tmp/ccRkIP7L.s:2: Error: unrecognized symbol type "32"
/tmp/ccRkIP7L.s:2: Error: unknown pseudo-op: `.endef'
/tmp/ccRkIP7L.s:3: Warning: entity size for SHF_MERGE not specified
/tmp/ccRkIP7L.s:3: Warning: group name for SHF_GROUP not specified
/tmp/ccRkIP7L.s:8: Error: unknown pseudo-op: `.def'
/tmp/ccRkIP7L.s:8: Error: unknown pseudo-op: `.scl'
/tmp/ccRkIP7L.s:8: Error: unrecognized symbol type "32"
/tmp/ccRkIP7L.s:8: Error: unknown pseudo-op: `.endef'
/tmp/ccRkIP7L.s:19: Error: unknown pseudo-op: `.def'
/tmp/ccRkIP7L.s:19: Error: unknown pseudo-op: `.scl'
/tmp/ccRkIP7L.s:19: Error: unrecognized symbol type "32"
/tmp/ccRkIP7L.s:19: Error: unknown pseudo-op: `.endef'
as: /tmp/cc8WKGhw.o: warning: sh_link not set for section `.rdata'

In the output above I saw the line

 as -o /tmp/cc8WKGhw.o /tmp/ccRkIP7L.s

from which I think it's using the wrong 'as' (it should use i486-mingw32-as, not just as).

Is it a bug, or am I doing something wrong?

Thanks.

Last edited by y27 (2010-07-30 19:33:07)

Offline

Board footer

Powered by FluxBB