From 0d92dc7119669ecf624039a82b6ffec05db7e71f Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 9 Jan 2012 12:29:46 -0500 Subject: [PATCH] Added some more info --- PHP.md | 19 ++++++++++++++++++- Setup.md | 15 ++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/PHP.md b/PHP.md index 99c64df..76ffd37 100644 --- a/PHP.md +++ b/PHP.md @@ -1 +1,18 @@ -#Setting up PHP \ No newline at end of file +#Setting up PHP + +## Use Flags + +In order for PHP to be most useful, it should have as many of the modules installed as will be used. I recommend installing it using the FPM sapi, which manages php session spawning. + +Here are some recommended flags: +`mysql utf8 threads -readline libssh2 -cgi fpm xcache suhosin postgres mysqlnd reflection session simplexml sockets spl pdo mbstring sqlite3 mysqli soap` + +## PHP_TARGETS + +The `PHP_TARGETS` setting in `/etc/make.conf` lets you select which versions of PHP to compile. If possible, I recommend always using the latest stable version. + +As of the time this is written, php 5.3 is the latest version, so I would add this line to `/etc/make.conf` + +`PHP_TARGETS="php5-3"` + +As of this writing, PHP compiles with clang reliably. diff --git a/Setup.md b/Setup.md index c04cec1..8e7b36a 100644 --- a/Setup.md +++ b/Setup.md @@ -1 +1,14 @@ -# General Setup \ No newline at end of file +# General Setup + +## Install LLVM/Clang + +Clang is a faster compiler than the default GCC. It produces binary as fast, or faster than GCC. To set up clang, + +run `emerge llvm clang` + +and add these to lines to the top of your `/etc/make.conf` file + + CC=/usr/bin/clang + CXX=/usr/bin/clang++ + +If a package fails to compile with clang, you can comment out those lines, and recompile the package with GCC. \ No newline at end of file