From patchwork Fri Feb 2 14:06:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 868587 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="m54QaxSr"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zXzLR3tl6z9t0m for ; Sat, 3 Feb 2018 01:06:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F347F883A8; Fri, 2 Feb 2018 14:06:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kF-WY6NjdTPV; Fri, 2 Feb 2018 14:06:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 10F3687A27; Fri, 2 Feb 2018 14:06:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 0A78B1C1568 for ; Fri, 2 Feb 2018 14:06:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 06E8D25C1B for ; Fri, 2 Feb 2018 14:06:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PM7bUJTiiX9S for ; Fri, 2 Feb 2018 14:06:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f66.google.com (mail-it0-f66.google.com [209.85.214.66]) by silver.osuosl.org (Postfix) with ESMTPS id 832F6258C4 for ; Fri, 2 Feb 2018 14:06:25 +0000 (UTC) Received: by mail-it0-f66.google.com with SMTP id k6so7987507ita.3 for ; Fri, 02 Feb 2018 06:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZDDNEzBGhG7C/oGCGfkkQHD9v7cl+LQUBBbEiPBTvvo=; b=m54QaxSrfYNWt9WEUDRs89AtKitKfyMFg/lRkXsLmyCdkycuULhr42Y0Tvh8EJCTUl EbVS0eYwXJJjMjT96CTGHggiU/Rp6JkTGEcQRQjlHwolDhPauMVRGWm/rzxaWifrRO/z oeLvQyLyM/VfRnhDoZHu4+d5Ic/MsNVlsKouOjG61zyAxt/EjlDP9nrFgjisXMVnLIWV JVHQnofYNkAUO6yPy2zPv4beROloVQqeTcVW9lDG7QHqHGHJkUrYhBi/6F8cAev6PCCz O92JmnaJf2ibxtcJp9KnK9RbYw6p5AJTuCmMAlYbZoeZ+SYjlc1CKgFcmi78G079IamO aH2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZDDNEzBGhG7C/oGCGfkkQHD9v7cl+LQUBBbEiPBTvvo=; b=DjSIqbQS9ZCloDQZVH4eGxk4+8zJ9WW5LASUZglgPfubncvD9YvrYuQQlc+egT4Pxz jkSkzWOFOT/PXF4GsUCtvJGnsqQznhxJMGvtYJ+Ga62qb2N1fQFfjOmF1+X6DWkbdIxd wJs0ozNtIhAkXv3+roB+izHCH6xDq1DKy4wsKDLI7cAMQP7wAqD/YVB1My/75IhsU2iH LSJDb6mFe/vJd1XafNlhVhzvzsMk2yCT3EIKBheEVB8fkXy+arBRwvKcdZMnNkIMW5ov IzUQukkdVqZixBiAPt5yt4BS2J7HMrYb1kfKxMXMIFl5gUaL2FMwVzGJiriDP0eQd5O4 b70w== X-Gm-Message-State: AKwxytcexZeTmUlJN/xUqKmIGnnyHJoIwYtrs3lDppGucM+gqAQTINnC zvYVV6Ghr0/VHpdtjZerxUoWpXAa X-Google-Smtp-Source: AH8x224oFMlww8UXr2ec90uJEsnDix8RC1fkN3hNcavp8BE3/BeNT3i6nJpijht1oh2IfSxHJXeS4A== X-Received: by 10.36.239.130 with SMTP id i124mr26664549ith.27.1517580384482; Fri, 02 Feb 2018 06:06:24 -0800 (PST) Received: from localhost.localdomain (mail.codeblue.com. [65.183.183.198]) by smtp.gmail.com with ESMTPSA id l20sm1314924ioc.2.2018.02.02.06.06.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Feb 2018 06:06:24 -0800 (PST) From: Adam Duskett To: buildroot@buildroot.org Date: Fri, 2 Feb 2018 09:06:00 -0500 Message-Id: <20180202140601.21285-2-aduskett@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180202140601.21285-1-aduskett@gmail.com> References: <20180202140601.21285-1-aduskett@gmail.com> Subject: [Buildroot] [PATCH v2 2/3] php: add SAPI API librari option X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This option forces PHP to build libphp7.so. The size of the library is around 3.5MB, which is why this is a configuration option and not something that is enabled or disabled automatically. Signed-off-by: Adam Duskett --- Changes v1 -> v2: - Changed BR2_PACKAGE_PHP_EMBED_SAPI to BR2_PACKAGE_PHP_ENABLE_EMBED to reflect the configure option name change in PHP 7.2. - Updated approximate library size from 4MB to 3.5MB. - Changed --embed-sapi to --enable-embed to reflect the configure option name change in PHP 7.2. - Added a check for static libs as the SAPI API library can be built either static or shared. - Updated wording in the help section of Config.in package/php/Config.in | 7 +++++++ package/php/php.mk | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/package/php/Config.in b/package/php/Config.in index 0fb80063af..d327d08366 100644 --- a/package/php/Config.in +++ b/package/php/Config.in @@ -41,6 +41,13 @@ config BR2_PACKAGE_PHP_SAPI_FPM help PHP-FPM (FastCGI Process Manager) +config BR2_PACKAGE_PHP_ENABLE_EMBED + bool "SAPI API library" + help + Enable building of embedded SAPI library. The name of the + library on the target is libphp7.so and is approximately + 3.5MB in size. + source "package/php/Config.ext" endif diff --git a/package/php/php.mk b/package/php/php.mk index 152ec7d780..511cdfa8cc 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -82,6 +82,14 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_CLI),--enable-cli,--disable-cli) PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_CGI),--enable-cgi,--disable-cgi) PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_FPM),--enable-fpm,--disable-fpm) +ifeq ($(BR2_PACKAGE_PHP_ENABLE_EMBED),y) +ifeq ($(BR2_STATIC_LIBS),) +PHP_CONF_OPTS += --enable-embed=shared +else +PHP_CONF_OPTS += --enable-embed=static +endif +endif + ifeq ($(BR2_PACKAGE_PHP_SAPI_APACHE),y) PHP_DEPENDENCIES += apache PHP_CONF_OPTS += --with-apxs2=$(STAGING_DIR)/usr/bin/apxs