Project

General

Profile

Feature #1230

need support for recent gcc stdarg builtins

Added by Artem Dmitriev over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Start date:
2011-07-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

When i tried to compile something, what used macros va_start(), i get error:

libc.so.1: perl: fatal: relocation error: file /root/libzfs-perl-tst1/blib/arch/auto/ZFS/ZFS.so: symbol __builtin_stdarg_start: referenced symbol not found

_builtin_stdarg_start has been removed as it was broken and not used by GCC's headers any more (it was really internal to GCC's stdards headers).
_builtin_va_start is the replacement.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26264

Maybe we need to replace it in illumos headers too?
These macros defines here: .../illumos-gate/usr/src/uts/common/sys/va_impl.h

#1

Updated by Rich Lowe over 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Rich Lowe
  • % Done changed from 0 to 60
  • Tags deleted (needs-triage)
#2

Updated by Rich Lowe over 9 years ago

I have a fix for this in my gcc update branch. I confess I'm not sure how you're hitting this directly, as I had thought most uses of GCC were saved by the "fixincludes'd" headers, but either way I'll push this up the list of fixes from that branch to integrate. Thanks.

If you want it now, and as you surmised, the fix is the obvious one:
https://github.com/richlowe/illumos-gate/commit/cb2df8815fd80018d65e08f25ae5614934a3d8b3

#3

Updated by Alexander Eremin over 9 years ago

Also it can happens here while building illumos grub with gcc 4*. I used same fix as Rich.

#4

Updated by Rich Lowe over 9 years ago

If you're building bits of illumos with GCC4 the entire branch may interest you: http://github.com/richlowe/illumos-gate/compare/gcc/upgrade

and: http://github.com/richlowe/illumos-gate/blob/gcc/upgrade/GCC-README.md

#5

Updated by Rich Lowe over 9 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from __builtin_stdarg_start: referenced symbol not found to need support for recent gcc stdarg builtins
#6

Updated by Alexander Eremin over 9 years ago

Rich Lowe wrote:

If you're building bits of illumos with GCC4 the entire branch may interest you: http://github.com/richlowe/illumos-gate/compare/gcc/upgrade

and: http://github.com/richlowe/illumos-gate/blob/gcc/upgrade/GCC-README.md

Rich: thank you very much

#7

Updated by Rich Lowe over 9 years ago

We should be using __builtin_va_start for any GCC >= 3.3, based on when the change was made to their ginclude copy, see here:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ginclude/stdarg.h

It's actually probable that we could use it for a wider range of versions, but this seems safest.

#8

Updated by Rich Lowe over 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 60 to 100

Resolved in r13413 commit:22409bb43a34

Also available in: Atom PDF