diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2012-06-13 17:47:53 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2012-06-13 17:47:53 +0000 |
commit | beb02133ad1e28a703b56c3701fa8f01634a77e0 (patch) | |
tree | cd76a346b7215723dea643a55c5a4258892f292a | |
parent | 8bc504dc7777cf2fa4899ec7c1fb75e29eeaf81f (diff) | |
download | buildsystem-beb02133ad1e28a703b56c3701fa8f01634a77e0.tar.gz buildsystem-beb02133ad1e28a703b56c3701fa8f01634a77e0.tar.bz2 |
Add experimental support for building with Open64
svn path=/trunk/tools/buildsystem/; revision=13963
-rw-r--r-- | makefiles/Makefile.open64 | 69 | ||||
-rw-r--r-- | makefiles/Makefile.tools | 3 |
2 files changed, 72 insertions, 0 deletions
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),) |