+2003-09-13 Ken Raeburn <raeburn@mit.edu>
+
+ * shlib.conf (*-*-linux*): Use gcc for linking shared libraries,
+ and -Wl to pass linker flags in, so gcc can supply the necessary
+ support libraries.
+
2003-08-29 Ken Raeburn <raeburn@mit.edu>
* post.in (daemon.c): New rule for copying daemon.c locally from
SHLIBEXT=.so
# Linux ld doesn't default to stuffing the SONAME field...
# Use objdump -x to examine the fields of the library
- LDCOMBINE='ld -shared -h lib$(LIB)$(SHLIBSEXT)'
- # Linux libc does weird stuff at shlib link time, must be
- # explicitly listed here. This also makes it get used even
- # for the libraries marked as not having any dependencies; while
- # that's not strictly correct, the resulting behavior -- not adding
- # extra -R directories -- is still what we want.
- LDCOMBINE_TAIL="-lc"
+ LDCOMBINE='gcc -shared -fPIC -Wl,-h,lib$(LIB)$(SHLIBSEXT)'
+ LDCOMBINE_TAIL=''
# For cases where we do have dependencies on other libraries
# built in this tree...
- SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+ SHLIB_EXPFLAGS='-Wl,-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
RPATH_FLAG='-Wl,-rpath -Wl,'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+
+ ## old version:
+ # Linux libc does weird stuff at shlib link time, must be
+ # explicitly listed here. This also makes it get used even
+ # for the libraries marked as not having any dependencies; while
+ # that's not strictly correct, the resulting behavior -- not adding
+ # extra -R directories -- is still what we want.
+ #LDCOMBINE='ld -shared -h lib$(LIB)$(SHLIBSEXT)'
+ #LDCOMBINE_TAIL="-lc"
+ #SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+
;;
*-*-aix*)