AIX Platform support
This commit is contained in:
parent
6401a371ba
commit
2bfaf46781
6 changed files with 65 additions and 31 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
#### Updated HP2100 simulator from Dave Bryan.
|
||||
|
||||
### New Host Platform support - HP-UX and AIX
|
||||
|
||||
### New Functionality
|
||||
|
||||
#### Remote Console Facility
|
||||
|
|
41
makefile
41
makefile
|
@ -7,6 +7,7 @@
|
|||
# NetBSD
|
||||
# FreeBSD
|
||||
# HP-UX
|
||||
# AIX
|
||||
# Windows (MinGW & cygwin)
|
||||
# Linux x86 targeting Android (using agcc script)
|
||||
#
|
||||
|
@ -91,8 +92,8 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
endif
|
||||
ifeq (HP-UX,$(OSTYPE))
|
||||
ifneq (,$(shell what `which $(firstword $(GCC))` | grep -i compiler))
|
||||
COMPILER_NAME = $(strip $(shell what `which $(firstword $(GCC))` | grep -i compiler))
|
||||
ifneq (,$(shell what `which $(firstword $(GCC)) 2>&1`| grep -i compiler))
|
||||
COMPILER_NAME = $(strip $(shell what `which $(firstword $(GCC)) 2>&1` | grep -i compiler))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -177,9 +178,20 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
LIBPATH += ../windows-build/winpcap/WpdPack/lib
|
||||
PCAPLIB = wpcap
|
||||
LIBEXT = a
|
||||
else
|
||||
ifneq (,$(findstring AIX,$(OSTYPE)))
|
||||
OS_LDFLAGS += -lm -lrt
|
||||
ifeq (incopt,$(shell if $(TEST) -d /opt/freeware/include; then echo incopt; fi))
|
||||
INCPATH += /opt/freeware/include
|
||||
OS_CCDEFS += -I/opt/freeware/include
|
||||
endif
|
||||
ifeq (libopt,$(shell if $(TEST) -d /opt/freeware/lib; then echo libopt; fi))
|
||||
LIBPATH += /opt/freeware/lib
|
||||
OS_LDFLAGS += -L/opt/freeware/lib
|
||||
endif
|
||||
else
|
||||
ifeq (,$(findstring NetBSD,$(OSTYPE)))
|
||||
ifneq (no ldconfig,$(wordlist 1,2,$(shell which ldconfig)))
|
||||
ifneq (no ldconfig,$(findstring no ldconfig,$(shell which ldconfig 2>&1)))
|
||||
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
||||
endif
|
||||
ifneq (,$(LDSEARCH))
|
||||
|
@ -200,11 +212,16 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq (usrpkglib,$(shell if $(TEST) -d /usr/pkg/lib; then echo usrpkglib; fi))
|
||||
LIBPATH += /usr/pkg/lib
|
||||
OS_LDFLAGS += -L/usr/pkg/lib -R/usr/pkg/lib
|
||||
endif
|
||||
ifneq (,$(findstring NetBSD,$(OSTYPE))$(findstring FreeBSD,$(OSTYPE)))
|
||||
ifeq (/usr/local/lib,$(findstring /usr/local/lib,$(LIBPATH)))
|
||||
INCPATH += /usr/local/include
|
||||
OS_CCDEFS += -I/usr/local/include
|
||||
endif
|
||||
ifneq (,$(findstring NetBSD,$(OSTYPE))$(findstring FreeBSD,$(OSTYPE))$(findstring AIX,$(OSTYPE)))
|
||||
LIBEXT = so
|
||||
else
|
||||
ifeq (HP-UX,$(OSTYPE))
|
||||
|
@ -260,7 +277,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
OS_LDFLAGS += -ldl
|
||||
$(info using libdl: $(call find_lib,dl) $(call find_include,dlfcn))
|
||||
else
|
||||
ifeq (BSD,$(findstring BSD,$(OSTYPE)))
|
||||
ifneq (,$(findstring BSD,$(OSTYPE))$(findstring AIX,$(OSTYPE)))
|
||||
OS_CCDEFS += -DHAVE_DLOPEN=so
|
||||
$(info using libdl: $(call find_include,dlfcn))
|
||||
else
|
||||
|
@ -305,9 +322,21 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
NETWORK_FEATURES = - dynamic networking support using $(OSNAME) provided libpcap components
|
||||
endif
|
||||
else
|
||||
ifneq (,$(call find_lib,$(PCAPLIB)))
|
||||
NETWORK_CCDEFS = -DUSE_SHARED -I$(dir $(call find_include,pcap))
|
||||
NETWORK_FEATURES = - dynamic networking support using $(OSNAME) provided libpcap components
|
||||
$(info using libpcap: $(call find_include,pcap))
|
||||
else
|
||||
LIBEXTSAVE := $(LIBEXT)
|
||||
LIBEXT = a
|
||||
ifneq (,$(call find_lib,$(PCAPLIB)))
|
||||
NETWORK_CCDEFS = -DUSE_NETWORK -I$(dir $(call find_include,pcap))
|
||||
NETWORK_LDFLAGS = -L$(dir $(call find_lib,$(PCAPLIB))) -Wl,-R,$(dir $(call find_lib,$(PCAPLIB))) -l$(PCAPLIB)
|
||||
NETWORK_FEATURES = - static networking support using $(OSNAME) provided libpcap components
|
||||
$(info using libpcap: $(call find_lib,$(PCAPLIB)) $(call find_include,pcap))
|
||||
endif
|
||||
LIBEXT = $(LIBEXTSAVE)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
# Look for package built from tcpdump.org sources with default install target (or cygwin winpcap)
|
||||
|
@ -358,7 +387,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
ifneq (,$(call find_include,libvdeplug))
|
||||
# Provide support for vde networking
|
||||
NETWORK_CCDEFS += -DUSE_VDE_NETWORK
|
||||
NETWORK_LDFLAGS += -lvdeplug
|
||||
NETWORK_LDFLAGS += -lvdeplug -R$(dir $(call find_lib,vdeplug)) -L$(dir $(call find_lib,vdeplug))
|
||||
$(info using libvdeplug: $(call find_lib,vdeplug) $(call find_include,libvdeplug))
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -134,6 +134,9 @@
|
|||
#ifdef RS
|
||||
#undef RS
|
||||
#endif
|
||||
#ifdef PAGESIZE
|
||||
#undef PAGESIZE
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
|
@ -302,7 +305,7 @@ typedef uint32 t_addr;
|
|||
|
||||
#define PV_RZRO 0 /* right, zero fill */
|
||||
#define PV_RSPC 1 /* right, space fill */
|
||||
#define PV_RCOMMA 2 /* right, space fill. Comma separte every 3 */
|
||||
#define PV_RCOMMA 2 /* right, space fill. Comma separate every 3 */
|
||||
#define PV_LEFT 3 /* left justify */
|
||||
|
||||
/* Default timing parameters */
|
||||
|
@ -740,7 +743,7 @@ extern int32 sim_asynch_latency;
|
|||
extern int32 sim_asynch_inst_latency;
|
||||
|
||||
/* Thread local storage */
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__hpux) && !defined(__OpenBSD__)
|
||||
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__hpux) && !defined(__OpenBSD__) && !defined(_AIX)
|
||||
#define AIO_TLS __thread
|
||||
#elif defined(_MSC_VER)
|
||||
#define AIO_TLS __declspec(thread)
|
||||
|
|
|
@ -1928,7 +1928,7 @@ _set_errno_from_status (GetLastError ());
|
|||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
#elif defined (__linux) || defined (__linux__) || defined (__sun) || defined (__sun__) || defined (__hpux)
|
||||
#elif defined (__linux) || defined (__linux__) || defined (__sun) || defined (__sun__) || defined (__hpux) || defined (_AIX)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -224,7 +224,7 @@ FILE *sim_fopen (const char *file, const char *mode)
|
|||
#if defined (VMS)
|
||||
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
||||
"MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm");
|
||||
#elif (defined (__linux) || defined (__linux__) || defined (__hpux)) && !defined (DONT_DO_LARGEFILE)
|
||||
#elif (defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX)) && !defined (DONT_DO_LARGEFILE)
|
||||
return fopen64 (file, mode);
|
||||
#else
|
||||
return fopen (file, mode);
|
||||
|
@ -313,7 +313,7 @@ return (t_offset)fileaddr;
|
|||
|
||||
/* Linux */
|
||||
|
||||
#if defined (__linux) || defined (__linux__) || defined (__hpux)
|
||||
#if defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX)
|
||||
#define S_SIM_IO_FSEEK_EXT_ 1
|
||||
int sim_fseeko (FILE *st, t_offset xpos, int origin)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)
|
||||
|
||||
int32 sim_finit (void);
|
||||
#if (defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||
#if (defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX) || \
|
||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||
defined (_WIN32) || defined (__APPLE__) || \
|
||||
|
|
Loading…
Add table
Reference in a new issue