* Build library libroot_debug.so, which is the standard libroot.so with the

debug heap implementation.
* Added libroot_debug.so to the DevelopmentMin optional package. Since it has
  the same soname as the standard libroot, it can simply be specified in
  LD_PRELOAD to run a program with that version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34788 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-12-28 00:13:17 +00:00
parent c682a1937e
commit 448671a39c
4 changed files with 36 additions and 4 deletions

View File

@ -383,9 +383,13 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
# kernel
AddFilesToHaikuHybridImage $(abiDirTokens) lib : kernel.so : _KERNEL_ ;
# additional libraries
local developmentLibs = <revisioned>libroot_debug.so ;
AddFilesToHaikuHybridImage system lib : $(developmentLibs) : : true ;
# library symlinks
local lib ;
for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) {
for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) $(developmentLibs) {
AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
: /system/lib $(lib:BS) : : true ;
}

View File

@ -15,7 +15,6 @@ local librootObjects =
posix_crypt.o
posix_locale.o
posix_main.o
posix_malloc.o
posix_pthread.o
posix_signal.o
posix_stdio.o
@ -40,9 +39,19 @@ local librootObjects =
posix_unistd.o
;
local librootDebugObjects =
posix_malloc_debug.o
;
local librootNoDebugObjects =
posix_malloc.o
;
DONT_LINK_AGAINST_LIBROOT on libroot.so = true ;
DONT_LINK_AGAINST_LIBROOT on libroot_debug.so = true ;
SetVersionScript libroot.so : libroot_versions ;
SetVersionScript libroot_debug.so : libroot_versions ;
SharedLibrary libroot.so
:
@ -50,6 +59,21 @@ SharedLibrary libroot.so
:
$(TARGET_GCC_LIBGCC_OBJECTS)
$(librootObjects:G=nogrist)
$(librootNoDebugObjects:G=nogrist)
$(TARGET_STATIC_LIBSUPC++)
;
# Use the standard libroot.so soname, so when the debug version is pre-loaded
# it prevents the standard version to be loaded as well.
HAIKU_SONAME on libroot_debug.so = libroot.so ;
SharedLibrary libroot_debug.so
:
libroot_init.c
:
$(TARGET_GCC_LIBGCC_OBJECTS)
$(librootObjects:G=nogrist)
$(librootDebugObjects:G=nogrist)
$(TARGET_STATIC_LIBSUPC++)
;
@ -61,6 +85,10 @@ if $(TARGET_PLATFORM) = haiku {
MakeLocate <revisioned>libroot.so
: [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) revisioned ] ;
CopySetHaikuRevision <revisioned>libroot.so : libroot.so ;
MakeLocate <revisioned>libroot_debug.so
: [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) revisioned ] ;
CopySetHaikuRevision <revisioned>libroot_debug.so : libroot_debug.so ;
}

View File

@ -35,7 +35,7 @@ SubInclude HAIKU_TOP src system libroot posix arch $(TARGET_ARCH) ;
SubInclude HAIKU_TOP src system libroot posix crypt ;
SubInclude HAIKU_TOP src system libroot posix locale ;
SubInclude HAIKU_TOP src system libroot posix malloc ;
#SubInclude HAIKU_TOP src system libroot posix malloc_debug ;
SubInclude HAIKU_TOP src system libroot posix malloc_debug ;
SubInclude HAIKU_TOP src system libroot posix pthread ;
SubInclude HAIKU_TOP src system libroot posix signal ;
SubInclude HAIKU_TOP src system libroot posix stdio ;

View File

@ -3,6 +3,6 @@ SubDir HAIKU_TOP src system libroot posix malloc_debug ;
UsePrivateSystemHeaders ;
UsePrivateHeaders shared ;
MergeObject posix_malloc.o :
MergeObject posix_malloc_debug.o :
heap.cpp
;