package: haproxy
[packages.git] / net / haproxy / patches / 0041-BUILD-enable-poll-by-default-in-the-makefile.patch
1 From 4c5a09bb3c62070f139159378a8d68897b7ec8d6 Mon Sep 17 00:00:00 2001
2 From: Willy Tarreau <w@1wt.eu>
3 Date: Tue, 2 Apr 2013 08:14:29 +0200
4 Subject: [PATCH 41/42] BUILD: enable poll() by default in the makefile
5
6 This allows to build haproxy for unknown targets and still have poll().
7 If for any reason a target does not support it, just passing USE_POLL=""
8 disables it.
9 (cherry picked from commit 32e65ef62570cbace7368ebe7262b48c28b31bb7)
10 ---
11  Makefile | 5 ++++-
12  README   | 9 ++++++++-
13  2 files changed, 12 insertions(+), 2 deletions(-)
14
15 diff --git a/Makefile b/Makefile
16 index 8d82543..f4dbccd 100644
17 --- a/Makefile
18 +++ b/Makefile
19 @@ -172,7 +172,10 @@ LDFLAGS = $(ARCH_FLAGS) -g
20  # Depending on the target platform, some options are set, as well as some
21  # CFLAGS and LDFLAGS. The USE_* values are set to "implicit" so that they are
22  # not reported in the build options string. You should not have to change
23 -# anything there.
24 +# anything there. poll() is always supported, unless explicitly disabled by
25 +# passing USE_POLL="" on the make command line.
26 +USE_POLL   = default
27 +
28  ifeq ($(TARGET),generic)
29    # generic system target has nothing specific
30    USE_POLL   = implicit
31 diff --git a/README b/README
32 index aca83f9..c99897e 100644
33 --- a/README
34 +++ b/README
35 @@ -12,7 +12,7 @@
36  To build haproxy, you will need :
37    - GNU make. Neither Solaris nor OpenBSD's make work with the GNU Makefile.
38      However, specific Makefiles for BSD and OSX are provided.
39 -  - GCC between 2.91 and 4.5.0. Others may work, but not tested.
40 +  - GCC between 2.91 and 4.7. Others may work, but not tested.
41    - GNU ld
42  
43  Also, you might want to build with libpcre support, which will provide a very
44 @@ -100,6 +100,13 @@ otherwise __fd_select() will be used while not being present in the libc.
45  If you get build errors because of strange symbols or section mismatches,
46  simply remove -g from DEBUG_CFLAGS.
47  
48 +You can easily define your own target with the GNU Makefile. Unknown targets
49 +are processed with no default option except USE_POLL=default. So you can very
50 +well use that property to define your own set of options. USE_POLL can even be
51 +disabled by setting USE_POLL="". For example :
52 +
53 +    $ gmake TARGET=tiny USE_POLL="" TARGET_CFLAGS=-fomit-frame-pointer
54 +
55  
56  2) How to install it
57  --------------------
58 -- 
59 1.8.1.5
60