X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fmongrel2%2F0003-Fix-Makefiles-for-cross-compilation.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fmongrel2%2F0003-Fix-Makefiles-for-cross-compilation.patch;h=730d8ebfc0b466287b519c649f1098f1a4ec6c6e;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch new file mode 100644 index 0000000..730d8eb --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch @@ -0,0 +1,75 @@ +From 298356c44a7df2b34c4e307c531d2010e2cb4b79 Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Wed, 27 Mar 2013 15:56:56 +0100 +Subject: [PATCH 1/1] Fix Makefiles for cross-compilation + +The CFLAGS handling in mongrel2 is really messy and it is hard to make +it behave correctly with cross-compiling environments. This patch +restricts the Makefiles syntax to GNU Make, but help cross-compiling. + +This is not meant to be applied upstream. + +Signed-off-by: Lionel Orry +--- + Makefile | 2 +- + tools/config_modules/Makefile | 2 +- + tools/filters/Makefile | 2 +- + tools/m2sh/Makefile | 2 +- + tools/procer/Makefile | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 6dce4a6..d48e05e 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-g -O2 -Wall -Wextra -Isrc -Isrc/polarssl/include -pthread -rdynamic -DNDEBUG $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 ++override CFLAGS += -g -O2 -Wall -Wextra -Isrc -Isrc/polarssl/include -pthread -rdynamic -DNDEBUG $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 + LIBS=-lzmq -ldl -lsqlite3 $(OPTLIBS) + PREFIX?=/usr/local + +diff --git a/tools/config_modules/Makefile b/tools/config_modules/Makefile +index 398490c..53f2255 100644 +--- a/tools/config_modules/Makefile ++++ b/tools/config_modules/Makefile +@@ -1,5 +1,5 @@ + PREFIX?=/usr/local +-CFLAGS=-I../../src -I../../src/polarssl/include $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build ++override CFLAGS += -I../../src -I../../src/polarssl/include $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build + LDFLAGS=$(OPTLIBS) + + MONGO_SRC = mongo-c-driver/src/bson.c \ +diff --git a/tools/filters/Makefile b/tools/filters/Makefile +index f9f4556..6077b79 100644 +--- a/tools/filters/Makefile ++++ b/tools/filters/Makefile +@@ -1,5 +1,5 @@ + PREFIX?=/usr/local +-CFLAGS=-I../../src -I../../src/polarssl/include $(OPTFLAGS) -g -fPIC -shared -nostartfiles -L../../build ++ override CFLAGS += -I../../src -I../../src/polarssl/include $(OPTFLAGS) -g -fPIC -shared -nostartfiles -L../../build + LDFLAGS=$(OPTLIBS) + + all: null.so +diff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile +index b50d8a0..ba378c5 100644 +--- a/tools/m2sh/Makefile ++++ b/tools/m2sh/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS) ++override CFLAGS += -DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS) + LIBS=-lzmq -lsqlite3 ../../build/libm2.a $(OPTLIBS) + + PREFIX?=/usr/local +diff --git a/tools/procer/Makefile b/tools/procer/Makefile +index d0d7de0..629b2e9 100644 +--- a/tools/procer/Makefile ++++ b/tools/procer/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS) ++override CFLAGS += -DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS) + PREFIX?=/usr/local + LIBS?=-lzmq + SOURCES=$(wildcard *.c) +-- +1.8.1.4 +