[openssl-dev] [PATCH] [openssl.org #2558] make windres controllable via build env var settings

Mike Frysinger via RT rt at openssl.org
Wed Mar 2 05:05:10 UTC 2016


atm, the windres code in openssl is only usable via the cross-compile prefix
option unlike all the other build tools.  So add support for the standard $RC
/ $WINDRES env vars as well.
---
 Configure       | 1 +
 Makefile.in     | 2 ++
 Makefile.shared | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Configure b/Configure
index 080bc06..f5b1257 100755
--- a/Configure
+++ b/Configure
@@ -888,6 +888,7 @@ $target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} || $default_ranlib;
 $target{ar} = $ENV{'AR'} || "ar";
 $target{arflags} = "" if !defined($target{arflags});
 $target{nm} = "nm";
+$target{windres} = $ENV{'RC'} || $ENV{'WINDRES'} || "windres";
 # Make sure build_scheme is consistent.
 $target{build_scheme} = [ $target{build_scheme} ]
     if ref($target{build_scheme}) ne "ARRAY";
diff --git a/Makefile.in b/Makefile.in
index 30f44ff..0830b88 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -103,6 +103,7 @@ ARFLAGS= {- $target{arflags} -}
 AR=$(CROSS_COMPILE){- $target{ar} -} $(ARFLAGS) r
 RANLIB= {- $target{ranlib} -}
 NM= $(CROSS_COMPILE){- $target{nm} -}
+WINDRES= $(CROSS_COMPILE){- $target{windres} -}
 PERL= {- $config{perl} -}
 #RM= echo --
 RM= rm -f
@@ -254,6 +255,7 @@ BUILDENV=	LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
 		SHARED_CFLAG='$(SHARED_CFLAG)'				\
 		AS='$(CC)' ASFLAG='$(CFLAG) -c'			\
 		AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'	\
+		WINDRES='$(WINDRES)'				\
 		CROSS_COMPILE='$(CROSS_COMPILE)'		\
 		PERL='$(PERL)' DYNAMIC_ENGINES='$(DYNAMIC_ENGINES)'	\
 		SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'	\
diff --git a/Makefile.shared b/Makefile.shared
index 9028960..adcfe40 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -280,7 +280,7 @@ link_shlib.cygwin:
 	echo "$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name |" \
 		     "$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o"; \
 	$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name | \
-		$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
+		$(WINDRES) $(SHARED_RCFLAGS) -o rc.o; \
 	ALLSYMSFLAGS='-Wl,--whole-archive'; \
 	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
 	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,--enable-auto-image-base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a rc.o"; \
-- 
2.6.2


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=2558
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list