Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78955 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20600 invoked from network); 18 Nov 2014 20:22:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2014 20:22:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=rainer.jung@kippdata.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rainer.jung@kippdata.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain kippdata.de designates 195.227.30.149 as permitted sender) X-PHP-List-Original-Sender: rainer.jung@kippdata.de X-Host-Fingerprint: 195.227.30.149 capsella.kippdata.de Solaris 10 (beta) Received: from [195.227.30.149] ([195.227.30.149:54240] helo=mailserver.kippdata.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/52-06737-38AAB645 for ; Tue, 18 Nov 2014 15:22:28 -0500 Received: from [10.0.110.6] ([192.168.2.104]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id sAIKMOhh019588 for ; Tue, 18 Nov 2014 21:22:24 +0100 (CET) Message-ID: <546BAA7D.1070905@kippdata.de> Date: Tue, 18 Nov 2014 21:22:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Using a common shared lib for multiple SAPIs? From: rainer.jung@kippdata.de (Rainer Jung) Hi there, the default build process of PHP on Unix/Linux links together all code needed for any SAPI that one builds (excluding dynamically loadable extensions). This often leads to relatively big SAPI shared object files. But most of this code is exactly the same for all SAPIs. That adds considerable to the package size if one ships e.g. CLI, CGI, mod_php and FPM. One could instead use one common shared library which conatins most of the code and only small additional SAPI shared object files with the SAPI specifics. I twisted the existing build process to achieve this building of a common lib plus one shared object per SAPI and it seems to work well. Is there any interest in adopting the existing build process to this? I can provide details how I do it currently. I use it for 5.5 and 5.6, but I expect it to work similarly for master which would probably be the target for the change. Thanks for any feedback, Rainer