- openbsd for OpenBSD 5.7 and above
- aix51 for AIX 5.1
- aix52 for AIX 5.2
+ - aix72-gcc for AIX 7.2 (using gcc)
- cygwin for Cygwin
- haiku for Haiku
- generic for any other OS or version.
- i686 for intel PentiumPro, Pentium 2 and above, AMD Athlon (32 bits)
- i586 for intel Pentium, AMD K6, VIA C3.
- ultrasparc : Sun UltraSparc I/II/III/IV processor
+ - power8 : IBM POWER8 processor
+ - power9 : IBM POWER9 processor
- native : use the build machine's specific processor optimizations. Use with
extreme care, and never in virtualized environments (known to break).
- generic : any other processor or no CPU-specific optimization. (default)
because of strange symbols or section mismatches, simply remove -g from
DEBUG_CFLAGS.
+Building on AIX 7.2 works fine using the "aix72-gcc" TARGET. It 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 header-files the build fails because of redefinition errors.
+Futhermore, the atomic library is added to the LDFLAGS to allow for
+multithreading via USE_THREAD.
+
You can easily define your own target with the GNU Makefile. Unknown targets
are processed with no default option except USE_POLL=default. So you can very
well use that property to define your own set of options. USE_POLL can even be
# Use TARGET=<target_name> to optimize for a specifc target OS among the
# following list (use the default "generic" if uncertain) :
# linux-glibc, linux-glibc-legacy, solaris, freebsd, openbsd, netbsd,
-# cygwin, haiku, aix51, aix52, osx, generic, custom
+# cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic, custom
TARGET =
#### TARGET CPU
# Use CPU=<cpu_name> to optimize for a particular CPU, among the following
# list :
-# generic, native, i586, i686, ultrasparc, custom
+# generic, native, i586, i686, ultrasparc, power8, power9, custom
CPU = generic
#### Architecture, used when not building for native architecture
CPU_CFLAGS.i586 = -O2 -march=i586
CPU_CFLAGS.i686 = -O2 -march=i686
CPU_CFLAGS.ultrasparc = -O6 -mcpu=v9 -mtune=ultrasparc
+CPU_CFLAGS.power8 = -O2 -mcpu=power8 -mtune=power8
+CPU_CFLAGS.power9 = -O2 -mcpu=power9 -mtune=power9
CPU_CFLAGS = $(CPU_CFLAGS.$(CPU))
#### ARCH dependant flags, may be overridden by CPU flags
DEBUG_CFLAGS =
endif
-# AIX 5.2 and above
+# AIX 5.2
ifeq ($(TARGET),aix52)
set_target_defaults = $(call default_opts, \
USE_POLL USE_LIBCRYPT USE_OBSOLETE_LINKER)
DEBUG_CFLAGS =
endif
+# AIX 7.2 and above
+ifeq ($(TARGET),aix72-gcc)
+ set_target_defaults = $(call default_opts, \
+ USE_POLL USE_THREAD USE_LIBCRYPT USE_OBSOLETE_LINKER USE_GETADDRINFO)
+ TARGET_CFLAGS = -D_H_XMEM -D_H_VAR
+ TARGET_LDFLAGS = -latomic
+endif
+
# Cygwin
ifeq ($(TARGET),cygwin)
set_target_defaults = $(call default_opts, \
@echo "Please choose the target among the following supported list :"
@echo
@echo " linux-glibc, linux-glibc-legacy, solaris, freebsd, openbsd, netbsd,"
- @echo " cygwin, haiku, aix51, aix52, osx, generic, custom"
+ @echo " cygwin, haiku, aix51, aix52, aix72-gcc, 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"
else \
echo "TARGET not set, you may pass 'TARGET=xxx' to set one among :";\
echo " linux-glibc, linux-glibc-legacy, solaris, freebsd, netbsd, osx,"; \
- echo " openbsd, aix51, aix52, cygwin, haiku, generic, custom"; \
+ echo " openbsd, aix51, aix52, aix72-gcc, 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