Re: BUG #2170: --rpath option is skipping shared libs - Mailing list pgsql-bugs
From | Lee Thompson |
---|---|
Subject | Re: BUG #2170: --rpath option is skipping shared libs |
Date | |
Msg-id | 20060215190711.35056.qmail@web30509.mail.mud.yahoo.com Whole thread Raw |
In response to | Re: BUG #2170: --rpath option is skipping shared libs (Tom Lane <tgl@sss.pgh.pa.us>) |
List | pgsql-bugs |
Better version of patch. Only kicks in when asked for with --enable-rpath_sl --- Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Lee Thompson" <bm55b@yahoo.com> writes: > > + if test "$enable_rpath" = yes ; then > > + LIBDIRS="$LIBDIRS -Wl,-R$dir" > > + fi > > What is this supposed to accomplish? (Other than > probably breaking > every non-gcc toolchain on the planet...) > > regards, tom lane > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com diff -Nru postgresql-8.1.2.orig/configure postgresql-8.1.2/configure --- postgresql-8.1.2.orig/configure 2006-02-15 10:00:03.000000000 -0600 +++ postgresql-8.1.2/configure 2006-02-15 11:44:10.000000000 -0600 @@ -314,7 +314,7 @@ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefixprefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdirincludedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_argsbuild build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGESdefault_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPPGCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjourwith_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIBLORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexpperl_useshrplib perl_embed_ldflags PYTHON python_versi on python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_configPTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SHTCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbookDOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefixprefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdirincludedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_argsbuild build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGESdefault_port enable_shared enable_rpath enable_rpath_sl enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CCEXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtabwith_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_worksRANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexpperl_privlibexp perl_useshrplib perl_embed_ldflags PYT HON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJSacx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSHTCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbookDOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -863,6 +863,7 @@ --enable-nls[=LANGUAGES] enable Native Language Support --disable-shared do not build shared libraries --disable-rpath do not embed shared library search path in executables + --enable-rpath_sl embed shared library search path in dynamic shared libraries --disable-spinlocks do not use spinlocks --enable-debug build with debugging symbols (-g) --enable-depend turn on automatic dependency tracking @@ -1875,6 +1876,32 @@ + +# Check whether --enable-rpath_sl or --disable-rpath_sl was given. +if test "${enable_rpath_sl+set}" = set; then + enableval="$enable_rpath_sl" + + case $enableval in + yes) + : + ;; + no) + : + ;; + *) + { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath_sl option" >&5 +echo "$as_me: error: no argument expected for --enable-rpath_sl option" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + +else + enable_rpath_sl=no + +fi; + + + # # Spinlocks # @@ -3358,6 +3385,9 @@ # LIBRARY_DIRS comes from command line, SRCH_LIB from template file. for dir in $LIBRARY_DIRS $SRCH_LIB; do if test -d "$dir"; then + if test "$enable_rpath_sl" = yes; then + LIBDIRS="$LIBDIRS -Wl,-R$dir" + fi LIBDIRS="$LIBDIRS -L$dir" else { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5 @@ -3908,6 +3938,9 @@ echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;} +if test "$enable_rpath_sl" = yes; then + LDFLAGS_SL="$LDFLAGS_SL $LIBDIRS" +fi for ac_prog in gawk mawk nawk awk do @@ -23209,6 +23242,7 @@ s,@default_port@,$default_port,;t t s,@enable_shared@,$enable_shared,;t t s,@enable_rpath@,$enable_rpath,;t t +s,@enable_rpath_sl@,$enable_rpath_sl,;t t s,@enable_debug@,$enable_debug,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t diff -Nru postgresql-8.1.2.orig/configure.in postgresql-8.1.2/configure.in --- postgresql-8.1.2.orig/configure.in 2006-02-15 10:00:03.000000000 -0600 +++ postgresql-8.1.2/configure.in 2006-02-15 11:43:57.000000000 -0600 @@ -193,6 +193,9 @@ PGAC_ARG_BOOL(enable, rpath, yes, [ --disable-rpath do not embed shared library search path in executables]) AC_SUBST(enable_rpath) +PGAC_ARG_BOOL(enable, rpath_sl, no, + [ --enable-rpath_sl embed shared library search path in dynamic shared libraries]) +AC_SUBST(enable_rpath_sl) # # Spinlocks @@ -357,6 +360,9 @@ # LIBRARY_DIRS comes from command line, SRCH_LIB from template file. for dir in $LIBRARY_DIRS $SRCH_LIB; do if test -d "$dir"; then + if test "$enable_rpath_sl" = yes; then + LIBDIRS="$LIBDIRS -Wl,-R$dir" + fi LIBDIRS="$LIBDIRS -L$dir" else AC_MSG_WARN([*** Library directory $dir does not exist.]) @@ -525,6 +531,9 @@ AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS]) AC_ARG_VAR(LDFLAGS_SL) +if test "$enable_rpath_sl" = yes; then + LDFLAGS_SL="$LDFLAGS_SL $LIBDIRS" +fi AC_PROG_AWK PGAC_PATH_FLEX
pgsql-bugs by date: