BIND 10 #1558: configure.ac check for rpath -R flag

BIND 10 Development do-not-reply at isc.org
Fri Jan 20 13:41:48 UTC 2012


#1558: configure.ac check for rpath -R flag
-------------------------------------+-------------------------------------
                   Reporter:  jreed  |                 Owner:  UnAssigned
                       Type:         |                Status:  new
  defect                             |             Milestone:
                   Priority:  major  |  Sprint-20120124
                  Component:  build  |            Resolution:
  system                             |             Sensitive:  0
                   Keywords:         |           Sub-Project:  Core
            Defect Severity:  N/A    |  Estimated Difficulty:  0
Feature Depending on Ticket:         |           Total Hours:  0
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Description changed by jreed:

Old description:

> configure.ac has wrong code for checking if linked accepts -R flag. It
> assumes that the compiler has it, but
> g++ 4.6.2 on haikuo's system doesn't support it. It is a linker switch
> not a compiler switch.
>
> The existing autoconf code is:
>
> {{{
>
> # check -R rather than gcc specific -rpath to be as portable as possible.
> AC_MSG_CHECKING([whether -R flag is available in linker])
> LDFLAGS_SAVED="$LDFLAGS"
> LDFLAGS="$LDFLAGS -R/usr/lib"
> AC_TRY_LINK([],[],
>         [ AC_MSG_RESULT(yes)
>                 rpath_available=yes
>         ],[ AC_MSG_RESULT(no)
>         rpath_available=no
>         ])
> LDFLAGS=$LDFLAGS_SAVED
>
> }}}
>
> Proper way for gcc is -Wl,-R, but SunStudio doesn't have that.
>
> The problem is that rpath_available=no causes -R not to be set so -R is
> not added and can't find dependency libraries in custom locations (as see
> on Haikuo's system).

New description:

 configure.ac has wrong code for checking if linker accepts -R flag. It
 assumes that the compiler has it, but
 g++ 4.6.2 on haikuo's system doesn't support it. It is a linker switch not
 a compiler switch.

 The existing autoconf code is:

 {{{

 # check -R rather than gcc specific -rpath to be as portable as possible.
 AC_MSG_CHECKING([whether -R flag is available in linker])
 LDFLAGS_SAVED="$LDFLAGS"
 LDFLAGS="$LDFLAGS -R/usr/lib"
 AC_TRY_LINK([],[],
         [ AC_MSG_RESULT(yes)
                 rpath_available=yes
         ],[ AC_MSG_RESULT(no)
         rpath_available=no
         ])
 LDFLAGS=$LDFLAGS_SAVED

 }}}

 Proper way for gcc is -Wl,-R, but SunStudio doesn't have that.

 The problem is that rpath_available=no causes -R not to be set so -R is
 not added and can't find dependency libraries in custom locations (as see
 on Haikuo's system).

--

-- 
Ticket URL: <http://bind10.isc.org/ticket/1558#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list