MINOR: build: add aix72-gcc build TARGET and power{8,9} CPUs
authorChristian Lachner <gladiac@gmail.com>
Mon, 10 Feb 2020 09:29:13 +0000 (10:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Feb 2020 14:38:20 +0000 (15:38 +0100)
commit28935cd6aac34a84b2d6a7b56ea9a9e90e60d6be
treeed3ead738b59066bdd68077a03531a163d49a799
parent938977daf597667c589cfdf1a87bb00ba2bcfdad
MINOR: build: add aix72-gcc build TARGET and power{8,9} CPUs

As haproxy wont build on AIX 7.2 using the old "aix52" TARGET a new
TARGET was introduced which adds two special CFLAGS to prevent the
loading of AIXs xmem.h and var.h. This is done by defining the
corresponding include-guards _H_XMEM and _H_VAR. Without excluding
those headers-files the build fails because of redefinition errors:

1)
CC src/mux_fcgi.o
In file included from /usr/include/sys/uio.h:90,
                 from /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/sys/socket.h:104,
                 from include/common/compat.h:32,
                 from include/common/cfgparse.h:25,
                 from src/mux_fcgi.c:13:
src/mux_fcgi.c:204:13: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
  struct ist rem_addr;
             ^~~~~~~~

2)
CC src/cfgparse-listen.o
In file included from include/types/arg.h:31,
                 from include/types/acl.h:29,
                 from include/types/proxy.h:41,
                 from include/proto/log.h:34,
                 from include/common/cfgparse.h:30,
                 from src/mux_h2.c:13:
include/types/vars.h:30:8: error: redefinition of 'struct var'
 struct var {
        ^~~

Futhermore, to enable multithreading via USE_THREAD, the atomic
library was added to the LDFLAGS. Finally, two new CPUs were added
to simplify the usage of power8 and power9 optimizations.

This TARGET was only tested on GCC 8.3 and may or may not work on
IBM's native C-compiler (XLC).

Should be backported to 2.1.

(cherry picked from commit c13223022c125bb43c3a53a26a594dac8a3e90f2)
Signed-off-by: Willy Tarreau <w@1wt.eu>
INSTALL
Makefile