aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Maier <brandon.maier@collins.com>2023-08-04 15:48:27 +0000
committerDavid Gibson <david@gibson.dropbear.id.au>2023-08-06 14:53:29 +1000
commita3dc9f006a783bc0267784772e21a54cb54d85cf (patch)
treed650879b25a295f98e5d55743841801720b00339
parent35019949c4c72cfe4d9a95db7108758d2c7944a1 (diff)
downloaddtc-a3dc9f006a783bc0267784772e21a54cb54d85cf.zip
dtc-a3dc9f006a783bc0267784772e21a54cb54d85cf.tar.gz
dtc-a3dc9f006a783bc0267784772e21a54cb54d85cf.tar.bz2
libfdt: rename libfdt-X.Y.Z.so to libfdt.so.X.Y.Z
The Meson build system requires that the generated shared library uses the libfdt.so.X.Y.Z naming scheme. But the Makefile is generating libfdt-X.Y.Z.so. We want to keep the output of both systems the same to avoid issues, so we rename the Makefile to match Meson. Additionally, Meson generates the base "libfdt.so -> libfdt.so.1" symlink which the Makefile hasn't been doing, add that as well. This shouldn't impact existing users as the linker should be looking for libfdt.so.1 which won't change and will still point to the correct file. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--.gitignore1
-rw-r--r--Makefile1
-rw-r--r--libfdt/Makefile.libfdt6
3 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 416fa05..8fdf112 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
*.a
*.patch
*.so
+*.so.*
*~
*.bak
*.tab.[ch]
diff --git a/Makefile b/Makefile
index fc4a133..10a56d4 100644
--- a/Makefile
+++ b/Makefile
@@ -218,6 +218,7 @@ $(LIBFDT_lib): $(addprefix $(LIBFDT_dir)/,$(LIBFDT_OBJS)) $(LIBFDT_version)
$(CC) $(LDFLAGS) $(SHAREDLIB_LDFLAGS)$(LIBFDT_soname) -o $(LIBFDT_lib) \
$(addprefix $(LIBFDT_dir)/,$(LIBFDT_OBJS))
ln -sf $(LIBFDT_LIB) $(LIBFDT_dir)/$(LIBFDT_soname)
+ ln -sf $(LIBFDT_soname) $(LIBFDT_dir)/$(LIBFDT_so)
ifneq ($(DEPTARGETS),)
-include $(LIBFDT_OBJS:%.o=$(LIBFDT_dir)/%.d)
diff --git a/libfdt/Makefile.libfdt b/libfdt/Makefile.libfdt
index b6d8fc0..b763b2e 100644
--- a/libfdt/Makefile.libfdt
+++ b/libfdt/Makefile.libfdt
@@ -4,15 +4,19 @@
# This is not a complete Makefile of itself. Instead, it is designed to
# be easily embeddable into other systems of Makefiles.
#
+
+LIBFDT_so = libfdt.$(SHAREDLIB_EXT)
LIBFDT_soname = libfdt.$(SHAREDLIB_EXT).1
LIBFDT_INCLUDES = fdt.h libfdt.h libfdt_env.h
LIBFDT_VERSION = version.lds
LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \
fdt_addresses.c fdt_overlay.c fdt_check.c
LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
-LIBFDT_LIB = libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT)
+LIBFDT_LIB = libfdt.$(SHAREDLIB_EXT).$(DTC_VERSION)
libfdt_clean:
@$(VECHO) CLEAN "(libfdt)"
rm -f $(STD_CLEANFILES:%=$(LIBFDT_dir)/%)
+ rm -f $(LIBFDT_dir)/$(LIBFDT_so)
rm -f $(LIBFDT_dir)/$(LIBFDT_soname)
+ rm -f $(LIBFDT_dir)/$(LIBFDT_LIB)