--- dtc-1.7.2/Makefile.orig	2024-11-06 04:01:37.000000000 +0100
+++ dtc-1.7.2/Makefile	2024-12-17 08:16:32.746503200 +0100
@@ -21,7 +21,7 @@
 WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \
 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow \
 	-Wsuggest-attribute=format -Wwrite-strings
-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
+CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) $(WARNINGS) $(EXTRA_CFLAGS)
 
 BISON = bison
 LEX = flex
@@ -69,9 +69,9 @@
 SHAREDLIB_CFLAGS  = -fPIC
 SHAREDLIB_LDFLAGS = -fPIC -dynamiclib -Wl,-install_name -Wl,
 else ifeq ($(HOSTOS),$(filter $(HOSTOS),msys cygwin))
-SHAREDLIB_EXT     = so
+SHAREDLIB_EXT     = dll
 SHAREDLIB_CFLAGS  =
-SHAREDLIB_LDFLAGS = -shared -Wl,--version-script=$(LIBFDT_version) -Wl,-soname,
+SHAREDLIB_LDFLAGS = -shared -Wl,--version-script=$(LIBFDT_version) -Wl,--out-implib,
 else
 SHAREDLIB_EXT     = so
 SHAREDLIB_CFLAGS  = -fPIC
@@ -238,9 +238,9 @@
 install-lib: libfdt
 	@$(VECHO) INSTALL-LIB
 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
-	$(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
-	ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
-	ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
+	$(INSTALL) -d $(DESTDIR)$(BINDIR)
+	$(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(BINDIR)
+	$(INSTALL_LIB) $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)
 	$(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
 
 install-includes:
@@ -291,7 +291,7 @@
 include $(PYLIBFDT_dir)/Makefile.pylibfdt
 
 .PHONY: pylibfdt
-pylibfdt: $(PYLIBFDT_dir)/_libfdt.so
+pylibfdt: $(PYLIBFDT_dir)/_libfdt.$(SHAREDLIB_EXT)
 
 #
 # Release signing and uploading
--- dtc-1.5.0/pylibfdt/Makefile.pylibfdt.orig	2019-04-25 08:39:00.773172800 +0300
+++ dtc-1.5.0/pylibfdt/Makefile.pylibfdt	2019-04-25 08:42:12.651441900 +0300
@@ -2,8 +2,8 @@
 #
 
 PYLIBFDT_srcs = $(PYLIBFDT_dir)/libfdt.i
-PYMODULE = $(PYLIBFDT_dir)/_libfdt.so
-PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.so
+PYMODULE = $(PYLIBFDT_dir)/_libfdt.$(SHAREDLIB_EXT)
+PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.$(SHAREDLIB_EXT)
 PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_dir)/%)
 PYLIBFDT_CLEANDIRS_L = build __pycache__
 PYLIBFDT_CLEANDIRS = $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_dir)/%)
--- dtc-1.7.2/libfdt/Makefile.libfdt.orig	2024-12-17 08:17:19.871970100 +0100
+++ dtc-1.7.2/libfdt/Makefile.libfdt	2024-12-17 08:18:46.120273700 +0100
@@ -6,13 +6,13 @@
 #
 
 LIBFDT_so = libfdt.$(SHAREDLIB_EXT)
-LIBFDT_soname = libfdt.$(SHAREDLIB_EXT).1
+LIBFDT_soname = libfdt.$(SHAREDLIB_EXT).a
 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.$(SHAREDLIB_EXT).$(DTC_VERSION)
+LIBFDT_LIB = libfdt.$(SHAREDLIB_EXT)
 
 libfdt_clean:
 	@$(VECHO) CLEAN "(libfdt)"
