From dd6008995a8e8509d71ffa906c837e7a320e8a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 30 Jun 2010 16:53:56 +0300 Subject: static build: do not use openssl engines We want minimal static build. And this now also breaks with our openssl since it tries to automatically dlopen some of the engine modules. --- .gitignore | 1 + src/Makefile | 3 ++- src/apk-static.c | 1 + src/apk.c | 4 ++++ 4 files changed, 8 insertions(+), 1 deletion(-) create mode 120000 src/apk-static.c diff --git a/.gitignore b/.gitignore index f6f9cf6a9d..2b22f52e03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ apk +apk.static *.o *.d *.cmd diff --git a/src/Makefile b/src/Makefile index bea288ee29..c9cda6a051 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,9 +41,10 @@ endif CFLAGS_ALL += -D_ATFILE_SOURCE CFLAGS_apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" +CFLAGS_apk-static.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE progs-$(STATIC) += apk.static -apk.static-objs := $(apk-objs) +apk.static-objs := $(filter-out apk.o,$(apk-objs)) apk-static.o LDFLAGS_apk.static := -static LDFLAGS_apk += -nopie -L$(obj) diff --git a/src/apk-static.c b/src/apk-static.c new file mode 120000 index 0000000000..bf745afa6d --- /dev/null +++ b/src/apk-static.c @@ -0,0 +1 @@ +apk.c \ No newline at end of file diff --git a/src/apk.c b/src/apk.c index 81bb950994..4196f74c39 100644 --- a/src/apk.c +++ b/src/apk.c @@ -12,13 +12,17 @@ #include #include #include +#include #include #include #include #include #include +#include +#ifndef OPENSSL_NO_ENGINE #include +#endif #include "apk_defines.h" #include "apk_database.h" -- cgit v1.2.3