SF.net SVN: gar:[22874] csw/mgar/pkg
janholzh at users.sourceforge.net
janholzh at users.sourceforge.net
Thu Jan 23 16:32:12 CET 2014
Revision: 22874
http://sourceforge.net/p/gar/code/22874
Author: janholzh
Date: 2014-01-23 15:32:11 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
Initial commit under clang instead of llvm since thats what people are probably looking for. Does seem to work on X86. Can't compile on sparc as our gcc explodes. It probably still needs some tweaks but can be tested
Added Paths:
-----------
csw/mgar/pkg/clang/
csw/mgar/pkg/clang/Makefile
csw/mgar/pkg/clang/branches/
csw/mgar/pkg/clang/tags/
csw/mgar/pkg/clang/trunk/
csw/mgar/pkg/clang/trunk/Makefile
csw/mgar/pkg/clang/trunk/checksums
csw/mgar/pkg/clang/trunk/files/
csw/mgar/pkg/clang/trunk/files/0001-use_a_tail_that_works.patch
csw/mgar/pkg/clang/trunk/files/0002-fix-endiness.patch
csw/mgar/pkg/clang/trunk/files/0003-fix_Solaris_opencsw_gcc.patch
csw/mgar/pkg/clang/trunk/files/map.clang
Added: csw/mgar/pkg/clang/Makefile
===================================================================
--- csw/mgar/pkg/clang/Makefile (rev 0)
+++ csw/mgar/pkg/clang/Makefile 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,2 @@
+%:
+ $(MAKE) -C trunk $*
Index: csw/mgar/pkg/clang/trunk
===================================================================
--- csw/mgar/pkg/clang/trunk 2014-01-23 13:27:36 UTC (rev 22873)
+++ csw/mgar/pkg/clang/trunk 2014-01-23 15:32:11 UTC (rev 22874)
Property changes on: csw/mgar/pkg/clang/trunk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+work
Added: csw/mgar/pkg/clang/trunk/Makefile
===================================================================
--- csw/mgar/pkg/clang/trunk/Makefile (rev 0)
+++ csw/mgar/pkg/clang/trunk/Makefile 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,69 @@
+# TODO (release-critical prefixed with !, non release-critical with *)
+# most stuff from here: https://github.com/joyent/pkgsrc/blob/trunk/lang/clang/Makefile
+#
+NAME = llvm
+VERSION = 3.4
+GARTYPE = v2
+
+DESCRIPTION = Clangis a compiler front end for the C, C++, Objective-C and Objective-C++ programming languages
+define BLURB
+ Clang is a compiler front end for the C, C++, Objective-C and Objective-C++ programming languages.It uses LLVM as its back end.
+endef
+
+MASTER_SITES = http://llvm.org/releases/$(VERSION)/
+DISTFILES = llvm-$(VERSION).src.tar.gz
+DISTFILES += clang-$(VERSION).src.tar.gz
+PATCHFILES += 0001-use_a_tail_that_works.patch
+PATCHFILES += 0002-fix-endiness.patch
+PATCHFILES += 0003-fix_Solaris_opencsw_gcc.patch
+
+PACKAGES = CSWclang
+CATALOGNAME_CSWclang = clang
+SPKG_DESC_CSWclang += $(DESCRIPTION)
+RUNTIME_DEP_PKGS_CSWclang += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_CSWclang += CSWlibstdc++6
+RUNTIME_DEP_PKGS_CSWclang += CSWlibxml2-2
+RUNTIME_DEP_PKGS_CSWclang += CSWlibz1
+# Kind of bad but it needs crtbegin.o and crtend.o which are in /opt/csw/lib/gcc/*/4.x.x/ with new gcc clang needs to be rebuild because of this.
+RUNTIME_DEP_PKGS_CSWclang += CSWgcc4core
+CHECKPKG_OVERRIDES_CSWclang += surplus-dependency|CSWgcc4core
+
+CHECKPKG_OVERRIDES_CSWclang += bad-rpath-entry
+CHECKPKG_OVERRIDES_CSWclang += shared-lib-pkgname-mismatch
+CHECKPKG_OVERRIDES_CSWclang += file-with-bad-content
+CHECKPKG_OVERRIDES_CSWclang += no-direct-binding
+CHECKPKG_OVERRIDES_CSWclang += soname-equals-filename|file=/opt/csw/lib/BugpointPasses.so
+CHECKPKG_OVERRIDES_CSWclang += soname-equals-filename|file=/opt/csw/lib/LLVMHello.so
+CHECKPKG_OVERRIDES_CSWclang += soname-equals-filename|file=/opt/csw/lib/libLTO.so
+CHECKPKG_OVERRIDES_CSWclang += soname-equals-filename|file=/opt/csw/lib/libclang.so
+
+
+NOGITPATCH = 1
+
+GARCOMPILER = GNU
+CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_ARGS += --disable-assertions
+CONFIGURE_ARGS += --disable-bindings # disable OCaml
+CONFIGURE_ARGS += --disable-timestamps
+CONFIGURE_ARGS += --enable-optimized
+CONFIGURE_ARGS += --with-extra-ld-options="-mimpure-text -lrt"
+CONFIGURE_ARGS += --with-gcc-toolchain="/opt/csw/gcc4/bin"
+CONFIGURE_ARGS += --with-c-include-dirs="/usr/include:/opt/csw/include"
+
+# Solaris 10 needs a special map file since we need newer libc
+# This sets the minumum Solaris 10 Version to Update 9
+#This is do to use of futimens the check is here: http://llvm.org/viewvc/llvm-project?view=revision&revision=185601 the check is there but it checks in the headers but default map file prevents use of it. Needs fix not sure what to set where so it's update 9 for now
+ LINKER_MAPS ?= -M "$(abspath $(WORKDIR)/map.clang)"
+DISTFILES += map.clang
+
+EXTRA_CFLAGS += -mimpure-text
+
+SKIPTEST = 1
+#TEST_TARGET = unittests
+
+include gar/category.mk
+
+post-extract:
+ mv $(WORKDIR)/clang-$(VERSION) $(WORKDIR)/llvm-$(VERSION)/tools/clang
+ echo "int sun_ld_needs_a_symbol=0;" >> $(WORKSRC)/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp
+ @$(MAKECOOKIE)
Property changes on: csw/mgar/pkg/clang/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: csw/mgar/pkg/clang/trunk/checksums
===================================================================
--- csw/mgar/pkg/clang/trunk/checksums (rev 0)
+++ csw/mgar/pkg/clang/trunk/checksums 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,2 @@
+b378f1e2c424e03289effc75268d3d2c clang-3.4.src.tar.gz
+46ed668a1ce38985120dbf6344cf6116 llvm-3.4.src.tar.gz
Added: csw/mgar/pkg/clang/trunk/files/0001-use_a_tail_that_works.patch
===================================================================
--- csw/mgar/pkg/clang/trunk/files/0001-use_a_tail_that_works.patch (rev 0)
+++ csw/mgar/pkg/clang/trunk/files/0001-use_a_tail_that_works.patch 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,23 @@
+From 66a87373e049ad52a919d8cc71c76a3b0c25ddb9 Mon Sep 17 00:00:00 2001
+From: Jan Holzhueter <jh at opencsw.org>
+Date: Mon, 22 Apr 2013 14:32:37 +0200
+Subject: [PATCH] use_a_tail_that_works
+
+---
+ unittests/ExecutionEngine/JIT/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unittests/ExecutionEngine/JIT/Makefile b/unittests/ExecutionEngine/JIT/Makefile
+index 9e0bb9e..dbe4022 100644
+--- a/unittests/ExecutionEngine/JIT/Makefile
++++ b/unittests/ExecutionEngine/JIT/Makefile
+@@ -45,5 +45,5 @@ LD.Flags += $(RDYNAMIC)
+ # Symbol exports are necessary (at least for now) when building with LTO.
+ $(LLVMUnitTestExe): $(NativeExportsFile)
+ $(PROJ_OBJ_DIR)/JITTests.exports: $(PROJ_SRC_DIR)/JITTests.def $(PROJ_OBJ_DIR)/.dir
+- tail -n +2 $< > $@
++ /usr/xpg4/bin/tail -n +2 $< > $@
+
+--
+1.8.1.4
+
Added: csw/mgar/pkg/clang/trunk/files/0002-fix-endiness.patch
===================================================================
--- csw/mgar/pkg/clang/trunk/files/0002-fix-endiness.patch (rev 0)
+++ csw/mgar/pkg/clang/trunk/files/0002-fix-endiness.patch 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,37 @@
+From 9ad289ac739368dd2eb7e5ec0aa6da8017fb5e27 Mon Sep 17 00:00:00 2001
+From: Jan Holzhueter <jh at opencsw.org>
+Date: Wed, 22 Jan 2014 11:33:43 +0100
+Subject: [PATCH] fix-endiness
+
+---
+ include/llvm/Support/Host.h | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
+index 28c4cc7..138c2c0 100644
+--- a/include/llvm/Support/Host.h
++++ b/include/llvm/Support/Host.h
+@@ -18,6 +18,20 @@
+
+ #if defined(__linux__) || defined(__GNU__)
+ #include <endian.h>
++#elif defined(__sun) & defined(__SVR4)
++# ifndef BYTE_ORDER
++# define LITTLE_ENDIAN 1234
++# define BIG_ENDIAN 4321
++# if defined(__sun) & defined(__SVR4)
++# include <sys/isa_defs.h>
++# ifdef _LITTLE_ENDIAN
++# define BYTE_ORDER LITTLE_ENDIAN
++# endif
++# ifdef _BIG_ENDIAN
++# define BYTE_ORDER BIG_ENDIAN
++# endif
++# endif /* sun */
++# endif /* BYTE_ORDER */
+ #else
+ #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
+ #include <machine/endian.h>
+--
+1.8.4.1
+
Added: csw/mgar/pkg/clang/trunk/files/0003-fix_Solaris_opencsw_gcc.patch
===================================================================
--- csw/mgar/pkg/clang/trunk/files/0003-fix_Solaris_opencsw_gcc.patch (rev 0)
+++ csw/mgar/pkg/clang/trunk/files/0003-fix_Solaris_opencsw_gcc.patch 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,191 @@
+From cff1b46375ed812e052023d0ca71c47b2d5c5ae8 Mon Sep 17 00:00:00 2001
+From: Jan Holzhueter <jh at opencsw.org>
+Date: Wed, 22 Jan 2014 12:37:53 +0100
+Subject: [PATCH] fix_Solaris_opencsw_gcc
+
+---
+ tools/clang/lib/Driver/Tools.cpp | 40 ++++++++++++++++++++--------------------
+ 1 file changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp
+index 29713ed..2f58fbc 100644
+--- a/tools/clang/lib/Driver/Tools.cpp
++++ b/tools/clang/lib/Driver/Tools.cpp
+@@ -4653,7 +4653,7 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ // asm_final spec is empty.
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5085,7 +5085,7 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ Args.AddAllArgs(CmdArgs, options::OPT_F);
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5176,7 +5176,7 @@ void solaris::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5187,18 +5187,18 @@ void solaris::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ const ArgList &Args,
+ const char *LinkingOutput) const {
+ // FIXME: Find a real GCC, don't hard-code versions here
+- std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/";
++ std::string GCCLibPath = "/opt/csw/lib/gcc/";
+ const llvm::Triple &T = getToolChain().getTriple();
+ std::string LibPath = "/usr/lib/";
+ llvm::Triple::ArchType Arch = T.getArch();
+ switch (Arch) {
+ case llvm::Triple::x86:
+ GCCLibPath +=
+- ("i386-" + T.getVendorName() + "-" + T.getOSName()).str() + "/4.5.2/";
++ ("i386-" + T.getVendorName() + "-" + T.getOSName()).str() + "/4.8.2/";
+ break;
+ case llvm::Triple::x86_64:
+ GCCLibPath += ("i386-" + T.getVendorName() + "-" + T.getOSName()).str();
+- GCCLibPath += "/4.5.2/amd64/";
++ GCCLibPath += "/4.8.2/amd64/";
+ LibPath += "amd64/";
+ break;
+ default:
+@@ -5282,7 +5282,7 @@ void solaris::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5394,7 +5394,7 @@ void auroraux::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5452,7 +5452,7 @@ void openbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5584,7 +5584,7 @@ void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5608,7 +5608,7 @@ void bitrig::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5724,7 +5724,7 @@ void bitrig::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -5799,7 +5799,7 @@ void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -6063,7 +6063,7 @@ void netbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ CmdArgs.push_back(II.getFilename());
+ }
+
+- const char *Exec = Args.MakeArgString((getToolChain().GetProgramPath("as")));
++ const char *Exec = Args.MakeArgString((getToolChain().GetProgramPath("gas")));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -6183,7 +6183,7 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
+
+ addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
+
+- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ const char *Exec = Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -6302,7 +6302,7 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+
+ // Handle the debug info splitting at object creation time if we're
+@@ -6654,7 +6654,7 @@ void minix::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -6708,7 +6708,7 @@ void minix::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ Args.MakeArgString(getToolChain().GetFilePath("crtend.o")));
+ }
+
+- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ const char *Exec = Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -6741,7 +6741,7 @@ void dragonfly::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+ }
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("as"));
++ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+@@ -6892,7 +6892,7 @@ void dragonfly::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString("/usr/ccs/bin/ld");
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }
+
+--
+1.8.4.1
+
Added: csw/mgar/pkg/clang/trunk/files/map.clang
===================================================================
--- csw/mgar/pkg/clang/trunk/files/map.clang (rev 0)
+++ csw/mgar/pkg/clang/trunk/files/map.clang 2014-01-23 15:32:11 UTC (rev 22874)
@@ -0,0 +1,3 @@
+libc.so - SUNW_1.22.6 SUNWprivate_1.1 $ADDVERS=SUNW_1.22.6;
+libresolv.so - SUNW_2.2 SUNWprivate_2.1 $ADDVERS=SUNW_2.2;
+libnsl.so - SUNW_1.9.1 SUNWprivate_1.5 $ADDVERS=SUNW_1.9.1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list