]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: add an AIX 5.2 (and later) target.
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Jun 2012 14:15:03 +0000 (16:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Jun 2012 14:23:01 +0000 (16:23 +0200)
It's always a real pain to build on AIX and I constantly lose my flags,
so let's store them once for all in the Makefile.

Makefile
README

index 2aeda2b663fa5d93fe5e34ee563e276ec38363c8..7cc1708e4227892ecd1213acc0d4f4c0bc1b3d9b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@ DOCDIR = $(PREFIX)/doc/haproxy
 # Use TARGET=<target_name> to optimize for a specifc target OS among the
 # following list (use the default "generic" if uncertain) :
 #    generic, linux22, linux24, linux24e, linux26, solaris,
-#    freebsd, openbsd, cygwin, custom
+#    freebsd, openbsd, cygwin, custom, aix52
 TARGET =
 
 #### TARGET CPU
@@ -256,6 +256,13 @@ ifeq ($(TARGET),openbsd)
   USE_KQUEUE     = implicit
   USE_TPROXY     = implicit
 else
+ifeq ($(TARGET),aix52)
+  # This is for AIX 5.2 and later
+  USE_POLL        = implicit
+  USE_LIBCRYPT    = implicit
+  TARGET_CFLAGS   = -D_MSGQSUPPORT
+  DEBUG_CFLAGS    =
+else
 ifeq ($(TARGET),cygwin)
   # This is for Cygwin
   # Cygwin adds IPv6 support only in version 1.7 (in beta right now). 
@@ -263,6 +270,7 @@ ifeq ($(TARGET),cygwin)
   USE_TPROXY = implicit
   TARGET_CFLAGS  = $(if $(filter 1.5.%, $(shell uname -r)), -DUSE_IPV6 -DAF_INET6=23 -DINET6_ADDRSTRLEN=46, )
 endif # cygwin
+endif # aix52
 endif # openbsd
 endif # freebsd
 endif # solaris
diff --git a/README b/README
index ca6312df3bd31f332941183c88b5c92930140012..06187a67cb68370cf5fae89d36b5031221985abc 100644 (file)
--- a/README
+++ b/README
@@ -29,6 +29,7 @@ and assign it to the TARGET variable :
   - solaris     for Solaris 8 or 10 (others untested)
   - freebsd     for FreeBSD 5 to 8.0 (others untested)
   - openbsd     for OpenBSD 3.1 to 4.6 (others untested)
+  - aix52       for AIX 5.2
   - cygwin      for Cygwin
   - generic     for any other OS.
   - custom      to manually adjust every setting
@@ -107,6 +108,8 @@ variables in the BSD makefiles.
 AIX 5.3 is known to work with the generic target. However, for the binary to
 also run on 5.2 or earlier, you need to build with DEFINE="-D_MSGQSUPPORT",
 otherwise __fd_select() will be used while not being present in the libc.
+If you get build errors because of strange symbols or section mismatches,
+simply remove -g from DEBUG_CFLAGS.
 
 
 2) How to install it