GCC 7 assumes AIX ld support for visibility and outputs code like this when compiling libgcc:
Which gas currently does not understand:
Error: junk at end of line, first unrecognized character is `,'
From the XL C/C++ docs: https://www.ibm.com/developerworks/aix/library/au-aix-symbol-visibility-part2/index.html
Listing 14. Syntax for specifying visibility attribute in assembly
.extern Name [ , Visibility ]
.globl Name [ , Visibility ]
.weak Name [ , Visibility ]
.comm Name, Expression [, Number [, Visibility ] ]
If AIX gcc is even supported using gas and gcc has been configured correctly, this behaviour indicates a gcc bug. gcc ought to be detecting gas support before using new features. So even if gas was changed to add this support, gcc would need to cope with older versions of gas that do not support the extended syntax.
Adding this support to gas is not just a matter of parsing the syntax but also teaching the xcoff BFD backend to deal with visibility in symbol n_type (bits 0xF000). n_type values are