Wire up alpha in new build system

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
This commit is contained in:
Jiaxun Yang 2022-08-11 14:51:57 +01:00
parent 50c4eeb97d
commit a03ed065e1
3 changed files with 57 additions and 31 deletions

View File

@ -1,42 +1,24 @@
CPP = $(CC) -E
RANLIB = ranlib
ifeq ($(LIBSUBARCH), EV4)
LIBNAME = $(LIBPREFIX)_ev4.a
LIBNAME_P = $(LIBPREFIX)_ev4_p.a
endif
ifeq ($(LIBSUBARCH), EV5)
LIBNAME = $(LIBPREFIX)_ev5.a
LIBNAME_P = $(LIBPREFIX)_ev5_p.a
endif
ifeq ($(LIBSUBARCH), EV6)
LIBNAME = $(LIBPREFIX)_ev6.a
LIBNAME_P = $(LIBPREFIX)_ev6_p.a
endif
ifneq ($(COMPILER), NATIVE)
# GCC User
ifeq ($(LIBSUBARCH), EV4)
OPTION += -DEV4 -mcpu=ev4
ifeq ($(CORE), EV4)
CCOMMON_OPT += -mcpu=ev4
endif
ifeq ($(LIBSUBARCH), EV5)
OPTION += -DEV5 -mcpu=ev5
ifeq ($(CORE), EV5)
CCOMMON_OPT += -mcpu=ev5
endif
ifeq ($(LIBSUBARCH), EV6)
OPTION += -DEV6 -mcpu=ev6
ifeq ($(CORE), EV6)
CCOMMON_OPT += -mcpu=ev6
endif
else
# Compaq Compiler User
ifeq ($(LIBSUBARCH), EV4)
OPTION += -DEV4 -tune ev4 -arch ev4
ifeq ($(CORE), EV4)
CCOMMON_OPT += -tune ev4 -arch ev4
endif
ifeq ($(LIBSUBARCH), EV5)
OPTION += -DEV5 -tune ev5 -arch ev5
ifeq ($(CORE), EV5)
CCOMMON_OPT += -tune ev5 -arch ev5
endif
ifeq ($(LIBSUBARCH), EV6)
OPTION += -DEV6 -tune ev6 -arch ev6
ifeq ($(CORE), EV6)
CCOMMON_OPT += -tune ev6 -arch ev6
endif
endif

View File

@ -59,6 +59,11 @@ void get_subarchitecture(void){
printf("ev%d", implver() + 4);
}
void get_corename(void){
printf("EV%d", implver() + 4);
}
void get_subdirname(void){
printf("alpha");
}

View File

@ -146,6 +146,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* #define FORCE_SPARCV7 */
/* #define FORCE_ZARCH_GENERIC */
/* #define FORCE_Z13 */
/* #define FORCE_EV4 */
/* #define FORCE_EV5 */
/* #define FORCE_EV6 */
/* #define FORCE_GENERIC */
#ifdef FORCE_P2
@ -1601,6 +1604,42 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CORENAME "Z14"
#endif
#ifdef FORCE_EV4
#define FORCE
#define ARCHITECTURE "ALPHA"
#define SUBARCHITECTURE "ev4"
#define ARCHCONFIG "-DEV4 " \
"-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
"-DL2_SIZE=2097152 -DL2_LINESIZE=32 " \
"-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=8192 "
#define LIBNAME "ev4"
#define CORENAME "EV4"
#endif
#ifdef FORCE_EV5
#define FORCE
#define ARCHITECTURE "ALPHA"
#define SUBARCHITECTURE "ev5"
#define ARCHCONFIG "-DEV5 " \
"-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
"-DL2_SIZE=2097152 -DL2_LINESIZE=64 " \
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=8192 "
#define LIBNAME "ev5"
#define CORENAME "EV5"
#endif
#ifdef FORCE_EV6
#define FORCE
#define ARCHITECTURE "ALPHA"
#define SUBARCHITECTURE "ev6"
#define ARCHCONFIG "-DEV6 " \
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
"-DL2_SIZE=4194304 -DL2_LINESIZE=64 " \
"-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=8192 "
#define LIBNAME "ev6"
#define CORENAME "EV6"
#endif
#ifdef FORCE_C910V
#define FORCE
#define ARCHITECTURE "RISCV64"
@ -1777,7 +1816,7 @@ int main(int argc, char *argv[]){
#ifdef FORCE
printf("CORE=%s\n", CORENAME);
#else
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__) || defined(__riscv)
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__) || defined(__riscv) || defined(__alpha__)
printf("CORE=%s\n", get_corename());
#endif
#endif