Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id 578EF6D840 for ; Tue, 10 Dec 2013 08:32:09 +0000 (UTC) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.14.5/8.14.5) with ESMTP id rBA8W8Jd009520 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 10 Dec 2013 00:32:08 -0800 (PST) Received: from PKE-CLU1-D1.corp.ad.wrs.com (128.224.162.204) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.2.347.0; Tue, 10 Dec 2013 00:32:08 -0800 From: To: Date: Tue, 10 Dec 2013 16:32:04 +0800 Message-ID: <1386664325-15756-1-git-send-email-Chong.Lu@windriver.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Subject: [PATCH meta-networking] modphp: enable endian check X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 08:32:11 -0000 Content-Type: text/plain From: Chong Lu Previously, modphp estimates endian on host rather than checks it on target. If the host is little-endian and the target is big-endian, modphp claims that endian is little. As a result, a memory location that it is not allowed to access when calling libphp5.so module on target. It will occur segmentation fault. This patch enables endian check support for modphp. Signed-off-by: Chong Lu --- recipes-php/modphp/modphp5.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-php/modphp/modphp5.inc b/recipes-php/modphp/modphp5.inc index 19f1be9..425faa2 100644 --- a/recipes-php/modphp/modphp5.inc +++ b/recipes-php/modphp/modphp5.inc @@ -44,6 +44,8 @@ EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \ --enable-mbstring \ --with-config-file-path=${sysconfdir}/php/apache2-php5" +EXTRA_OECONF += "${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)}" + PACKAGECONFIG ??= "mysql" PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5" PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5" -- 1.7.9.5