summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe0/img_defs.mk
diff options
context:
space:
mode:
authorWilliam Bryan <wilbryan@us.ibm.com>2016-07-26 15:02:15 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2016-07-29 15:05:27 -0400
commit9ad0d6f666fcd2392a5d6d3634df82264a5729eb (patch)
tree97a99d6aa273436c55a30ce5db064f59b141b0c8 /src/occ_gpe0/img_defs.mk
parenta545aa59ce8788c4bfe6fd9bb2f64413bff47189 (diff)
downloadtalos-occ-9ad0d6f666fcd2392a5d6d3634df82264a5729eb.tar.gz
talos-occ-9ad0d6f666fcd2392a5d6d3634df82264a5729eb.zip
Delete unused files, update PK, and use new compilers
Change-Id: I9e4951a2cebd204d1ea752c63e3f2b532ad3a2db Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27465 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Wael El-Essawy <welessa@us.ibm.com>
Diffstat (limited to 'src/occ_gpe0/img_defs.mk')
-rw-r--r--src/occ_gpe0/img_defs.mk88
1 files changed, 54 insertions, 34 deletions
diff --git a/src/occ_gpe0/img_defs.mk b/src/occ_gpe0/img_defs.mk
index f13815a..ba9ad98 100644
--- a/src/occ_gpe0/img_defs.mk
+++ b/src/occ_gpe0/img_defs.mk
@@ -86,6 +86,10 @@ endif
export IMG_OBJDIR = $(BASE_OBJDIR)/$(IMAGE_NAME)
+ifndef PPETOOLS_OBJDIR
+export PPETOOLS_OBJDIR = $(abspath ../../obj/ppetools)
+endif
+
ifndef PK_SRCDIR
export PK_SRCDIR = $(abspath ../ppe/pk)
endif
@@ -102,8 +106,26 @@ ifndef OCCLIB_SRCDIR
export OCCLIB_SRCDIR = $(abspath ../lib/occlib)
endif
+ifndef CTEPATH
+$(warning The CTEPATH variable is not defined; Defaulting to /afs/awd)
+export CTEPATH = /afs/awd/projects/cte
+endif
+
+ifdef P2P_ENABLE
+# TODO
+else
+PPE_TOOL_PATH = $(CTEPATH)/tools/ppetools/prod
+
ifndef GCC-TOOL-PREFIX
-GCC-TOOL-PREFIX = $(CTEPATH)/tools/ppcgcc/prod/bin/powerpc-linux-
+GCC-TOOL-PREFIX = $(PPE_TOOL_PATH)/bin/powerpc-eabi-
+endif
+
+# libs needed by compiler
+LD_LIBRARY_PATH += :$(PPE_TOOL_PATH)/lib:
+export LD_LIBRARY_PATH
+
+# libs needed by compiled code
+LIB_DIRS += -L$(PPE_TOOL_PATH)/libgcc
endif
ifndef BINUTILS-TOOL-PREFIX
@@ -111,7 +133,7 @@ BINUTILS-TOOL-PREFIX = $(CTEPATH)/tools/ppetools/prod/powerpc-eabi/bin/
endif
ifndef P2P_SRCDIR
-export P2P_SRCDIR = $(abspath ../ppe/tools/PowerPCtoPPE)
+export P2P_SRCDIR $(abspath ../ppe/tools/PowerPCtoPPE)
endif
ifndef PPETRACEPP_DIR
@@ -130,27 +152,23 @@ OBJDIR = $(IMG_OBJDIR)$(SUB_OBJDIR)
CC_ASM = $(GCC-TOOL-PREFIX)gcc
-TCC = $(PPETRACEPP_DIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc
+TCC = $(PPETOOLS_OBJDIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc
CC = $(GCC-TOOL-PREFIX)gcc
AS = $(BINUTILS-TOOL-PREFIX)as
AR = $(BINUTILS-TOOL-PREFIX)ar
LD = $(BINUTILS-TOOL-PREFIX)ld
OBJDUMP = $(BINUTILS-TOOL-PREFIX)objdump
OBJCOPY = $(BINUTILS-TOOL-PREFIX)objcopy
-TCPP = $(PPETRACEPP_DIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc
+TCPP = $(PPETOOLS_OBJDIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc
THASH = $(PPETRACEPP_DIR)/tracehash.pl
CPP = $(GCC-TOOL-PREFIX)gcc
+TCXX = $(PPETRACEPP_DIR)/ppetracepp $(GCC-TOOL-PREFIX)g++
+CXX = $(GCC-TOOL-PREFIX)g++
ifdef P2P_ENABLE
PCP = $(P2P_SRCDIR)/ppc-ppe-pcp.py
endif
-
-ifndef CTEPATH
-$(warning The CTEPATH variable is not defined; Defaulting to /afs/awd)
-export CTEPATH = /afs/awd/projects/cte
-endif
-
ifeq "$(PK_TIMER_SUPPORT)" ""
PK_TIMER_SUPPORT = 1
endif
@@ -171,13 +189,16 @@ endif
ifndef GCC-O-LEVEL
-#GCC-O-LEVEL = -Os
+ifdef P2P_ENABLE
GCC-O-LEVEL = -O -g
+else
+GCC-O-LEVEL = -Os
+endif
endif
GCC-DEFS += -DIMAGE_NAME=$(IMAGE_NAME)
-GCC-DEFS += -DPK_TIMER_SUPPORT=$(PK_TIMER_SUPPORT)
-GCC-DEFS += -DPK_THREAD_SUPPORT=$(PK_THREAD_SUPPORT)
+GCC-DEFS += -DPK_TIMER_SUPPORT=$(PK_TIMER_SUPPORT)
+GCC-DEFS += -DPK_THREAD_SUPPORT=$(PK_THREAD_SUPPORT)
GCC-DEFS += -DPK_TRACE_SUPPORT=$(PK_TRACE_SUPPORT)
GCC-DEFS += -DPK_TRACE_HASH_PREFIX=$(PK_TRACE_HASH_PREFIX)
GCC-DEFS += -DUSE_PK_APP_CFG_H=1
@@ -192,6 +213,7 @@ INCLUDES += $(IMG_INCLUDES) $(GLOBAL_INCLUDES) \
-I$(PK_SRCDIR)/../../include/registers -I$(OCCLIB_SRCDIR) -I$(COMMONLIB_SRCDIR) \
-I$(OCC_COMMON_TYPES_DIR)
+ifdef P2P_ENABLE
PIPE-CFLAGS = -pipe -Wa,-m405
GCC-CFLAGS += -Wall -fsigned-char -msoft-float \
@@ -206,8 +228,26 @@ GCC-CFLAGS += -Wall -fsigned-char -msoft-float \
-ffixed-cr1 -ffixed-cr2 -ffixed-cr3 -ffixed-cr4 \
-ffixed-cr5 -ffixed-cr6 -ffixed-cr7 -Werror
+else
+PIPE-CFLAGS = -pipe
+
+GCC-CFLAGS += -g -gpubnames -gdwarf-3
+GCC-CFLAGS += -Wall -Werror
+GCC-CFLAGS += -fsigned-char
+GCC-CFLAGS += -ffunction-sections
+GCC-CFLAGS += -fdata-sections
+GCC-CFLAGS += -msoft-float
+GCC-CFLAGS += -mcpu=ppe42
+GCC-CFLAGS += -meabi
+GCC-CFLAGS += -ffreestanding
+GCC-CFLAGS += -fno-common
+GCC-CFLAGS += -fno-inline-functions-called-once
+endif
+
CFLAGS = -c $(GCC-CFLAGS) $(PIPE-CFLAGS) $(GCC-O-LEVEL) $(INCLUDES)
+CXXFLAGS = -nostdinc++ -fno-rtti -fno-exceptions $(CFLAGS)
+
CPPFLAGS = -E
ASFLAGS = -mppe42
@@ -215,7 +255,7 @@ ASFLAGS = -mppe42
ifdef P2P_ENABLE
#use this to disable sda optimizations
#PCP-FLAG =
-
+else
#use this to enable sda optimizations
PCP-FLAG = -e
endif
@@ -249,23 +289,3 @@ $(OBJDIR)/%.o: $(OBJDIR)/%.es
$(AS) $(ASFLAGS) -o $@ $<
endif
-
-# From the GNU 'Make' manual - these scripts uses the preprocessor to
-# create dependency files (*.d), then mungs them slightly to make them
-# work as Make targets. The *.d files are include-ed in the
-# subdirectory Makefiles.
-
-#$(OBJDIR)/%.d: %.c
-# @set -e; rm -f $@; \
-# echo -n "$(OBJDIR)/" > $@.$$$$; \
-# $(CC_ASM) -MM $(INCLUDES) $(CPPFLAGS) $(DEFS) $< >> $@.$$$$; \
-# sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-# rm -f $@.$$$$
-
-#$(OBJDIR)/%.d: %.S
-# @set -e; rm -f $@; \
-# echo -n "$(OBJDIR)/" > $@.$$$$; \
-# $(CC_ASM) -MM $(INCLUDES) $(CPPFLAGS) $(DEFS) $< >> $@.$$$$; \
-# sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-# rm -f $@.$$$$
-
OpenPOWER on IntegriCloud