Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89234 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76574 invoked from network); 16 Nov 2015 13:45:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2015 13:45:12 -0000 Authentication-Results: pb1.pair.com header.from=bogdan.andone@intel.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bogdan.andone@intel.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain intel.com designates 192.55.52.93 as permitted sender) X-PHP-List-Original-Sender: bogdan.andone@intel.com X-Host-Fingerprint: 192.55.52.93 mga11.intel.com Received: from [192.55.52.93] ([192.55.52.93:64171] helo=mga11.intel.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/C0-03003-3EDD9465 for ; Mon, 16 Nov 2015 08:45:10 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 16 Nov 2015 05:45:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,303,1444719600"; d="scan'208,217";a="852015678" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga002.fm.intel.com with ESMTP; 16 Nov 2015 05:45:05 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.228]) by IRSMSX153.ger.corp.intel.com ([169.254.9.208]) with mapi id 14.03.0248.002; Mon, 16 Nov 2015 13:45:03 +0000 To: PHP internals Thread-Topic: building binaries with static objects Thread-Index: AdEgdKHu5UOJnCZaTT2M2jKCU6E3LA== Date: Mon, 16 Nov 2015 13:45:03 +0000 Message-ID: <0ABC26E371A76440A370CFC5EB1056CC40EADC13@IRSMSX106.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: multipart/alternative; boundary="_000_0ABC26E371A76440A370CFC5EB1056CC40EADC13IRSMSX106gercor_" MIME-Version: 1.0 Subject: building binaries with static objects From: bogdan.andone@intel.com ("Andone, Bogdan") --_000_0ABC26E371A76440A370CFC5EB1056CC40EADC13IRSMSX106gercor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi guys, Does anybody know why PHP sources are compiled as shared objects only on li= nux, meaning that libtool is adding -fPIC -DPIC flags during compilation? Shared objects are mandatory for building libphp7 library and module extens= ions, but why are they used for building binaries like php-fpm, php-cgi or = php? I just observed that binaries built with static objects are ~1% quicker at = runtime for real live workloads like WordPress. Despite the fact that binar= y size is higher than the current version, there is a visible gain in terms= of reduction of instructions retired per request and iTLB loads and misses= . I am wondering if it is possible to have static compilation enabled by defa= ult in the Makefile. I managed to do it by brute force as I am not an exper= t in libtool and auto tools (I tried to play with -enable-static flag but w= ith no luck...). Not sure if current behavior is by intent or just a miss; = or what constraints have to be considered for portability reasons for other= non linux platforms. Kind Regards, Bogdan Andone --_000_0ABC26E371A76440A370CFC5EB1056CC40EADC13IRSMSX106gercor_--