This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

arch=i686, -fPIC won't play nice on OSR5



I won't bother with the full testsuite results becuase they're so noisy
as to be uninteresting.   Here's the punchline.

$ cat /tmp/x.c
main()
{
  exit(0);
}

foo(){}

$ ./xgcc -march=i586 -B./ -fPIC  /tmp/x.c
(robertl) rjlhome:/play/negcs/gcc
$ ./xgcc -march=i686 -B./ -fPIC  /tmp/x.c
(EOF):useless specification of size and/or type for name: .LPR0


Let's look at the generated code:

$ ./xgcc -march=i686 -B./ -fPIC  -S /tmp/x.c
(robertl) rjlhome:/play/negcs/gcc
$ head x.s
        .file   "x.c"
        .version        "01.01"
gcc2_compiled.:
__gnu_compiled_c:
        .text
        .align 4
        .type    .LPR0,@function
.LPR0:
        movl (%esp),%ebx
        ret


Since the label .LPR0 isn't global, the SCO assembler is squawking about
it having a debugging type.  If I insert '.globl .LPR0' it assembles.
If I change all occurrences of '.LPR0' to 'LPR0' it assembles.


For some reason, this particular sequence of events is unique (?) to
-fPIC and -march=i686.  The Linux GNU assembler that I tested (the one
on RH5.1) doesn't seem to mind this construct.

I just tested 1.0.3 with the same source and command line invocation as
above, and it worked.  I can't pinpoint an exact breaking point between
there and here since this is my first P6 build.

Any ideas?


RJL


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