1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-24 12:13:42 +01:00

Major restructuring to allow for separate local-only vs. generic

libunwind.

(Logical change 1.151)
This commit is contained in:
hp.com!davidm 2004-01-03 10:50:24 +00:00
parent e0585b4a71
commit 1656663941

View file

@ -1,33 +1,49 @@
SOVERSION=2:0:1 # See comments at end of file.
SETJMP_SO_VERSION=0:0:0
libunwind_setjmp_la_SOURCES_local = longjmp.c siglongjmp.c
libunwind_setjmp_la_SOURCES_local_ia64 = ia64/setjmp-ia64.S \
ia64/sigsetjmp-ia64.S ia64/siglongjmp-ia64.S
libunwind_setjmp_la_SOURCES_local_hppa = setjmp.c sigsetjmp.c \
hppa/siglongjmp-hppa.S
libunwind_setjmp_la_SOURCES_local_x86 = setjmp.c sigsetjmp.c \
x86/siglongjmp-x86.S
if REMOTE_ONLY
LIBRARIES_cdep =
lib_LTLIBRARIES_cdep =
else
LIBRARIES_cdep = libunwind-ptrace.a
lib_LTLIBRARIES_cdep = libunwind.la libunwind-setjmp.la
endif
libunwind_la_SOURCES_common = $(libunwind_la_SOURCES_cdep) \
$(libunwind_la_SOURCES_os) \
backtrace.c \
Gdyn-extract.c Gdyn-remote.c Ldyn-extract.c Ldyn-remote.c \
mi-init.c \
mempool.c \
Gfind_dynamic_proc_info.c Gget_proc_name.c Gput_dynamic_unwind_info.c \
Lfind_dynamic_proc_info.c Lget_proc_name.c Lput_dynamic_unwind_info.c \
Gget_proc_info_by_ip.c \
Lget_proc_info_by_ip.c
libunwind_la_SOURCES_local = \
### libunwind-ptrace:
libunwind_ptrace_a_SOURCES = \
_UPT_internal.h \
dyn-cancel.c dyn-register.c \
_UPT_accessors.c _UPT_access_fpreg.c _UPT_access_mem.c \
_UPT_access_reg.c _UPT_create.c _UPT_destroy.c _UPT_find_proc_info.c \
_UPT_get_dyn_info_list_addr.c _UPT_put_unwind_info.c \
_UPT_get_proc_name.c _UPT_reg_offset.c _UPT_resume.c \
\
_UPT_get_proc_name.c _UPT_reg_offset.c _UPT_resume.c
### libunwind-setjmp:
libunwind_setjmp_la_LDFLAGS = -version-info $(SETJMP_SO_VERSION)
libunwind_setjmp_la_LIBADD = libunwind-$(arch).la
libunwind_setjmp_la_SOURCES_common = longjmp.c siglongjmp.c
libunwind_setjmp_la_SOURCES_ia64 = ia64/setjmp-ia64.S \
ia64/sigsetjmp-ia64.S \
ia64/siglongjmp-ia64.S
libunwind_setjmp_la_SOURCES_hppa = setjmp.c sigsetjmp.c hppa/siglongjmp-hppa.S
libunwind_setjmp_la_SOURCES_x86 = setjmp.c sigsetjmp.c x86/siglongjmp-x86.S
### libunwind:
# List of arch-independent files needed by both local-only and generic libraries:
libunwind_la_SOURCES_common = \
$(libunwind_la_SOURCES_os) \
mi-init.c mempool.c
# List of arch-independent files needed by generic library (libunwind-$ARCH):
libunwind_la_SOURCES_generic = \
Gdyn-extract.c Gdyn-remote.c Gfind_dynamic_proc_info.c \
Gget_proc_info_by_ip.c Gget_proc_name.c Gput_dynamic_unwind_info.c
# List of arch-independent files needed by local-only library (libunwind):
libunwind_la_SOURCES_local = \
dyn-cancel.c dyn-info-list.c dyn-register.c \
Ldyn-extract.c Lfind_dynamic_proc_info.c \
Lget_proc_info_by_ip.c Lget_proc_name.c Lput_dynamic_unwind_info.c \
_Unwind_Backtrace.c _Unwind_DeleteException.c \
_Unwind_FindEnclosingFunction.c _Unwind_ForcedUnwind.c \
_Unwind_GetBSP.c _Unwind_GetCFA.c _Unwind_GetDataRelBase.c \
@ -54,35 +70,45 @@ dwarf_sources = \
# filenames by appending the arch-name (e.g., tables-ia64.c). Oh, well.
#
libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_common) \
# The list of files that go both into libunwind and libunwind-ia64:
libunwind_la_SOURCES_ia64_common = $(libunwind_la_SOURCES_common) \
ia64/init.h ia64/offsets.h ia64/regs.h ia64/rse.h \
ia64/ucontext_i.h ia64/unwind_decoder.h ia64/unwind_i.h \
ia64/ucontext_i.h ia64/unwind_decoder.h ia64/unwind_i.h
# The list of files that go into libunwind:
libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
$(libunwind_la_SOURCES_local) \
\
elf64.c elf64.h \
ia64/global-ia64.c ia64/global-asm-ia64.S \
ia64/tables-ia64.c ia64/get_accessors-ia64.c \
ia64/flush_cache-ia64.c ia64/set_caching_policy-ia64.c \
\
ia64/flush_cache-ia64.c \
ia64/regname-ia64.c \
ia64/dyn_info_list-ia64.S \
\
ia64/Ginit-ia64.c ia64/Ginstall_cursor.S \
ia64/Gparser-ia64.c ia64/Gregs-ia64.c \
ia64/Grbs-ia64.c ia64/Gscript-ia64.c ia64/Gcreate_addr_space-ia64.c \
ia64/Gdestroy_addr_space-ia64.c \
ia64/Gget_proc_info-ia64.c ia64/Gget_proc_name-ia64.c \
ia64/Gget_reg-ia64.c ia64/Gget_fpreg-ia64.c ia64/Gget_save_loc-ia64.c \
ia64/Gis_signal_frame-ia64.c \
ia64/Gresume-ia64.c ia64/Gset_reg-ia64.c ia64/Gset_fpreg-ia64.c \
ia64/Ginit_local-ia64.c ia64/Ginit_remote-ia64.c ia64/Gstep-ia64.c \
\
ia64/Linit-ia64.c ia64/Linstall_cursor.S \
ia64/Lparser-ia64.c ia64/Lregs-ia64.c \
ia64/Lrbs-ia64.c ia64/Lscript-ia64.c ia64/Lcreate_addr_space-ia64.c \
ia64/Ldestroy_addr_space-ia64.c \
ia64/Lcreate_addr_space-ia64.c ia64/Ldestroy_addr_space-ia64.c \
ia64/Lget_accessors-ia64.c ia64/Lget_fpreg-ia64.c \
ia64/Lget_proc_info-ia64.c ia64/Lget_proc_name-ia64.c \
ia64/Lget_reg-ia64.c ia64/Lget_fpreg-ia64.c ia64/Lget_save_loc-ia64.c \
ia64/Lis_signal_frame-ia64.c \
ia64/Lresume-ia64.c ia64/Lset_reg-ia64.c ia64/Lset_fpreg-ia64.c \
ia64/Linit_local-ia64.c ia64/Linit_remote-ia64.c ia64/Lstep-ia64.c
ia64/Lget_reg-ia64.c ia64/Lget_save_loc-ia64.c ia64/Lglobal-ia64.c \
ia64/Linit-ia64.c ia64/Linit_local-ia64.c ia64/Linit_remote-ia64.c \
ia64/Linstall_cursor.S ia64/Lis_signal_frame-ia64.c ia64/Lparser-ia64.c \
ia64/Lrbs-ia64.c ia64/Lregs-ia64.c ia64/Lresume-ia64.c \
ia64/Lscript-ia64.c ia64/Lset_caching_policy-ia64.c \
ia64/Lset_fpreg-ia64.c ia64/Lset_reg-ia64.c ia64/Lstep-ia64.c \
ia64/Ltables-ia64.c
# The list of files that go into libunwind-ia64:
libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
$(libunwind_la_SOURCES_generic) \
ia64/Gcreate_addr_space-ia64.c ia64/Gdestroy_addr_space-ia64.c \
ia64/Gget_accessors-ia64.c ia64/Gget_fpreg-ia64.c \
ia64/Gget_proc_info-ia64.c ia64/Gget_proc_name-ia64.c \
ia64/Gget_reg-ia64.c ia64/Gget_save_loc-ia64.c ia64/Gglobal-ia64.c \
ia64/Ginit-ia64.c ia64/Ginit_local-ia64.c ia64/Ginit_remote-ia64.c \
ia64/Ginstall_cursor.S ia64/Gis_signal_frame-ia64.c ia64/Gparser-ia64.c \
ia64/Grbs-ia64.c ia64/Gregs-ia64.c ia64/Gresume-ia64.c \
ia64/Gscript-ia64.c ia64/Gset_caching_policy-ia64.c \
ia64/Gset_fpreg-ia64.c ia64/Gset_reg-ia64.c ia64/Gstep-ia64.c \
ia64/Gtables-ia64.c
libunwind_la_SOURCES_hppa = $(libunwind_la_SOURCES_common) \
hppa/flush_cache-hppa.c hppa/get_accessors-hppa.c \
@ -97,25 +123,23 @@ libunwind_la_SOURCES_hppa = $(libunwind_la_SOURCES_common) \
hppa/Linit-hppa.c hppa/Linit_local-hppa.c \
hppa/Lget_proc_info-hppa.c hppa/Lregs-hppa.c hppa/Lstep-hppa.c
# The list of files that go both into libunwind and libunwind-x86:
libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_common) \
x86/offsets.h \
x86/offsets.h
# The list of files that go into libunwind:
libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
$(libunwind_la_SOURCES_local) \
\
elf32.c elf32.h \
\
$(dwarf_sources) \
dwarf/Gfind_proc_info-lsb.c dwarf/Lfind_proc_info-lsb.c \
\
x86/flush_cache-x86.c x86/get_accessors-x86.c x86/global-x86.c \
x86/set_caching_policy-x86.c \
x86/init.h x86/unwind_i.h x86/regname-x86.c \
\
x86/Gcreate_addr_space-x86.c \
x86/Gget_reg-x86.c x86/Gget_proc_name-x86.c x86/Ginit-x86.c \
x86/Ginit_local-x86.c x86/Ginit_remote-x86.c \
x86/Gis_signal_frame-x86.c \
x86/Gget_proc_info-x86.c x86/Gregs-x86.c \
x86/Gresume-x86.c x86/Gset_reg-x86.c x86/Gstep-x86.c \
\
dwarf/Lfind_proc_info-lsb.c \
x86/Lcreate_addr_space-x86.c \
x86/Lget_reg-x86.c x86/Lget_proc_name-x86.c x86/Linit-x86.c \
x86/Linit_local-x86.c x86/Linit_remote-x86.c \
@ -123,29 +147,29 @@ libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_common) \
x86/Lget_proc_info-x86.c x86/Lregs-x86.c \
x86/Lresume-x86.c x86/Lset_reg-x86.c x86/Lstep-x86.c
# The list of files that go into libunwind-x86:
libunwind_x86_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
$(libunwind_la_SOURCES_generic) \
dwarf/Gfind_proc_info-lsb.c \
x86/Gcreate_addr_space-x86.c \
x86/Gget_reg-x86.c x86/Gget_proc_name-x86.c x86/Ginit-x86.c \
x86/Ginit_local-x86.c x86/Ginit_remote-x86.c \
x86/Gis_signal_frame-x86.c \
x86/Gget_proc_info-x86.c x86/Gregs-x86.c \
x86/Gresume-x86.c x86/Gset_reg-x86.c x86/Gstep-x86.c
if REMOTE_ONLY
libunwind_la_SOURCES_cdep = $(libunwind_la_SOURCES_remote)
install-exec-hook:
# Nothing to do here....
else
libunwind_la_SOURCES_cdep = $(libunwind_la_SOURCES_local)
lib_LTLIBRARIES_cdep = libunwind-setjmp.la
libunwind_setjmp_la_SOURCES_common = $(libunwind_setjmp_la_SOURCES_local)
libunwind_setjmp_la_LDFLAGS = -version-info $(SETJMP_SO_VERSION)
libunwind_setjmp_la_LIBADD = libunwind-$(arch).la
libunwind_setjmp_la_SOURCES_ia64 = $(libunwind_setjmp_la_SOURCES_local_ia64)
libunwind_setjmp_la_SOURCES_hppa = $(libunwind_setjmp_la_SOURCES_local_hppa)
libunwind_setjmp_la_SOURCES_x86 = $(libunwind_setjmp_la_SOURCES_local_x86)
#
# This is not ideal, but I know of no other way to install an
# alias for a library.
#
install-exec-hook:
$(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind.a
$(LN_S) -f libunwind-$(arch).so $(DESTDIR)$(libdir)/libunwind.so
$(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind-generic.a
$(LN_S) -f libunwind-$(arch).so \
$(DESTDIR)$(libdir)/libunwind-generic.so
endif
if OS_LINUX
@ -166,28 +190,37 @@ Gcursor_i.h: mk_Gcursor_i-ia64
Lcursor_i.h: mk_Lcursor_i-ia64
./mk_Lcursor_i-ia64 > $@
lib_LTLIBRARIES_arch = libunwind-ia64.la
libunwind_ia64_la_SOURCES = $(libunwind_la_SOURCES_ia64)
libunwind_la_SOURCES = $(libunwind_la_SOURCES_ia64)
libunwind_ia64_la_SOURCES = $(libunwind_ia64_la_SOURCES_ia64)
libunwind_ia64_la_LDFLAGS = -version-info $(SOVERSION)
libunwind_ia64_la_LIBADD = libunwind.la
libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
$(libunwind_setjmp_la_SOURCES_ia64)
else
if ARCH_HPPA
lib_LTLIBRARIES_arch = libunwind-hppa.la
libunwind_la_SOURCES = $(libunwind_la_SOURCES_hppa)
libunwind_hppa_la_SOURCES = $(libunwind_la_SOURCES_hppa)
libunwind_hppa_la_LDFLAGS = -version-info $(SOVERSION)
libunwind_hppa_la_LIBADD = libunwind.la
libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
$(libunwind_setjmp_la_SOURCES_hppa)
else
if ARCH_X86
lib_LTLIBRARIES_arch = libunwind-x86.la
libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86)
libunwind_x86_la_SOURCES = $(libunwind_la_SOURCES_x86)
libunwind_x86_la_LDFLAGS = -version-info $(SOVERSION)
libunwind_x86_la_LIBADD = libunwind.la
libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
$(libunwind_setjmp_la_SOURCES_x86)
endif # ARCH_X86
endif # ARCH_HPPA
endif # ARCH_IA64
libunwind_la_LDFLAGS = -XCClinker -nostartfiles -version-info $(SOVERSION)
lib_LIBRARIES = $(LIBRARIES_cdep)
lib_LTLIBRARIES = $(lib_LTLIBRARIES_cdep) $(lib_LTLIBRARIES_arch)
AM_CPPFLAGS = -I$(top_srcdir)/include/$(arch) -I$(top_srcdir)/include -I.
@ -199,12 +232,14 @@ EXTRA_DIST = elfxx.h elfxx.c unwind-internal.h \
$(libunwind_la_SOURCES_x86) \
$(libunwind_la_SOURCES_os_linux) \
$(libunwind_la_SOURCES_os_hpux) \
$(libunwind_la_SOURCES_common) \
$(libunwind_la_SOURCES_local) \
$(libunwind_la_SOURCES_remote) \
$(libunwind_setjmp_la_SOURCES_local) \
$(libunwind_setjmp_la_SOURCES_local_hppa) \
$(libunwind_setjmp_la_SOURCES_local_ia64) \
$(libunwind_setjmp_la_SOURCES_local_x86)
$(libunwind_la_SOURCES_generic) \
$(libunwind_ptrace_a_SOURCES) \
$(libunwind_setjmp_la_SOURCES_common) \
$(libunwind_setjmp_la_SOURCES_hppa) \
$(libunwind_setjmp_la_SOURCES_ia64) \
$(libunwind_setjmp_la_SOURCES_x86)
# The -version-info flag accepts an argument of the form
# `current[:revision[:age]]'. So, passing `-version-info 3:12:1' sets