Skip to content
Snippets Groups Projects
  • Nikhil Benesch's avatar
    9bac6639
    libgo: adjust sysinfo scripts for changed -fdump-go-spec · 9bac6639
    Nikhil Benesch authored
    The -fdump-go-spec flag to GCC recently changed to be more fastidious
    about handling incomplete types. This caused some breakage in
    mk[r]sysinfo.sh on Solaris. This commit adjusts for the new behavior.
    Specifically:
    
      * Types that refer to _in6_addr may be hidden behind a typedef and can
        no longer be filtered out with `grep -v in6_addr`. Instead just
        rewrite the definition of _in6_addr to [16]byte wherever it appears.
    
      * timestruc_t is now (correctly) emitted as an alias for timespec, so this
        case is handled specially.
    
      * stdio.h is included in sysinfo.c to avoid emitting an incomplete
        definition of the FILE type.
    
      * Dummy definitions for _u?pad128_t are now emitted automatically,
        which conflict with the definitions installed by mk[r]sysinfo.sh.
        These definitions were actually dead code, so just remove them.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278672
    9bac6639
    History
    libgo: adjust sysinfo scripts for changed -fdump-go-spec
    Nikhil Benesch authored
    The -fdump-go-spec flag to GCC recently changed to be more fastidious
    about handling incomplete types. This caused some breakage in
    mk[r]sysinfo.sh on Solaris. This commit adjusts for the new behavior.
    Specifically:
    
      * Types that refer to _in6_addr may be hidden behind a typedef and can
        no longer be filtered out with `grep -v in6_addr`. Instead just
        rewrite the definition of _in6_addr to [16]byte wherever it appears.
    
      * timestruc_t is now (correctly) emitted as an alias for timespec, so this
        case is handled specially.
    
      * stdio.h is included in sysinfo.c to avoid emitting an incomplete
        definition of the FILE type.
    
      * Dummy definitions for _u?pad128_t are now emitted automatically,
        which conflict with the definitions installed by mk[r]sysinfo.sh.
        These definitions were actually dead code, so just remove them.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278672