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.
|
#### Updated HP2100 simulator from Dave Bryan.
|
||||||
|
|
||||||
|
### New Host Platform support - HP-UX and AIX
|
||||||
|
|
||||||
### New Functionality
|
### New Functionality
|
||||||
|
|
||||||
#### Remote Console Facility
|
#### Remote Console Facility
|
||||||
|
|
79
makefile
79
makefile
|
@ -7,6 +7,7 @@
|
||||||
# NetBSD
|
# NetBSD
|
||||||
# FreeBSD
|
# FreeBSD
|
||||||
# HP-UX
|
# HP-UX
|
||||||
|
# AIX
|
||||||
# Windows (MinGW & cygwin)
|
# Windows (MinGW & cygwin)
|
||||||
# Linux x86 targeting Android (using agcc script)
|
# Linux x86 targeting Android (using agcc script)
|
||||||
#
|
#
|
||||||
|
@ -91,8 +92,8 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq (HP-UX,$(OSTYPE))
|
ifeq (HP-UX,$(OSTYPE))
|
||||||
ifneq (,$(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))` | grep -i compiler))
|
COMPILER_NAME = $(strip $(shell what `which $(firstword $(GCC)) 2>&1` | grep -i compiler))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -178,25 +179,37 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
PCAPLIB = wpcap
|
PCAPLIB = wpcap
|
||||||
LIBEXT = a
|
LIBEXT = a
|
||||||
else
|
else
|
||||||
ifeq (,$(findstring NetBSD,$(OSTYPE)))
|
ifneq (,$(findstring AIX,$(OSTYPE)))
|
||||||
ifneq (no ldconfig,$(wordlist 1,2,$(shell which ldconfig)))
|
OS_LDFLAGS += -lm -lrt
|
||||||
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
ifeq (incopt,$(shell if $(TEST) -d /opt/freeware/include; then echo incopt; fi))
|
||||||
|
INCPATH += /opt/freeware/include
|
||||||
|
OS_CCDEFS += -I/opt/freeware/include
|
||||||
endif
|
endif
|
||||||
ifneq (,$(LDSEARCH))
|
ifeq (libopt,$(shell if $(TEST) -d /opt/freeware/lib; then echo libopt; fi))
|
||||||
LIBPATH := $(LDSEARCH)
|
LIBPATH += /opt/freeware/lib
|
||||||
else
|
OS_LDFLAGS += -L/opt/freeware/lib
|
||||||
ifeq (,$(strip $(LPATH)))
|
endif
|
||||||
$(info *** Warning ***)
|
else
|
||||||
$(info *** Warning *** The library search path on your $(OSTYPE) platform can't be)
|
ifeq (,$(findstring NetBSD,$(OSTYPE)))
|
||||||
$(info *** Warning *** determined. This should be resolved before you can expect)
|
ifneq (no ldconfig,$(findstring no ldconfig,$(shell which ldconfig 2>&1)))
|
||||||
$(info *** Warning *** to have fully working simulators.)
|
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
||||||
$(info *** Warning ***)
|
endif
|
||||||
$(info *** Warning *** You can specify your library paths via the LPATH environment)
|
ifneq (,$(LDSEARCH))
|
||||||
$(info *** Warning *** variable.)
|
LIBPATH := $(LDSEARCH)
|
||||||
$(info *** Warning ***)
|
|
||||||
else
|
else
|
||||||
LIBPATH = $(subst :, ,$(LPATH))
|
ifeq (,$(strip $(LPATH)))
|
||||||
OS_LDFLAGS += $(patsubst %,-L%,$(LIBPATH))
|
$(info *** Warning ***)
|
||||||
|
$(info *** Warning *** The library search path on your $(OSTYPE) platform can't be)
|
||||||
|
$(info *** Warning *** determined. This should be resolved before you can expect)
|
||||||
|
$(info *** Warning *** to have fully working simulators.)
|
||||||
|
$(info *** Warning ***)
|
||||||
|
$(info *** Warning *** You can specify your library paths via the LPATH environment)
|
||||||
|
$(info *** Warning *** variable.)
|
||||||
|
$(info *** Warning ***)
|
||||||
|
else
|
||||||
|
LIBPATH = $(subst :, ,$(LPATH))
|
||||||
|
OS_LDFLAGS += $(patsubst %,-L%,$(LIBPATH))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -204,7 +217,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
LIBPATH += /usr/pkg/lib
|
LIBPATH += /usr/pkg/lib
|
||||||
OS_LDFLAGS += -L/usr/pkg/lib -R/usr/pkg/lib
|
OS_LDFLAGS += -L/usr/pkg/lib -R/usr/pkg/lib
|
||||||
endif
|
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
|
LIBEXT = so
|
||||||
else
|
else
|
||||||
ifeq (HP-UX,$(OSTYPE))
|
ifeq (HP-UX,$(OSTYPE))
|
||||||
|
@ -260,7 +277,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
OS_LDFLAGS += -ldl
|
OS_LDFLAGS += -ldl
|
||||||
$(info using libdl: $(call find_lib,dl) $(call find_include,dlfcn))
|
$(info using libdl: $(call find_lib,dl) $(call find_include,dlfcn))
|
||||||
else
|
else
|
||||||
ifeq (BSD,$(findstring BSD,$(OSTYPE)))
|
ifneq (,$(findstring BSD,$(OSTYPE))$(findstring AIX,$(OSTYPE)))
|
||||||
OS_CCDEFS += -DHAVE_DLOPEN=so
|
OS_CCDEFS += -DHAVE_DLOPEN=so
|
||||||
$(info using libdl: $(call find_include,dlfcn))
|
$(info using libdl: $(call find_include,dlfcn))
|
||||||
else
|
else
|
||||||
|
@ -305,9 +322,21 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
NETWORK_FEATURES = - dynamic networking support using $(OSNAME) provided libpcap components
|
NETWORK_FEATURES = - dynamic networking support using $(OSNAME) provided libpcap components
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
NETWORK_CCDEFS = -DUSE_SHARED -I$(dir $(call find_include,pcap))
|
ifneq (,$(call find_lib,$(PCAPLIB)))
|
||||||
NETWORK_FEATURES = - dynamic networking support using $(OSNAME) provided libpcap components
|
NETWORK_CCDEFS = -DUSE_SHARED -I$(dir $(call find_include,pcap))
|
||||||
$(info using libpcap: $(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
|
endif
|
||||||
else
|
else
|
||||||
# Look for package built from tcpdump.org sources with default install target (or cygwin winpcap)
|
# 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))
|
ifneq (,$(call find_include,libvdeplug))
|
||||||
# Provide support for vde networking
|
# Provide support for vde networking
|
||||||
NETWORK_CCDEFS += -DUSE_VDE_NETWORK
|
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))
|
$(info using libvdeplug: $(call find_lib,vdeplug) $(call find_include,libvdeplug))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -134,6 +134,9 @@
|
||||||
#ifdef RS
|
#ifdef RS
|
||||||
#undef RS
|
#undef RS
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef PAGESIZE
|
||||||
|
#undef PAGESIZE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
|
@ -302,7 +305,7 @@ typedef uint32 t_addr;
|
||||||
|
|
||||||
#define PV_RZRO 0 /* right, zero fill */
|
#define PV_RZRO 0 /* right, zero fill */
|
||||||
#define PV_RSPC 1 /* right, space 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 */
|
#define PV_LEFT 3 /* left justify */
|
||||||
|
|
||||||
/* Default timing parameters */
|
/* Default timing parameters */
|
||||||
|
@ -740,7 +743,7 @@ extern int32 sim_asynch_latency;
|
||||||
extern int32 sim_asynch_inst_latency;
|
extern int32 sim_asynch_inst_latency;
|
||||||
|
|
||||||
/* Thread local storage */
|
/* 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
|
#define AIO_TLS __thread
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define AIO_TLS __declspec(thread)
|
#define AIO_TLS __declspec(thread)
|
||||||
|
|
|
@ -1928,7 +1928,7 @@ _set_errno_from_status (GetLastError ());
|
||||||
return SCPE_IOERR;
|
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/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
@ -224,7 +224,7 @@ FILE *sim_fopen (const char *file, const char *mode)
|
||||||
#if defined (VMS)
|
#if defined (VMS)
|
||||||
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
return fopen (file, mode, "ALQ=32", "DEQ=4096",
|
||||||
"MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm");
|
"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);
|
return fopen64 (file, mode);
|
||||||
#else
|
#else
|
||||||
return fopen (file, mode);
|
return fopen (file, mode);
|
||||||
|
@ -313,7 +313,7 @@ return (t_offset)fileaddr;
|
||||||
|
|
||||||
/* Linux */
|
/* Linux */
|
||||||
|
|
||||||
#if defined (__linux) || defined (__linux__) || defined (__hpux)
|
#if defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX)
|
||||||
#define S_SIM_IO_FSEEK_EXT_ 1
|
#define S_SIM_IO_FSEEK_EXT_ 1
|
||||||
int sim_fseeko (FILE *st, t_offset xpos, int origin)
|
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)
|
#define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)
|
||||||
|
|
||||||
int32 sim_finit (void);
|
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 (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||||
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||||
defined (_WIN32) || defined (__APPLE__) || \
|
defined (_WIN32) || defined (__APPLE__) || \
|
||||||
|
|
Loading…
Add table
Reference in a new issue