From beb02133ad1e28a703b56c3701fa8f01634a77e0 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Wed, 13 Jun 2012 17:47:53 +0000 Subject: Add experimental support for building with Open64 svn path=/trunk/tools/buildsystem/; revision=13963 --- makefiles/Makefile.open64 | 69 +++++++++++++++++++++++++++++++++++++++++++++++ makefiles/Makefile.tools | 3 +++ 2 files changed, 72 insertions(+) create mode 100644 makefiles/Makefile.open64 diff --git a/makefiles/Makefile.open64 b/makefiles/Makefile.open64 new file mode 100644 index 0000000..b58569c --- /dev/null +++ b/makefiles/Makefile.open64 @@ -0,0 +1,69 @@ +# Open64 specific toolchain setup +# We assume that we're using a standard GCC/binutils environment + +CCDEF := -D +CCOPT := -O3 -IPA +CCNOOPT := -O0 +CCDBG := -g +CCINC := -I +CCLIB := -L +CCAS := -xassembler-with-cpp +CCSHR := -fPIC + +CXXDEF := -D +CXXOPT := -O3 +CXXNOOPT := -O0 +CXXDBG := -g +CXXINC := -I +CXXLIB := -L +CXXSHR := -fPIC + +LDDBG := -g +# Reevaluation is required here +LDSHR = -ipa -shared -Wl,-soname,$(SONAME) + +LDFLAGS := $(LDFLAGS) -ipa + +ARFLG := cru + +# Definitions for various attributes +CFLAGS := $(CFLAGS) -D_ALIGNED="__attribute__((aligned))" + +# Extensions for coverage target +ifeq ($(MAKECMDGOALS),coverage) + COVCFLAGS ?= -fprofile-arcs -ftest-coverage + COVCXXFLAGS ?= -fprofile-arcs -ftest-coverage + COVLDFLAGS ?= -lgcov + + CFLAGS := $(CFLAGS) $(COVCFLAGS) + CXXFLAGS := $(CXXFLAGS) $(COVCXXFLAGS) + LDFLAGS := $(LDFLAGS) $(COVLDFLAGS) +endif + +# Extensions for profile target +ifeq ($(MAKECMDGOALS),profile) + PROFCFLAGS ?= -pg + PROFCXXFLAGS ?= -pg + PROFLDFLAGS ?= -pg + + CFLAGS := $(CFLAGS) $(PROFCFLAGS) + CXXFLAGS := $(CXXFLAGS) $(PROFCXXFLAGS) + LDFLAGS := $(LDFLAGS) $(PROFLDFLAGS) +endif + +############################################################################### +# Other settings +############################################################################### + +# Determine if the compiler supports simultaneous build & dep. +ccvsn := $(shell $(CC) -dumpversion) +# ccvsn = x.y.z +GCCVER := $(word 1,$(subst ., ,$(ccvsn))) +# GCCVER = x + +# If the major version (x, above) is not 2, then assume build & dep. +# This will break if using a version of GCC < 2, but that's unlikely. +ifneq ($(GCCVER),2) + CC_CAN_BUILD_AND_DEP ?= yes +endif + diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools index c6f9dd6..7a5cc63 100644 --- a/makefiles/Makefile.tools +++ b/makefiles/Makefile.tools @@ -405,6 +405,9 @@ else # (ie, Debian, Apple, etc) toolchain := clang endif + ifeq ($(word 1,$(ccvsn)),Open64) + toolchain := open64 + endif endif ifeq ($(toolchain),) -- cgit v1.2.1