Enable parallel build gcc on Linux
H . J . Lu
hjl@valinux.com
Thu Jun 8 00:38:00 GMT 2000
I have a shell script to enable parallel build on Linux:
--
numprocs=$(/usr/bin/getconf _NPROCESSORS_ONLN)
cat <<EOF > makefile
MAKE=make -j `expr ${numprocs} + ${numprocs}`
include Makefile
CFLAGS:=\$(CFLAGS) -pipe
CXXFLAGS:=\$(CXXFLAGS) -pipe
EOF
---
You should run it in your build directory. It exposed out many parallel
build bugs in the gcc source tree, especially on SMP machines with
enough RAM. In my case, they are quad-Xeon with 4GB RAM and dual-Xeon
with 512MB RAM.
--
H.J. Lu (hjl@gnu.org)
More information about the Gcc
mailing list