On Fri, Jul 19, 2013 at 03:00:37PM +0100, Stuart Henderson wrote:
> On 2013/07/19 23:39, Jonathan Gray wrote:
> > On Thu, Jul 18, 2013 at 10:08:26AM -0700, Matthew Dempsky wrote:
> > > On Thu, Jul 18, 2013 at 9:56 AM, Stuart Henderson <[email protected]> 
> > > wrote:
> > > 
> > > > On 2013/07/18 22:48, Jonathan Gray wrote:
> > > > >  @comment lib/libgtest.a
> > > > >  @comment lib/libgtest_main.a
> > > > > +lib/libgtest.so
> > > > > +lib/libgtest_main.so
> > > >
> > > > presumably the above 4 lines want replacing with
> > > >
> > > > @comment lib/libgtest.so
> > > > @comment lib/libgtest_main.so
> > > >
> > > > ...?
> > > >
> > > > (not sure why this was originally commented, but presumably it should 
> > > > stay
> > > > commented?)
> > > >
> > > 
> > > Probably to avoid conflicting with devel/gtest, and I agree it should stay
> > > commented.
> > 
> > yes, that was from update-plist and wasn't intentional.
> > 
> > It seems using shared libraries may be significantly slowing down
> > clang invocation.  Just "clang -help" seems to take a few seconds,
> 
> Is --as-needed likely to help at all?
> 
> | # without --as-needed, evolution takes 20 minutes (yes, 20!) to start
> | MODGNOME_LDFLAGS=       -L${X11BASE}/lib 
> -Wl,-rpath,${TRUEPREFIX}/lib/evolution/${R}:${TRUEPREFIX}/lib \
> |                                 -Wl,--as-needed
> 
> > let alone compiling the > 11,000 or so files in chromium...
> 
> 17 hours and I'm at 7827/11331... last build without this took 2.5 hours.

While I can't build mesa with llvm targets enabled via autotools without
shared llvm libraries it seems a seperate xenocara build of mesa with bsd
style makefiles is happy enough with the r600 parts as static libraries.
So here is diff that just enables the backend with the patch to make it
work on i386 and leaves out shared libraries.

diff -uprN -x CVS -x *.orig llvm-orig/Makefile llvm/Makefile
--- llvm-orig/Makefile  Fri Jun 28 21:14:38 2013
+++ llvm/Makefile       Sun Jul 28 17:22:17 2013
@@ -9,6 +9,7 @@ DPB_PROPERTIES = parallel
 COMMENT =      modular, fast C/C++/ObjC compiler, static analyzer and tools
 
 LLVM_V =       3.3
+REVISION =     0
 DISTNAME =     llvm-${LLVM_V}.src
 PKGNAME =      llvm-${LLVM_V}
 CATEGORIES =   devel
@@ -46,7 +47,8 @@ SEPARATE_BUILD =      Yes
 CONFIGURE_ARGS =       -DLLVM_ENABLE_FFI:Bool=False \
                        -DLLVM_REQUIRES_RTTI:Bool=True \
                        -DCMAKE_BUILD_TYPE:String=Release \
-                       -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2:Bool=True
+                       -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2:Bool=True \
+                       -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD:String=R600
 
 # Workaround relocation overflow
 .if ${MACHINE_ARCH} == "powerpc"
diff -uprN -x CVS -x *.orig 
llvm-orig/patches/patch-lib_Target_R600_SIISelLowering_cpp 
llvm/patches/patch-lib_Target_R600_SIISelLowering_cpp
--- llvm-orig/patches/patch-lib_Target_R600_SIISelLowering_cpp  Thu Jan  1 
10:00:00 1970
+++ llvm/patches/patch-lib_Target_R600_SIISelLowering_cpp       Sun Jul 28 
17:22:17 2013
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+llvm svn rev 182446
+
+--- lib/Target/R600/SIISelLowering.cpp.orig    Tue May  7 09:02:15 2013
++++ lib/Target/R600/SIISelLowering.cpp Sat Jul 20 00:30:00 2013
+@@ -338,7 +338,7 @@ SDValue SITargetLowering::LowerBRCOND(SDValue BRCOND,
+   return Chain;
+ }
+ 
+-#define RSRC_DATA_FORMAT 0xf00000000000
++const uint64_t RSRC_DATA_FORMAT = 0xf00000000000LL;
+ 
+ SDValue SITargetLowering::LowerSTORE(SDValue Op, SelectionDAG &DAG) const {
+   StoreSDNode *StoreNode = cast<StoreSDNode>(Op);
+@@ -351,9 +351,9 @@ SDValue SITargetLowering::LowerSTORE(SDValue Op, Selec
+     return SDValue();
+   }
+ 
+-  SDValue SrcSrc = DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i128,
+-                               DAG.getConstant(0, MVT::i64),
+-                             DAG.getConstant(RSRC_DATA_FORMAT, MVT::i64));
++  SDValue Zero = DAG.getConstant(0, MVT::i64);
++  SDValue Format = DAG.getConstant(RSRC_DATA_FORMAT, MVT::i64);
++  SDValue SrcSrc = DAG.getNode(ISD::BUILD_PAIR, DL, MVT::i128, Zero, Format);
+ 
+   SDValue Ops[2];
+   Ops[0] = DAG.getNode(AMDGPUISD::BUFFER_STORE, DL, MVT::Other, Chain,
diff -uprN -x CVS -x *.orig llvm-orig/pkg/PLIST llvm/pkg/PLIST
--- llvm-orig/pkg/PLIST Sat Jun 22 08:09:12 2013
+++ llvm/pkg/PLIST      Sun Jul 28 17:22:17 2013
@@ -1156,6 +1156,10 @@ lib/libLLVMPowerPCAsmPrinter.a
 lib/libLLVMPowerPCCodeGen.a
 lib/libLLVMPowerPCDesc.a
 lib/libLLVMPowerPCInfo.a
+lib/libLLVMR600AsmPrinter.a
+lib/libLLVMR600CodeGen.a
+lib/libLLVMR600Desc.a
+lib/libLLVMR600Info.a
 lib/libLLVMRuntimeDyld.a
 lib/libLLVMScalarOpts.a
 lib/libLLVMSelectionDAG.a

Reply via email to