This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR other/17783: Top level configure doesn't support shared libraries enabled by default


On Tue, Nov 02, 2004 at 09:51:09AM -0800, H. J. Lu wrote:
> On Mon, Nov 01, 2004 at 10:01:47PM -0800, Mark Mitchell wrote:
> > >http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00795.html
> > 
> > This last one, at least, is clearly wrong.
> > 
> > You're now defaulting to --enable-shared, even on systems that may not 
> > support shared libraries at all.
> 
> enable_shared in top level is only used for setting up proper
> LD_LIBRARY_PATH. If systems don't support shared libraries, setting
> LD_LIBRARY_PATH won't affect anything. If we wants to prevent it
> leaking down, we can change it to set_lib_path.
> 


Here is the updated patch.


H.J.
---
2004-11-02  H.J. Lu  <hongjiu.lu@intel.com>

	PR other/17783
	* configure.in: Set up LD_LIBRARY_PATH by default for gcc.
	* configure: Regenerated.

--- configure.in.shared	2004-10-28 17:39:41.000000000 -0700
+++ configure.in	2004-11-02 10:06:30.559204169 -0800
@@ -1653,10 +1653,25 @@ case "${host}" in
   ;;
 esac
 
+# If no --enable-shared nor --disable-shared is specified, we set up
+# LD_LIBRARY_PATH when we build for gcc.
+case $enable_shared in
+"")
+  if test -d ${srcdir}/gcc; then
+    set_lib_path=yes
+  else 
+    set_lib_path=no
+  fi
+  ;;
+*)
+  set_lib_path=$enable_shared
+  ;;
+esac
+
 # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
 # binutils tools will find libbfd.so.
-case "${enable_shared}" in
-  no | "") SET_LIB_PATH= ;;
+case "${set_lib_path}" in
+  no) SET_LIB_PATH= ;;
   *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
 esac
 
@@ -2334,8 +2349,8 @@ AC_SUBST(stage2_werror_flag)
 # used.
 SET_GCC_LIB_PATH=
 if test -d ${srcdir}/gcc && test x${is_cross_compiler} = xno; then
-  case "${enable_shared}" in
-    no | "") ;;
+  case "${set_lib_path}" in
+    no) ;;
     *)
       eval "d=\$$RPATH_ENVVAR"
       if test x"$d" != x; then


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]