Patch: use correct linker options on AIX gcc builds

View: New views
2 Messages — Rating Filter:   Alert me  

Patch: use correct linker options on AIX gcc builds

by Bugzilla from ak.miller@auckland.ac.nz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

When building gcc on AIX, it is apparently usual to use the system
linker and not the ld from GNU binutils. See for example
http://gcc.gnu.org/ml/gcc-bugs/2005-12/msg01523.html (gcc doesn't even
compile on AIX 5.3.0.0 using ld from GNU binutils, in fact).

The below patch sets the correct options for building with gcc, using
the native linker, on AIX.

Patch is released under the Boost Software License version 1.

Best wishes,
Andrew

diff b/boost_1_35_0/tools/build/v2/tools/gcc.jam
a/boost_1_35_0/tools/build/v2/tools/gcc.jam
143a144,147
 >       else if [ os.name ] = AIX
 >       {
 >           linker = aix ;
 >       }
330c334
< if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX
---
 > if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX &&
[ os.name ] != AIX
613a618,622
 >
 >     case aix :
 >       {
 >           flags $(toolset).link OPTIONS : -Wl,-brtl : unchecked ;
 >       }

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: Patch: use correct linker options on AIX gcc builds

by Bugzilla from ghost@cs.msu.su :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 22 May 2008 09:34:32 Andrew Miller wrote:

> Hi,
>
> When building gcc on AIX, it is apparently usual to use the system
> linker and not the ld from GNU binutils. See for example
> http://gcc.gnu.org/ml/gcc-bugs/2005-12/msg01523.html (gcc doesn't even
> compile on AIX 5.3.0.0 using ld from GNU binutils, in fact).
>
> The below patch sets the correct options for building with gcc, using
> the native linker, on AIX.
>
> Patch is released under the Boost Software License version 1.
>
> Best wishes,
> Andrew
>
> diff b/boost_1_35_0/tools/build/v2/tools/gcc.jam
> a/boost_1_35_0/tools/build/v2/tools/gcc.jam
> 143a144,147
>  >       else if [ os.name ] = AIX
>  >       {
>  >           linker = aix ;
>  >       }
> 330c334
> < if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX
> ---
>  > if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX &&
> [ os.name ] != AIX
> 613a618,622
>  >
>  >     case aix :
>  >       {
>  >           flags $(toolset).link OPTIONS : -Wl,-brtl : unchecked ;
>  >       }

Thanks you for the patch. Can you provide, in addition, a comment as to what
the 'brtl' option does and why it's needed, so that in future, folks reading
this file won't have to guess?

Also, should you send further patches, please use the unified diff format.
For this patch, I can manually apply it, but complex patches are useless without
context in diff.

Thanks,
Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build