From: Omar Sandoval Date: Mon, 26 Aug 2019 17:51:44 +0000 (-0700) Subject: libcpu: merge libcpu_{i386,x86_64,bpf} into one library X-Git-Tag: elfutils-0.178~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fcb7ec9d788d09f1525a506e1cbe8a39fc1b8eb;p=thirdparty%2Felfutils.git libcpu: merge libcpu_{i386,x86_64,bpf} into one library In preparation for combining the libebl backend modules, combine all of the libcpu backends into libcpu.a. Signed-off-by: Omar Sandoval --- diff --git a/backends/ChangeLog b/backends/ChangeLog index f1eaf14bd..91790bb91 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,7 @@ +2019-07-05 Omar Sandoval + + * Makefile.am: Replace libcpu_{i386,x86_64,bpf}.a with libcpu.a. + 2019-07-13 Mao Han * Makefile.am: Add C-SKY. diff --git a/backends/Makefile.am b/backends/Makefile.am index 175468f66..6470a3139 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -44,6 +44,7 @@ noinst_LIBRARIES = $(libebl_pic) noinst_DATA = $(libebl_pic:_pic.a=.so) +libcpu = ../libcpu/libcpu.a libelf = ../libelf/libelf.so libdw = ../libdw/libdw.so libeu = ../lib/libeu.a @@ -51,7 +52,6 @@ libeu = ../lib/libeu.a i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \ i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \ i386_initreg.c i386_unwind.c -cpu_i386 = ../libcpu/libcpu_i386.a libebl_i386_pic_a_SOURCES = $(i386_SRCS) am_libebl_i386_pic_a_OBJECTS = $(i386_SRCS:.c=.os) @@ -62,7 +62,6 @@ am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \ x86_64_initreg.c x86_64_unwind.c x32_corenote.c -cpu_x86_64 = ../libcpu/libcpu_x86_64.a libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os) @@ -128,7 +127,6 @@ am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os) m68k_corenote_no_Wpacked_not_aligned = yes bpf_SRCS = bpf_init.c bpf_regs.c bpf_symbol.c -cpu_bpf = ../libcpu/libcpu_bpf.a libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os) @@ -142,20 +140,16 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \ libebl_csky_pic_a_SOURCES = $(csky_SRCS) am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os) -libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) +libebl_%.so libebl_%.map: libebl_%_pic.a $(libcpu) $(libelf) $(libdw) $(libeu) @rm -f $(@:.so=.map) $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ > $(@:.so=.map) $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=.so) \ - -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--whole-archive $< $(libcpu) -Wl,--no-whole-archive \ -Wl,--version-script,$(@:.so=.map),--no-undefined \ -Wl,--as-needed $(libelf) $(libdw) $(libeu) @$(textrel_check) -libebl_i386.so: $(cpu_i386) -libebl_x86_64.so: $(cpu_x86_64) -libebl_bpf.so: $(cpu_bpf) - install: install-am install-ebl-modules install-ebl-modules: $(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index adebbef85..c0ea72eca 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,3 +1,7 @@ +2019-07-05 Omar Sandoval + + * Makefile.am: Combine libcpu_{i386,x86_64,bpf}.a into libcpu.a. + 2018-11-04 Mark Wielaard * bpf_disasm.c (bpf_disasm): Recognize BPF_JLT, BPF_JLE, BPF_JSLT diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index 4c8778d14..a7d9f6fde 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -35,20 +35,16 @@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$( $@T $(AM_V_at)mv -f $@T $@ @@ -86,6 +82,8 @@ i386_gendis_LDADD = $(libeu) -lm i386_parse.h: i386_parse.c ; +bpf_disasm_CFLAGS = -Wno-format-nonliteral + EXTRA_DIST = defs/i386 CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics)