Issue with undefined reference with assembler in rr

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

 



I was working on packaging rr [1] and one of the tests [2] fails to build when optimizations are turned on. I've reduced it to the following and still been able to reproduce the issue:

static const float xmm0 = 10;

int main() {
  __asm__ __volatile__(
#if __i386__
      "movss xmm0, %xmm0\n\t"
#elif __x86_64__
      "movss xmm0(%rip), %xmm0\n\t"
#else
#error unexpected architecture
#endif
      );

  return 0;
}

Here's the output on F23 x86_64:
$ gcc fxregs.c -O0
$ gcc fxregs.c -O1
/tmp/cccdze3O.o: In function `main':
fxregs.c:(.text+0x4): undefined reference to `xmm0'
collect2: error: ld returned 1 exit status

Is this a gcc bug or is there something that I need to do in the build to get the tests to build without error?

Thanks,
Dave

[1]: https://github.com/mozilla/rr
[2]: https://github.com/mozilla/rr/blob/9a532fd786f6378d6b8c2cd70a04731341cf0609/src/test/fxregs.c
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux