Any reason why the windows cross compile fix we discussed [1] did not
made it into mainline?
This is trivial patch, which resume the ability to build openvpn using
cross compiler and autotools.
Please apply so we don't need to maintain this out of tree.
You can test build at [2].
I'm sorry, that patch has slipped my patch queue. The patch applies pretty
cleanly to the beta2.2 branch (just some offset values which are wrong).
So I am willing to include that into the final 2.2 release.
Speaking of which, I also proposed a (rather trivial) patch which
enables cross compilation of a number of OpenVPN plugins (that patch is
attached again) as in the 2.1.4 version that was not possible.
This was ACKed by you (see the "[OpenVPN 2.1.4 BUG]: hard-coded values
in Makefiles for down-root and auth-pam plugins prevent cross
compilation" thread for more details) on 30/12/2010, though I am unsure
as to whether it would make it for the 2.2 release. Any progress on that?
diff -NurBb openvpn-2.1.4/plugin/auth-pam/Makefile a/plugin/auth-pam/Makefile
--- openvpn-2.1.4/plugin/auth-pam/Makefile 2010-10-21 18:37:51.000000000
+0100
+++ a/plugin/auth-pam/Makefile 2010-12-26 01:57:45.345754000 +0000
@@ -15,16 +15,14 @@
# This directory is where we will look for openvpn-plugin.h
INCLUDE=-I../..
-CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM)
-
openvpn-auth-pam.so : auth-pam.o pamdl.o
- gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o
openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM)
+ ${CC} -DDLOPEN_PAM=$(DLOPEN_PAM) -fPIC -shared ${LDFLAGS}
-Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc
$(LIBPAM)
auth-pam.o : auth-pam.c pamdl.h
- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} auth-pam.c
+ ${CC} ${CFLAGS} -DDLOPEN_PAM=$(DLOPEN_PAM) -fPIC -c ${INCLUDE}
auth-pam.c
pamdl.o : pamdl.c pamdl.h
- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} pamdl.c
+ ${CC} ${CFLAGS} -DDLOPEN_PAM=$(DLOPEN_PAM) -fPIC -c ${INCLUDE} pamdl.c
clean :
rm -f *.o *.so
diff -NurBb openvpn-2.1.4/plugin/down-root/Makefile a/plugin/down-root/Makefile
--- openvpn-2.1.4/plugin/down-root/Makefile 2010-10-21 18:37:51.000000000
+0100
+++ a/plugin/down-root/Makefile 2010-12-26 01:58:07.976755000 +0000
@@ -5,13 +5,11 @@
# This directory is where we will look for openvpn-plugin.h
INCLUDE=-I../..
-CC_FLAGS=-O2 -Wall
-
down-root.so : down-root.o
- gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-down-root.so -o
openvpn-down-root.so down-root.o -lc
+ ${CC} -fPIC -shared ${LDFLAGS} -Wl,-soname,openvpn-down-root.so -o
openvpn-down-root.so down-root.o -lc
down-root.o : down-root.c
- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} down-root.c
+ ${CC} ${CFLAGS} -fPIC -c ${INCLUDE} down-root.c
clean :
rm -f *.o *.so