Hi, Thanks for the report and the patch!
On Nov 22, 2014, at 4:08 AM, KO Myung-Hun <kom...@gmail.com> wrote: > > On OS/2, dlopen() does not support a program. So libltdl_cv_need_uscore > is set to unknown, but dlsym() requires an underscore prefix. So set > libltdl_cv_need_uscore to yes on OS/2 if lt_cv_sys_symbol_underscore is > yes and libltdl_cv_need_uscore is unknown. Actually, I think the real problem here is that LT_FUNC_DLSYM_USCORE is making the bad assumption that dlsym() only requires a leading symbol name underscore on machines where self dlopening works. Better than your suggested patch, we should really be checking whether dlsym of ordinary loadable module symbol names requires a leading underscore. I pushed the core of a new macro that does exactly that to M4 master just now. Would you let me know whether this works correctly on OS2 for you please? If so, I'll copy the implementation from M4 to libtool prior to the imminent release, and then have M4 master require that libtool version to pick up the improved macro definition. > * m4/ltdl.m4 (LT_FUNC_DLSYM_USCORE): set libltdl_cv_need_uscore to yes > on os2*. > --- > m4/ltdl.m4 | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 > index eeb37ac..ce7b2b7 100644 > --- a/m4/ltdl.m4 > +++ b/m4/ltdl.m4 > @@ -804,6 +804,11 @@ if test yes = "$lt_cv_sys_symbol_underscore"; then > [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], > [], [libltdl_cv_need_uscore=cross]) > LIBS=$save_LIBS > + if test x"$libltdl_cv_need_uscore" = xunknown; then > + case $host_os in > + os2*) libltdl_cv_need_uscore=yes ;; > + esac > + fi > ]) > fi > fi > -- > 1.8.5.2 Cheers, -- Gary V. Vaughan (gary AT gnu DOT org)