From patchwork Wed Sep 18 19:14:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 173998 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp59811ill; Wed, 18 Sep 2019 12:14:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxilU36UF5eRhLtX0U1FfMlTFHBwf8aGiwFaOc6yKLi9RGCfswuZAhKELdOw2uzFhwhfIh X-Received: by 2002:a17:90a:8b8c:: with SMTP id z12mr2171049pjn.100.1568834093223; Wed, 18 Sep 2019 12:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568834093; cv=none; d=google.com; s=arc-20160816; b=b+F1ek6vbV8+bFa1bOpFs+lCmNR5MHD6x9WXpMzzpEArwCXtktjLd+BaUAJpH08I/z v1Z+LfMYDjCIUSPtemICV2tOvUIr/683N34cjDOHQD/YKWunLvxOWFEDryJY/rgk6z6r 3jn6JNXQlAl5XoLVrvRANDrDaneyC7HUSbK9RnAmcI3VC28rqKnxAabdAGQ1rhZbnz02 xIsJWrPuyeWv4oLdwpfvWscSOuDcFp+FeLbiKyC8cZ0hmov8xUkMbMv1VeC7iKHIQra+ ZXmnoNf5eA2ILI4NuN7WNMAvnU9kWiSA1Jcg3bgEvV8lsUaB4NxpuGWDN2rK0iGlMisW 7Thw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=obFdqIYXjsol27uC6B67i/On8vQbXO0BYhz3KMtisKA=; b=eayyvqQNxnIZDHGVTg0NYBQsl8JTu0S+2PouIANGBfaHhS2C7EhGXvAMGf+Z01cuG+ 7HkR08zM5CNnFGkQ7h2ytf5o665bNGHza552R2yjgBRnjjCTqb5sCfVWD4ZtOPjy282d 1almni7z6FuNJlKRcElbs6TZWzfu6Rju94OjxLm7IiCLLYogwy1kI5I3SheZqWe2xY/q qlQL76zqT11PRdgg0Qi3XRqSZtYPX27dEx8tt6wdZr8GxaDu2Jz3ALdjlk/hli+Tmaix K2g5mPjTAUDZCqFLxMFxQszl/1bNLkXusQFWqzNYl+XM/775aHtzqA34NAs2epemxTie hLJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YVfiKaUR; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id j14si4998823pgs.464.2019.09.18.12.14.52; Wed, 18 Sep 2019 12:14:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YVfiKaUR; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3E41090071; Wed, 18 Sep 2019 19:14:47 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mail.openembedded.org (Postfix) with ESMTP id 2F43F7F7CE for ; Wed, 18 Sep 2019 19:14:46 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id i18so385681pgl.11 for ; Wed, 18 Sep 2019 12:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A02VprSkX469S29kidWmCK3v0WmeYMq/M7kL7lXtQp8=; b=YVfiKaURVIqexiQL1G4TMeRPUtCGmYjMuc8RGWuOhBEsPI+PkpHpaRBLEXfSlA6zpj 1nPQi3u6QCGOut4le86V34/fqj5ZtBCHFu16k5eWHG39QFs3d7yL8BC45NyxzW1aYmKJ IlMoExoBLlbbF9jo4HGMbrT94U3E9q86KFb/SCfLDCVKDqFfYKaKDxqTmk5MrDPIQ/i8 bx3nhOv6VHjFTxMyJbYK3cpPlipWh+DbtpHJ4sSGxSzbO4fTCiJHVVH5BmLGBAVu5Rgp xan8gEzArcRdXAp4jQ6+J9FpOQd4xBrgvdPbaEhfLFgO+lzbKyEmFZ5Nu7eWDw9rEZtT sRmA== 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:mime-version :content-transfer-encoding; bh=A02VprSkX469S29kidWmCK3v0WmeYMq/M7kL7lXtQp8=; b=t27Y5w8tgNned3ODWK9WVJelpCvEoU2yCw3SgnvNqQzy9SaHe+FkM8w71U2TsO5tAc kYn0NEmEl5egQUWp2usLUmbxuw/+CS6J+r4HUnzPc0Vd6dsVA0eIUeDAO9JZltgGNqZT sT/dEADI/9t8cTtP/r3FP2NhPYyAqzN6k7JY5sinN2f+WLsgPZc2NN4c3wkJ79hdOxfT lWvsvDSJsYiAfP/+xSeYCzQBEIi4IqxEyiu/TsG8c6NkqBnlPKXXDNA8GQImBysSmVyV g1dBkNItwrvQtFH/MNYcdbH92QdZeGtCj3f09MbjP9t/waGUvnYXdanP4MXcSQsHBSmk 2i2w== X-Gm-Message-State: APjAAAUxVCIAfmbtT5EKev1fTrLqAD2n6GRVx4nlSy0eNVe9WjODRSn0 mHxXSdPJxAY09Z3ljP3R6ubk8Q0X0SE= X-Received: by 2002:a62:ea10:: with SMTP id t16mr2162952pfh.233.1568834086539; Wed, 18 Sep 2019 12:14:46 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id a13sm10736290pfg.10.2019.09.18.12.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2019 12:14:46 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Wed, 18 Sep 2019 12:14:35 -0700 Message-Id: <20190918191435.1798025-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH] dfu-util-native: Dont build static binary X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org This did serve a purpose in past, this however is adding additional requirement on build host to require static libc.a. in general it will be good for user to select static linking explicitly, since it does have distribution obligations once static linking is in place. Add packageconfig to enable static builds and keep it off by default Signed-off-by: Khem Raj Cc: Martin JaMa Jansa --- .../dfu-util/dfu-util-native_0.9.bb | 7 +- ...ert-Makefile.am-Drop-static-dfu-util.patch | 68 ------------------- 2 files changed, 5 insertions(+), 70 deletions(-) delete mode 100644 meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch -- 2.23.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb index aeca23bf2d..76faefefbb 100644 --- a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb +++ b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb @@ -4,12 +4,15 @@ inherit native deploy DEPENDS = "libusb1-native" -SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch" +PACKAGECONFIG ??= "" + +PACKAGECONFIG[static] = "CFLAGS='${CFLAGS} -pthread -static',," do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" do_deploy() { - install -m 0755 src/dfu-util_static ${DEPLOYDIR}/dfu-util-${PV} + install -m 0755 src/dfu-util ${DEPLOYDIR}/dfu-util-${PV} rm -f ${DEPLOYDIR}/dfu-util ln -sf ./dfu-util-${PV} ${DEPLOYDIR}/dfu-util } + addtask deploy before do_package after do_install diff --git a/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch b/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch deleted file mode 100644 index 1c6ad0807e..0000000000 --- a/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch +++ /dev/null @@ -1,68 +0,0 @@ -From c2aab3b9ae1febcb6b4c6561a59df1930a57b394 Mon Sep 17 00:00:00 2001 -From: Martin JaMa Jansa -Date: Thu, 11 Aug 2011 11:19:52 +0200 -Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util" - -This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071. - -Signed-off-by: Martin JaMa Jansa ---- - configure.ac | 2 +- - src/Makefile.am | 22 +++++++++++++++++++++- - 2 files changed, 22 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f5a43b8..6a3757e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -21,7 +21,7 @@ AS_IF([test x$native_libusb = xno], [ - AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) - ]) - --LIBS="$LIBS $USB_LIBS" -+LIBS="$LIBS $USB_LIBS -lpthread" - CFLAGS="$CFLAGS $USB_CFLAGS" - - # Checks for header files. -diff --git a/src/Makefile.am b/src/Makefile.am -index 70179c4..e8736ee 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -1,6 +1,6 @@ - AM_CFLAGS = -Wall -Wextra - --bin_PROGRAMS = dfu-util dfu-suffix dfu-prefix -+bin_PROGRAMS = dfu-util dfu-util_static dfu-suffix dfu-prefix - dfu_util_SOURCES = main.c \ - portable.h \ - dfu_load.c \ -@@ -19,6 +19,26 @@ dfu_util_SOURCES = main.c \ - quirks.c \ - quirks.h - -+dfu_util_static_SOURCES = main.c \ -+ portable.h \ -+ dfu_load.c \ -+ dfu_load.h \ -+ dfu_util.c \ -+ dfu_util.h \ -+ dfuse.c \ -+ dfuse.h \ -+ dfuse_mem.c \ -+ dfuse_mem.h \ -+ dfu.c \ -+ dfu.h \ -+ usb_dfu.h \ -+ dfu_file.c \ -+ dfu_file.h \ -+ quirks.c \ -+ quirks.h -+ -+dfu_util_static_LDFLAGS = -static -+ - dfu_suffix_SOURCES = suffix.c \ - dfu_file.h \ - dfu_file.c --- -2.7.2 -