Is there anyway to use all 4 cores on my quad core during compilation? It appears I am only using 1 core. I am hoping there is a flag I can pass to the makefile. Alternatively, I could probably break the makefile in four different makefiles for compiling and a separate makefile for linking. From there I could execute the compile makefiles seperately and finally the link makefile when the others are done. Has anyone tried this? I'd really like to speed up compilations, especially when doing regression testing.
> Is there anyway to use all 4 cores on my quad core during compilation? It appears I am only using 1 core. I am hoping there is a flag I can pass to the makefile.Look at the "-j" option to the make command. It takes a numeric argument that signifies how many simultaneous jobs should be running. ccache is another useful project that can considerably speed up compilation by caching previous compiler output: http://ccache.samba.org/
beside ccache there is also distcc, but on a quadcore a "make -j4" is all you need
On Thu, Oct 13, 2011 at 21:26, jwong <wineforum-user at winehq.org> wrote:> Is there anyway to use all 4 cores on my quad core during compilation? It appears I am only using 1 core. I am hoping there is a flag I can pass to the makefile. > > Alternatively, I could probably break the makefile in four different makefiles for compiling and a separate makefile for linking. From there I could execute the compile makefiles seperately and finally the link makefile when the others are done. > > Has anyone tried this? I'd really like to speed up compilations, especially when doing regression testing.You can also pass --disable-tests to ./configure Also "-O0" in CFLAGS can help
jwong wrote:> > Has anyone tried this? I'd really like to speed up compilations, especially when doing regression testing.make -j5(one more than you physically have) and --disable-tests in the configure. handy dandy bash script I use...adjust to your needs. Code: #! /bin/sh CC="gcc-4.6 -m32" LDFLAGS="-L/lib32 -L/usr/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure -v --prefix=/usr --without-capi --without-cups --without-jack --without-sane --with-x --without-openal --disable-tests --without-nas --without-v4l --without-gphoto --with-opencl make depend && make -j4 echo {your password} | sudo -S make install