xref: /OK3568_Linux_fs/buildroot/package/mongrel2/0002-Fix-Makefiles-for-cross-compilation.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 298356c44a7df2b34c4e307c531d2010e2cb4b79 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Lionel Orry <lionel.orry@gmail.com>
3*4882a593SmuzhiyunDate: Wed, 27 Mar 2013 15:56:56 +0100
4*4882a593SmuzhiyunSubject: [PATCH] Fix Makefiles for cross-compilation
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe CFLAGS handling in mongrel2 is really messy and it is hard to make
7*4882a593Smuzhiyunit behave correctly with cross-compiling environments. This patch
8*4882a593Smuzhiyunrestricts the Makefiles syntax to GNU Make, but help cross-compiling.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunThis is not meant to be applied upstream.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSigned-off-by: Lionel Orry <lionel.orry@gmail.com>
13*4882a593Smuzhiyun[Fabrice: refresh for 1.12.2]
14*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
15*4882a593Smuzhiyun---
16*4882a593Smuzhiyun Makefile                      | 2 +-
17*4882a593Smuzhiyun tools/config_modules/Makefile | 2 +-
18*4882a593Smuzhiyun tools/filters/Makefile        | 2 +-
19*4882a593Smuzhiyun tools/m2sh/Makefile           | 2 +-
20*4882a593Smuzhiyun tools/procer/Makefile         | 2 +-
21*4882a593Smuzhiyun 5 files changed, 5 insertions(+), 5 deletions(-)
22*4882a593Smuzhiyun
23*4882a593Smuzhiyundiff --git a/Makefile b/Makefile
24*4882a593Smuzhiyunindex 4e89c33..2f549a8 100644
25*4882a593Smuzhiyun--- a/Makefile
26*4882a593Smuzhiyun+++ b/Makefile
27*4882a593Smuzhiyun@@ -1,5 +1,5 @@
28*4882a593Smuzhiyun CFLAGS?=-g -O2
29*4882a593Smuzhiyun-CFLAGS += -Wall -Wextra -Wno-implicit-fallthrough -Wno-unused-const-variable -I./src -DNDEBUG -D_FILE_OFFSET_BITS=64 -pthread
30*4882a593Smuzhiyun+override CFLAGS += -Wall -Wextra -Wno-implicit-fallthrough -Wno-unused-const-variable -I./src -DNDEBUG -D_FILE_OFFSET_BITS=64 -pthread
31*4882a593Smuzhiyun CFLAGS += ${OPTFLAGS}
32*4882a593Smuzhiyun LIBS+=-lzmq -ldl -lsqlite3 -lmbedtls -lmbedx509 -lmbedcrypto
33*4882a593Smuzhiyun PREFIX?=/usr/local
34*4882a593Smuzhiyundiff --git a/tools/config_modules/Makefile b/tools/config_modules/Makefile
35*4882a593Smuzhiyunindex c2680d1..ada3169 100644
36*4882a593Smuzhiyun--- a/tools/config_modules/Makefile
37*4882a593Smuzhiyun+++ b/tools/config_modules/Makefile
38*4882a593Smuzhiyun@@ -1,5 +1,5 @@
39*4882a593Smuzhiyun PREFIX?=/usr/local
40*4882a593Smuzhiyun-CFLAGS=-I../../src -I../../src/mbedtls/include $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build
41*4882a593Smuzhiyun+override CFLAGS=-I../../src -I../../src/mbedtls/include $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build
42*4882a593Smuzhiyun LDFLAGS=$(OPTLIBS)
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun MONGO_SRC = mongo-c-driver/src/bson.c \
45*4882a593Smuzhiyundiff --git a/tools/filters/Makefile b/tools/filters/Makefile
46*4882a593Smuzhiyunindex 6505ad5..a968ef6 100644
47*4882a593Smuzhiyun--- a/tools/filters/Makefile
48*4882a593Smuzhiyun+++ b/tools/filters/Makefile
49*4882a593Smuzhiyun@@ -1,5 +1,5 @@
50*4882a593Smuzhiyun PREFIX?=/usr/local
51*4882a593Smuzhiyun-CFLAGS=-I../../src -I../../src/mbedtls/include $(OPTFLAGS) -g -fPIC -shared -nostartfiles -L../../build
52*4882a593Smuzhiyun+override CFLAGS=-I../../src -I../../src/mbedtls/include $(OPTFLAGS) -g -fPIC -shared -nostartfiles -L../../build
53*4882a593Smuzhiyun LDFLAGS=$(OPTLIBS)
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun all: null.so rewrite.so sendfile.so
56*4882a593Smuzhiyundiff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile
57*4882a593Smuzhiyunindex b50d8a0..cc00062 100644
58*4882a593Smuzhiyun--- a/tools/m2sh/Makefile
59*4882a593Smuzhiyun+++ b/tools/m2sh/Makefile
60*4882a593Smuzhiyun@@ -1,4 +1,4 @@
61*4882a593Smuzhiyun-CFLAGS=-DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS)
62*4882a593Smuzhiyun+override CFLAGS=-DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS)
63*4882a593Smuzhiyun LIBS=-lzmq -lsqlite3 ../../build/libm2.a $(OPTLIBS)
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun PREFIX?=/usr/local
66*4882a593Smuzhiyundiff --git a/tools/procer/Makefile b/tools/procer/Makefile
67*4882a593Smuzhiyunindex bb9aa31..d377f7f 100644
68*4882a593Smuzhiyun--- a/tools/procer/Makefile
69*4882a593Smuzhiyun+++ b/tools/procer/Makefile
70*4882a593Smuzhiyun@@ -1,4 +1,4 @@
71*4882a593Smuzhiyun-CFLAGS=-DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS)
72*4882a593Smuzhiyun+override CFLAGS=-DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS)
73*4882a593Smuzhiyun PREFIX?=/usr/local
74*4882a593Smuzhiyun LIBS?=-lzmq
75*4882a593Smuzhiyun SOURCES=$(wildcard *.c)
76*4882a593Smuzhiyun--
77*4882a593Smuzhiyun2.27.0
78*4882a593Smuzhiyun
79