https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89096
--- Comment #30 from David Edelsohn <dje at gcc dot gnu.org> --- Yes, I can reproduce the error, but it only occurs when -bsvr4 is used. Have you looked at what -bsvr4 enables in the ld man page? Not just the -R comment. -brtl -brtllib -bexpfull -R, instead of being ignored, takes one suboption that defines the runtime library search path It seems that you're utilizing the -bsvr4 option to change the behavior of -R without regard for the other effects of the option. And the other changes to the default behavior of the AIX are breaking the build. -bsvr4 tries to provide a lot of SVR4 behavior, but is too course and big a club. [ ] Instead of using -bsvr4, I strongly suggest that you adjust / adapt the Makefile of your project and use the AIX linker -blibpath command line option to set the runtime library search path. I realize that there is no other AIX linker option to change the behavior of just -R, but you incorrectly are blaming the compiler for an error elicited by other, documented effects of the -bsvr4 linker option. AIX is not Solaris or Linux. There is no magic command line option to make AIX pretend to be Linux. The failure is not caused by a GCC bug and it's not caused by an AIX linker bug. GCC is behaving as designed. AIX linker is behaving as designed and documented. The -bsvr4 option has too many other effects to be used solely to work around the -R option.