summaryrefslogtreecommitdiff
path: root/libebl
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2019-08-26 10:51:45 -0700
committerMark Wielaard <mark@klomp.org>2019-08-28 21:45:26 +0200
commit823ee0c48e6db1134a36c6ae165a983466600fed (patch)
tree24a5e01ac094d46cbcd9a3ab26e1a8006a08bb7c /libebl
parent4fcb7ec9d788d09f1525a506e1cbe8a39fc1b8eb (diff)
downloadelfutils-823ee0c48e6db1134a36c6ae165a983466600fed.tar.gz
Add PIC and non-PIC variants of libcpu and libebl
Currently, libcpu and libebl are always compiled as PIC. An upcoming change will add the objects from libcpu.a and libebl.a to libdw.a, which should not be PIC unless configured that way. So, make libcpu.a and libebl.a non-PIC and add libcpu_pic.a and libebl_pic.a. Signed-off-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'libebl')
-rw-r--r--libebl/ChangeLog4
-rw-r--r--libebl/Makefile.am8
2 files changed, 10 insertions, 2 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index a772ffa3..3a836c89 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,6 +1,8 @@
2019-07-05 Omar Sandoval <osandov@fb.com>
- * Makefile.am (gen_SOURCES): Remove.
+ * Makefile.am: Make libebl.a non-PIC by default.
+ Add libebl_pic.a.
+ (gen_SOURCES): Remove.
2019-04-29 Mao Han <han_mao@c-sky.com>
diff --git a/libebl/Makefile.am b/libebl/Makefile.am
index ccc1a31a..b85ead01 100644
--- a/libebl/Makefile.am
+++ b/libebl/Makefile.am
@@ -28,12 +28,15 @@
## not, see <http://www.gnu.org/licenses/>.
##
include $(top_srcdir)/config/eu.am
+if BUILD_STATIC
AM_CFLAGS += $(fpic_CFLAGS)
+endif
AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm
VERSION = 1
LIBEBL_SUBDIR = @LIBEBL_SUBDIR@
lib_LIBRARIES = libebl.a
+noinst_LIBRARIES = libebl_pic.a
pkginclude_HEADERS = libebl.h
@@ -57,6 +60,9 @@ libebl_a_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \
eblresolvesym.c eblcheckreloctargettype.c \
ebl_data_marker_symbol.c
+libebl_pic_a_SOURCES =
+am_libebl_pic_a_OBJECTS = $(libebl_a_SOURCES:.c=.os)
+
noinst_HEADERS = libeblP.h ebl-hooks.h
-CLEANFILES += $(am_libebl_pic_a_OBJECTS)
+MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS)