Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Todd Vierling <tv@pobox.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-toolchain
Date: 06/10/2003 19:16:44
This is a multipart MIME message.

--==_Exmh_17498381156460
Content-Type: text/plain; charset=us-ascii


tv@pobox.com said:
>     ... -B/usr/lib/ ... 

Thanks, seems to work now...

So would you call the appended patch a step into the right direction?

best regards
Matthias



--==_Exmh_17498381156460
Content-Type: text/plain ; name="bsdlib.txt"; charset=us-ascii
Content-Description: bsdlib.txt
Content-Disposition: attachment; filename="bsdlib.txt"

*** bsd.lib.mk.~1.219.~	Mon Jun  2 13:31:34 2003
--- bsd.lib.mk	Tue Jun 10 19:08:40 2003
***************
*** 152,158 ****
  # Platform-independent linker flags for ELF shared libraries
  .if ${OBJECT_FMT} == "ELF"
  SHLIB_SOVERSION=	${SHLIB_MAJOR}
! SHLIB_SHFLAGS=		-soname lib${LIB}.so.${SHLIB_SOVERSION}
  SHLIB_LDSTARTFILE?=	${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
  SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
  .endif
--- 152,158 ----
  # Platform-independent linker flags for ELF shared libraries
  .if ${OBJECT_FMT} == "ELF"
  SHLIB_SOVERSION=	${SHLIB_MAJOR}
! SHLIB_SHFLAGS=		-Wl,-soname -Wl,lib${LIB}.so.${SHLIB_SOVERSION}
  SHLIB_LDSTARTFILE?=	${DESTDIR}/usr/lib/crti.o ${_GCC_CRTBEGINS}
  SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
  .endif
***************
*** 392,409 ****
  	@echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
  	@rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
  .if defined(DESTDIR)
! 	$(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
! 	    ${SHLIB_LDSTARTFILE} \
! 	    --whole-archive ${SOLIB} \
! 	    --no-whole-archive ${LDADD} \
  	    -L${DESTDIR}${_LIBSODIR} -L${DESTDIR}${LIBDIR} \
! 	    -R${_LIBSODIR} -R${LIBDIR} \
! 	    ${SHLIB_LDENDFILE}
  .else
! 	$(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
! 	    ${SHLIB_LDSTARTFILE} \
! 	    --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \
! 	    ${SHLIB_LDENDFILE}
  .endif
  .if ${OBJECT_FMT} == "ELF"
  #  We don't use INSTALL_SYMLINK here because this is just
--- 392,406 ----
  	@echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
  	@rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
  .if defined(DESTDIR)
! 	$(CC) -v -Wl,-nostdlib -B${DESTDIR}/usr/lib/ \
! 	    -Wl,-x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
! 	    -Wl,--whole-archive ${SOLIB} \
! 	    -Wl,--no-whole-archive ${LDADD} \
  	    -L${DESTDIR}${_LIBSODIR} -L${DESTDIR}${LIBDIR} \
! 	    -Wl,-R${_LIBSODIR} -Wl,-R${LIBDIR}
  .else
! 	$(CC) -v -Wl,-x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
! 	    -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}
  .endif
  .if ${OBJECT_FMT} == "ELF"
  #  We don't use INSTALL_SYMLINK here because this is just

--==_Exmh_17498381156460--