MINOR: build: add linux-glibc-legacy build TARGET

As discussed in issue #128, introduce a new build TARGET
linux-glibc-legacy to allow the build on old, legacy OS.

Should be backported to 2.0.

(cherry picked from commit cc1eb1619fbd09bed40c09e312099c1ccd79902c)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/Makefile b/Makefile
index 571917e..53d7d4d 100644
--- a/Makefile
+++ b/Makefile
@@ -141,8 +141,8 @@
 #### TARGET system
 # Use TARGET=<target_name> to optimize for a specifc target OS among the
 # following list (use the default "generic" if uncertain) :
-#    linux-glibc, solaris, freebsd, openbsd, netbsd, cygwin,
-#    haiku, aix51, aix52, osx, generic, custom
+#    linux-glibc, linux-glibc-legacy, solaris, freebsd, openbsd, netbsd,
+#    cygwin, haiku, aix51, aix52, osx, generic, custom
 TARGET =
 
 #### TARGET CPU
@@ -326,6 +326,14 @@
     USE_GETADDRINFO)
 endif
 
+# For linux >= 2.6.28, glibc without new features
+ifeq ($(TARGET),linux-glibc-legacy)
+  set_target_defaults = $(call default_opts, \
+    USE_POLL USE_TPROXY USE_LIBCRYPT USE_DL USE_RT USE_CRYPT_H USE_NETFILTER  \
+    USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY          \
+    USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_GETADDRINFO)
+endif
+
 # Solaris 8 and above
 ifeq ($(TARGET),solaris)
   # We also enable getaddrinfo() which works since solaris 8.
@@ -732,8 +740,8 @@
 	@echo
 	@echo "Please choose the target among the following supported list :"
 	@echo
-	@echo "   linux-glibc, solaris, freebsd, openbsd, netbsd, cygwin,"
-	@echo "   haiku, aix51, aix52, osx, generic, custom"
+	@echo "   linux-glibc, linux-glibc-legacy, solaris, freebsd, openbsd, netbsd,"
+	@echo "   cygwin, haiku, aix51, aix52, osx, generic, custom"
 	@echo
 	@echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
 	@echo "want to precisely tweak every option, or choose the target which"
@@ -809,8 +817,8 @@
 	     fi; \
 	   else \
 	     echo "TARGET not set, you may pass 'TARGET=xxx' to set one among :";\
-	     echo "  linux-glibc, solaris, freebsd, netbsd, osx, openbsd,"; \
-	     echo "  aix51, aix52, cygwin, haiku, generic, custom"; \
+	     echo "  linux-glibc, linux-glibc-legacy, solaris, freebsd, netbsd, osx,"; \
+	     echo "  openbsd, aix51, aix52, cygwin, haiku, generic, custom"; \
 	   fi
 	$(Q)echo;echo "Enabled features for TARGET '$(TARGET)' (disable with 'USE_xxx=') :"
 	$(Q)set -- $(foreach opt,$(patsubst USE_%,%,$(use_opts)),$(if $(USE_$(opt)),$(opt),)); echo "  $$*" | (fmt || cat) 2>/dev/null