Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
15 build/llvm/build.sh
@@ -32,9 +32,9 @@ VER=3.2 # App version
VERHUMAN=$VER # Human-readable version
BUILDDIR="$PROG-$VER.src"
#PVER= # Branch (set in config.sh, override here if needed)
-PKG=zero/lang/llvm # Package name (e.g. library/foo)
-SUMMARY="llvm" # One-liner, must be filled in
-DESC="llvm" # Longer description, must be filled in
+PKG="omni/lang/llvm" # Package name (e.g. library/foo)
+SUMMARY="llvm" # One-liner, must be filled in
+DESC="llvm" # Longer description, must be filled in
export REQUIRES_RTTI=1
CONFIGURE_OPTS="--enable-optimized --disable-assertions \
@@ -62,13 +62,18 @@ make_install64() {
}
init
-download_source $PROG $VER
+download_source $PROG $PROG $VER
patch_source
prep_build
build
make_isa_stub
fix_permissions
-make_package
+make_package llvm.mog
+PKG="omni/lang/clang"
+SUMMARY="clang"
+DESC="clang"
+make_package clang.mog
+exit 1
clean_up
# Vim hints
View
1  build/llvm/clang.mog
@@ -0,0 +1 @@
+<transform file link dir path="^(.(?!(clang)))*$" -> drop>
View
1  build/llvm/llvm.mog
@@ -0,0 +1 @@
+<transform file link dir path=".*clang.*" -> drop>
View
3  build/llvm/patches/series
@@ -0,0 +1,3 @@
+solaris-toolchains.patch
+solaris-tools.patch
+solaris-init-header-search.patch
View
27 build/llvm/patches/solaris-init-header-search.patch
@@ -0,0 +1,27 @@
+diff -rupN llvm-3.2.src.orig/tools/clang/lib/Frontend/InitHeaderSearch.cpp llvm-3.2.src/tools/clang/lib/Frontend/InitHeaderSearch.cpp
+--- llvm-3.2.src.orig/tools/clang/lib/Frontend/InitHeaderSearch.cpp 2012-10-24 18:19:39.000000000 +0200
++++ llvm-3.2.src/tools/clang/lib/Frontend/InitHeaderSearch.cpp 2013-03-10 13:15:55.996040432 +0100
+@@ -325,7 +325,9 @@ void InitHeaderSearch::AddDefaultCInclud
+ #endif
+ }
+ break;
+-
++ case llvm::Triple::Solaris:
++ AddPath("/opt/gcc-4.6.3/include", System, true, false, false);
++ break;
+ default:
+ break;
+ }
+@@ -431,9 +433,9 @@ AddDefaultCPlusPlusIncludePaths(const ll
+ "", "", "", triple);
+ break;
+ case llvm::Triple::Solaris:
+- AddGnuCPlusPlusIncludePaths("/usr/gcc/4.5/include/c++/4.5.2/",
+- "i386-pc-solaris2.11", "", "", triple);
+- // Solaris - Fall though..
++ AddGnuCPlusPlusIncludePaths("/opt/gcc-4.6.3/include/c++/4.6.3/",
++ "i386-pc-solaris2.11", "", "amd64", triple);
++ break;
+ case llvm::Triple::AuroraUX:
+ // AuroraUX
+ AddGnuCPlusPlusIncludePaths("/opt/gcc4/include/c++/4.2.4",
View
20 build/llvm/patches/solaris-toolchains.patch
@@ -0,0 +1,20 @@
+--- llvm-3.2.src.orig/tools/clang/lib/Driver/ToolChains.cpp 2012-12-16 16:59:27.000000000 +0100
++++ llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp 2013-03-09 20:37:58.903845003 +0100
+@@ -1799,8 +1799,16 @@ Solaris::Solaris(const Driver &D, const
+ if (getDriver().getInstalledDir() != getDriver().Dir)
+ getProgramPaths().push_back(getDriver().Dir);
+
++ if (Triple.getArch() == llvm::Triple::x86) {
++ getFilePaths().push_back("/lib");
++ getFilePaths().push_back("/usr/lib");
++ getFilePaths().push_back("/opt/gcc-4.6.3/lib/gcc/i386-pc-solaris2.11/4.6.3");
++ } else {
++ getFilePaths().push_back("/lib/amd64");
++ getFilePaths().push_back("/usr/lib/amd64");
++ getFilePaths().push_back("/opt/gcc-4.6.3/lib/gcc/i386-pc-solaris2.11/4.6.3/amd64");
++ }
+ getFilePaths().push_back(getDriver().Dir + "/../lib");
+- getFilePaths().push_back("/usr/lib");
+ }
+
+ Tool &Solaris::SelectTool(const Compilation &C, const JobAction &JA,
View
128 build/llvm/patches/solaris-tools.patch
@@ -0,0 +1,128 @@
+--- llvm-3.2.src.orig/tools/clang/lib/Driver/Tools.cpp 2012-11-21 08:56:23.000000000 +0100
++++ llvm-3.2.src/tools/clang/lib/Driver/Tools.cpp 2013-03-09 21:27:01.087438984 +0100
+@@ -4880,27 +4880,9 @@ void solaris::Link::ConstructJob(Compila
+ const InputInfoList &Inputs,
+ 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/";
+- 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/";
+- break;
+- case llvm::Triple::x86_64:
+- GCCLibPath += ("i386-" + T.getVendorName() + "-" +
+- T.getOSName()).str();
+- GCCLibPath += "/4.5.2/amd64/";
+- LibPath += "amd64/";
+- break;
+- default:
+- assert(0 && "Unsupported architecture");
+- }
+-
+ ArgStringList CmdArgs;
++ const toolchains::Solaris& ToolChain =
++ static_cast<const toolchains::Solaris&>(getToolChain());
+
+ // Demangle C++ names in errors
+ CmdArgs.push_back("-C");
+@@ -4920,7 +4902,8 @@ void solaris::Link::ConstructJob(Compila
+ CmdArgs.push_back("-shared");
+ } else {
+ CmdArgs.push_back("--dynamic-linker");
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "ld.so.1"));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("ld.so.1")));
+ }
+ }
+
+@@ -4934,32 +4917,52 @@ void solaris::Link::ConstructJob(Compila
+ if (!Args.hasArg(options::OPT_nostdlib) &&
+ !Args.hasArg(options::OPT_nostartfiles)) {
+ if (!Args.hasArg(options::OPT_shared)) {
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "crt1.o"));
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "crti.o"));
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "values-Xa.o"));
+- CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtbegin.o"));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crt1.o")));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crti.o")));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("values-Xa.o")));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crtbegin.o")));
++ //CmdArgs.push_back(Args.MakeArgString(LibPath + "crt1.o"));
++ //CmdArgs.push_back(Args.MakeArgString(LibPath + "crti.o"));
++ //CmdArgs.push_back(Args.MakeArgString(LibPath + "values-Xa.o"));
++ //CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtbegin.o"));
+ } else {
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "crti.o"));
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "values-Xa.o"));
+- CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtbegin.o"));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crti.o")));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("values-Xa.o")));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crtbegin.o")));
++ //CmdArgs.push_back(Args.MakeArgString(LibPath + "crti.o"));
++ //CmdArgs.push_back(Args.MakeArgString(LibPath + "values-Xa.o"));
++ //CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtbegin.o"));
+ }
+- if (getToolChain().getDriver().CCCIsCXX)
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "cxa_finalize.o"));
++ if (ToolChain.getDriver().CCCIsCXX)
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("cxa_finalize.o")));
+ }
+
+- CmdArgs.push_back(Args.MakeArgString("-L" + GCCLibPath));
++ const ToolChain::path_list Paths = ToolChain.getFilePaths();
++
++ for (ToolChain::path_list::const_iterator i = Paths.begin(), e = Paths.end();
++ i != e; ++i)
++ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + *i));
++ //CmdArgs.push_back(Args.MakeArgString("-L" + GCCLibPath));
+
+ Args.AddAllArgs(CmdArgs, options::OPT_L);
+ Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
+ Args.AddAllArgs(CmdArgs, options::OPT_e);
+ Args.AddAllArgs(CmdArgs, options::OPT_r);
+
+- AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
++ AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
+
+ if (!Args.hasArg(options::OPT_nostdlib) &&
+ !Args.hasArg(options::OPT_nodefaultlibs)) {
+- if (getToolChain().getDriver().CCCIsCXX)
+- getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
++ if (ToolChain.getDriver().CCCIsCXX)
++ ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
+ CmdArgs.push_back("-lgcc_s");
+ if (!Args.hasArg(options::OPT_shared)) {
+ CmdArgs.push_back("-lgcc");
+@@ -4970,14 +4973,16 @@ void solaris::Link::ConstructJob(Compila
+
+ if (!Args.hasArg(options::OPT_nostdlib) &&
+ !Args.hasArg(options::OPT_nostartfiles)) {
+- CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtend.o"));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crtend.o")));
+ }
+- CmdArgs.push_back(Args.MakeArgString(LibPath + "crtn.o"));
++ CmdArgs.push_back(Args.MakeArgString(
++ ToolChain.GetFilePath("crtn.o")));
+
+- addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
++ addProfileRT(ToolChain, Args, CmdArgs, ToolChain.getTriple());
+
+ const char *Exec =
+- Args.MakeArgString(getToolChain().GetProgramPath("ld"));
++ Args.MakeArgString(ToolChain.GetProgramPath("ld"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+ }

No commit comments for this range

Something went wrong with that request. Please try again.