Problems with -mtune, -march and -fPIC and gcc 4.0 on i686

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am using gcc 4.0 from Debian (4.0.0-12) and am having a problem linking a simple program that was compiled with -fPIC and -mtune=pentiumpro, -march=pentium.

Here's the test program:

#include "stdio.h"

int main()
{
    int i;
    printf ("test\n");

    return 0;
}

And here's the output of different ways of compiling it:

(sid)martin@egon:/tmp$ gcc test.c
(sid)martin@egon:/tmp$ gcc -fPIC test.c
(sid)martin@egon:/tmp$ gcc -march=pentium -mtune=pentiumpro test.c

All is well up to here, but if I now add -fPIC:

(sid)martin@egon:/tmp$ gcc -march=pentium -mtune=pentiumpro -fPIC test.c
/usr/lib/libc_nonshared.a(elf-init.oS)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
/tmp/ccopQRzB.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
collect2: ld returned 1 exit status

I can't remember having had this problem with previous versions of gcc 4.0 from Debian. Does anyone know what might be the problem?

Thanks for your help,

Martin.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux