Added support for building on Solaris with the Sun C compiler
This commit is contained in:
parent
97bbd34828
commit
0605b6dff4
7 changed files with 17 additions and 9 deletions
|
@ -3069,7 +3069,6 @@ for ( ;; ) {
|
||||||
break;
|
break;
|
||||||
} /* end case op */
|
} /* end case op */
|
||||||
} /* end for */
|
} /* end for */
|
||||||
ABORT (STOP_UNKNOWN);
|
|
||||||
} /* end sim_instr */
|
} /* end sim_instr */
|
||||||
|
|
||||||
/* Prefetch buffer routine
|
/* Prefetch buffer routine
|
||||||
|
|
12
makefile
12
makefile
|
@ -2,7 +2,7 @@
|
||||||
# This GNU make makefile has been tested on:
|
# This GNU make makefile has been tested on:
|
||||||
# Linux (x86 & Sparc & PPC)
|
# Linux (x86 & Sparc & PPC)
|
||||||
# OS X
|
# OS X
|
||||||
# Solaris (x86 & Sparc)
|
# Solaris (x86 & Sparc) (gcc and Sun C)
|
||||||
# OpenBSD
|
# OpenBSD
|
||||||
# NetBSD
|
# NetBSD
|
||||||
# FreeBSD
|
# FreeBSD
|
||||||
|
@ -74,6 +74,14 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
ifeq (,$(shell $(GCC) -v /dev/null 2>&1 | grep 'clang'))
|
ifeq (,$(shell $(GCC) -v /dev/null 2>&1 | grep 'clang'))
|
||||||
GCC_VERSION = $(shell $(GCC) -v /dev/null 2>&1 | grep 'gcc version' | awk '{ print $$3 }')
|
GCC_VERSION = $(shell $(GCC) -v /dev/null 2>&1 | grep 'gcc version' | awk '{ print $$3 }')
|
||||||
COMPILER_NAME = GCC Version: $(GCC_VERSION)
|
COMPILER_NAME = GCC Version: $(GCC_VERSION)
|
||||||
|
ifeq (,$(GCC_VERSION))
|
||||||
|
ifeq (SunOS,$(OSTYPE))
|
||||||
|
ifneq (,$(shell $(GCC) -V | grep 'Sun C'))
|
||||||
|
SUNC_VERSION = $(shell $(GCC) -V | grep 'Sun C' | awk '{ print $$4 }')
|
||||||
|
COMPILER_NAME = Sun C $(SUNC_VERSION)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
ifeq (Apple,$(shell $(GCC) -v /dev/null 2>&1 | grep 'Apple' | awk '{ print $$1 }'))
|
ifeq (Apple,$(shell $(GCC) -v /dev/null 2>&1 | grep 'Apple' | awk '{ print $$1 }'))
|
||||||
COMPILER_NAME = $(shell $(GCC) -v /dev/null 2>&1 | grep 'Apple' | awk '{ print $$1 " " $$2 " " $$3 " " $$4 }')
|
COMPILER_NAME = $(shell $(GCC) -v /dev/null 2>&1 | grep 'Apple' | awk '{ print $$1 " " $$2 " " $$3 " " $$4 }')
|
||||||
|
@ -469,8 +477,10 @@ endif
|
||||||
ifeq (HP-UX,$(OSTYPE))
|
ifeq (HP-UX,$(OSTYPE))
|
||||||
CC_STD = -std=gnu99
|
CC_STD = -std=gnu99
|
||||||
else
|
else
|
||||||
|
ifeq (,$(SUNC_VERSION))
|
||||||
CC_STD = -std=c99
|
CC_STD = -std=c99
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
CC_OUTSPEC = -o $@
|
CC_OUTSPEC = -o $@
|
||||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) $(CFLAGS_GIT) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) $(CFLAGS_GIT) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||||
LDFLAGS = $(OS_LDFLAGS) $(NETWORK_LDFLAGS) $(LDFLAGS_O)
|
LDFLAGS = $(OS_LDFLAGS) $(NETWORK_LDFLAGS) $(LDFLAGS_O)
|
||||||
|
|
|
@ -1871,7 +1871,7 @@ _set_errno_from_status (GetLastError ());
|
||||||
return SCPE_IOERR;
|
return SCPE_IOERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined (__linux) || defined (__linux__) || defined (__sun__) || defined (__hpux)
|
#elif defined (__linux) || defined (__linux__) || defined (__sun) || defined (__sun__) || defined (__hpux)
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
#define DONT_USE_READER_THREAD
|
#define DONT_USE_READER_THREAD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (((defined(__sun__) && defined(__i386__)) || defined(__linux)) && !defined(DONT_USE_READER_THREAD))
|
#if ((((defined(__sun) || defined(__sun__)) && defined(__i386__)) || defined(__linux)) && !defined(DONT_USE_READER_THREAD))
|
||||||
#define USE_READER_THREAD 1
|
#define USE_READER_THREAD 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,8 @@ return fopen (file, mode);
|
||||||
|
|
||||||
/* 64b VMS */
|
/* 64b VMS */
|
||||||
|
|
||||||
#if ((defined (__ALPHA) || defined (__ia64)) && defined (VMS) && (__DECC_VER >= 60590001)) || (defined(__sun__) && defined(_LARGEFILE_SOURCE))
|
#if ((defined (__ALPHA) || defined (__ia64)) && defined (VMS) && (__DECC_VER >= 60590001)) || \
|
||||||
|
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE))
|
||||||
#define S_SIM_IO_FSEEK_EXT_ 1
|
#define S_SIM_IO_FSEEK_EXT_ 1
|
||||||
int sim_fseeko (FILE *st, t_offset offset, int whence)
|
int sim_fseeko (FILE *st, t_offset offset, int whence)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
int32 sim_finit (void);
|
int32 sim_finit (void);
|
||||||
#if defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
#if defined (__linux) || defined (__linux__) || defined (__hpux) || \
|
||||||
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
(defined (VMS) && (defined (__ALPHA) || defined (__ia64)) && (__DECC_VER >= 60590001)) || \
|
||||||
(defined(__sun__) && defined(_LARGEFILE_SOURCE)) || \
|
((defined(__sun) || defined(__sun__)) && defined(_LARGEFILE_SOURCE)) || \
|
||||||
defined (_WIN32) || defined (__APPLE__) || defined (__FreeBSD__)
|
defined (_WIN32) || defined (__APPLE__) || defined (__FreeBSD__)
|
||||||
typedef t_int64 t_offset;
|
typedef t_int64 t_offset;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -541,8 +541,6 @@ fprintf (st, " -E Must Exist (if not specified an attempt to create
|
||||||
fprintf (st, " virtual tape will be attempted).\n");
|
fprintf (st, " virtual tape will be attempted).\n");
|
||||||
fprintf (st, " -F Open the indicated tape container in a specific format (default\n");
|
fprintf (st, " -F Open the indicated tape container in a specific format (default\n");
|
||||||
fprintf (st, " is SIMH, alternatives are E11, TPC and P7B)\n");
|
fprintf (st, " is SIMH, alternatives are E11, TPC and P7B)\n");
|
||||||
return SCPE_OK;
|
|
||||||
|
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue