Tuesday, November 20, 2007

Apt-Build for Intel Duo Core 2

I think I have an answer for what architecture option one should use with an Intel Duo Core 2 processor when installing apt-build.  From the Gentoo documentation, it looks like we should use prescott for this type of processor for 32-bit modes.  The first option about what level of optimization is more of a time versus performance question.  A strong optimization will take longer to compile and create bigger binaries.

Now I have the same benefits that Gentoo users have by running apt-build for various packages.

Check 'cat /proc/cpuinfo' to verify that you have the same cpu family and model.


Safe Cflags - Gentoo Linux Wiki
Intel Core 2 Duo/Quad / Xeon 51xx/53xx
vendor_id : GenuineIntel

cpu family : 6

model : 15

model name : Intel(R) Core(TM)2 CPU XXXX @ XXXGHz



32 bit profile (x86)


  CHOST="i686-pc-linux-gnu"

  CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

  CXXFLAGS="${CFLAGS}"



64 bit profile (amd64)


  CHOST="x86_64-pc-linux-gnu"

  CFLAGS="-march=nocona -O2 -pipe"

  CXXFLAGS="${CFLAGS}"


Note:

* GCC 4.3 has -march=core2[1], but Gentoo has nothing above 4.2 in portage.

[edit]