From patchwork Sat Aug 19 17:26:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 110454 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp2348714qge; Sat, 19 Aug 2017 10:27:12 -0700 (PDT) X-Received: by 10.99.96.84 with SMTP id u81mr5731735pgb.345.1503163631969; Sat, 19 Aug 2017 10:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503163631; cv=none; d=google.com; s=arc-20160816; b=H/4IlGFHSn0XHkJy4knIKQIKFJqM2cQcHqR5uirCk1H/IUnKXyAQFii8gB8sL9ZV+i E+rJJ+/+xku8QJK4rBIxAEyGb5bWoUPwpZTG/wnhXa6oQRS+ZlujHAbDgbvYK1JY+Pt+ IJipUIjv0BANnNXNA4c859TPbZBJ6CIMNCnUGAlPTD9f8Vsg1/TKFKFYGnX9RDaAPmLo bl73Od1bjG9W61CFKREXSXH5gJYOA5g1k7eFoPR7J+WYontmBBD8x0Dr+QcpYXeQHiqa ICw53NKzArd4FPScvzKu26jMn2TCMwnigTrI/bQFocaEeVLMhEkAYa438uV1b5+BUs3T YxZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=VxlyCoAW/ZgwekI/8JTyhT+zDhrt97mDPQBnaetTabE=; b=UkNtlOvny0C6Un4qG3MB1iAGf6AZc9iia2y3QPLp1RXSik3U4EHEY7r2u2SbyyInd5 Qa9FnBmLbuhaSL6rUnpRQPnx+dL2Sc5NCXrrp8ILFI6N2vmFJQnX2u2cxYuSG6f1vbcB aquxGG1/Negr1wJ8Vgn1CsbrriSHinWMStiEHt6r+usXtl+MTkdKMrhjyQaEAqTBE92t DCHZlClv4uIMrBp7t3smv0l0RkJ/S9SLkQtMAekourBRwqkZbkOZ3qiJogzgwYkt++AZ vepg+tb7UwfF2LX0Q3fyeRGhPEDeydEmd+Z7XjqtGROOaOCcl/oyaT5K/lXTE9lCgWkI HKcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=WrUAXUKx; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE 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 y7si1742515pgs.121.2017.08.19.10.27.11; Sat, 19 Aug 2017 10:27:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-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=WrUAXUKx; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id EC298783E3; Sat, 19 Aug 2017 17:27:08 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by mail.openembedded.org (Postfix) with ESMTP id 2641171AC9 for ; Sat, 19 Aug 2017 17:27:06 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id t80so12570251pgb.2 for ; Sat, 19 Aug 2017 10:27:08 -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; bh=dWguEZe0O13KPm2RLoHZZWjUd/lvyX4cY3F15ohcHSU=; b=WrUAXUKx7J/j9MgRW9MSq3XZO6CqEh3S+DEmnhlriPEn1l1pLL8STy7IfewEQy6bqD ztye/rbmQXpIKRH/uMBkoSOpydYi62IAD6heEpdL1rYal5fCBcVf/r030gyuv56kFS4A h+yQEDrdYYejilHMzaOxxPc52uNQGfViG6uXxKkiuj14Vk6gA2MBH0CXJExvn+pOkd9j /pEtCkvsfRN3uXbY77BZx3jT4g6QAJT2IaBxAwwrFa9pjVBqaNSgpQOEjkIm+XT5z9er HrWBUiC8X2wAihJ6x47oLAfzS3BFLdY41F9l21FEdgP7CjQu/WB1U2xtX7Uj5YDENe9u WXkw== 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; bh=dWguEZe0O13KPm2RLoHZZWjUd/lvyX4cY3F15ohcHSU=; b=WfETrIhUHGA8XpgATPZBA7E7jTNVBcucjtJnBdE34UjMHUPVmv0cSz6ikxqtkVll4O xZXoVOqzdkQ48ZtdHLIIpAO6gtFe1h5niXeV7uhxW6w2F3aIOY0q1RYjZtlSmFqbjAOP IwF//kRGNsZrN8fORu3QeZHZoWqBROABXlpBWFdyIuPMAxrawui1Bw6ytJ/DjQX42OYz 0wrneSGtX04WrdDz3rb6AxYwxOTIxVpnQMz0Sds6Z02ATTHVzfintDZczRcZPDBBsVyH J9oRNqU8vyYP8tRUUKDISWXH0Pm1XBVPqv+O1qrD1eFRYBjZCerZe11unOURgos7jFXd 56jw== X-Gm-Message-State: AHYfb5hbAW51YvCWXOqdEGNCjxBWK1245N5d6CWS1YrdImt6leBc6R5C rOXMWR8Q+QpGzIWw X-Received: by 10.84.195.36 with SMTP id i33mr13788943pld.314.1503163628095; Sat, 19 Aug 2017 10:27:08 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::175d]) by smtp.gmail.com with ESMTPSA id w66sm17349695pfi.63.2017.08.19.10.27.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Aug 2017 10:27:07 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 19 Aug 2017 10:26:59 -0700 Message-Id: <20170819172659.16717-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [OE-core] [PATCH V3] db: Add --tag parameter to libtool invocation X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Fix do_configure to be able to regenerate configure files Use cross libtool as installed by OE, as done in normal autotooled recipes These changes help in invoking the libtool with proper tags for C and C++ compiler and linker invocation and not use same tag across all different invocations Fixes errors like libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' Signed-off-by: Khem Raj --- v1 -> v2: - Fix commit message v2 -> v3: - Call libtool with ./ prefix to mark cwd ...dd-explicit-tag-options-to-libtool-invoca.patch | 42 ++++++++++++++++++++++ meta/recipes-support/db/db_5.3.28.bb | 23 ++++++++---- 2 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch -- 2.14.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch b/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch new file mode 100644 index 0000000000..cb28db1343 --- /dev/null +++ b/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch @@ -0,0 +1,42 @@ +From 32e5943a3c4637d39e4d65b544dcb99e280210e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 23 Jul 2017 10:54:26 -0700 +Subject: [PATCH] configure: Add explicit tag options to libtool invocation + +This helps cross compile when tag inference via heuristics +fail because CC variable is having -fPIE -pie and libtool +smartly removes it when building libraries + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + dist/configure.ac | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/dist/configure.ac b/dist/configure.ac +index 689f3b8..9c14bdb 100644 +--- a/dist/configure.ac ++++ b/dist/configure.ac +@@ -366,12 +366,12 @@ LIBTOOL="./libtool" + + INSTALLER="\$(LIBTOOL) --mode=install cp -p" + +-MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}" +-MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version" +-MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}" +-MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}" +-MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version" +-MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}" ++MAKEFILE_CC="\$(LIBTOOL) --tag=CC --mode=compile ${MAKEFILE_CC}" ++MAKEFILE_SOLINK="\$(LIBTOOL) --tag=CC --mode=link ${MAKEFILE_CCLINK} -avoid-version" ++MAKEFILE_CCLINK="\$(LIBTOOL) --tag=CC --mode=link ${MAKEFILE_CCLINK}" ++MAKEFILE_CXX="\$(LIBTOOL) --tag=CXX --mode=compile ${MAKEFILE_CXX}" ++MAKEFILE_XSOLINK="\$(LIBTOOL) --tag=CXX --mode=link ${MAKEFILE_CXXLINK} -avoid-version" ++MAKEFILE_CXXLINK="\$(LIBTOOL) --tag=CXX --mode=link ${MAKEFILE_CXXLINK}" + + + case "$host_os" in +-- +2.13.3 + diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb index 7b158e9e2c..66282600f5 100644 --- a/meta/recipes-support/db/db_5.3.28.bb +++ b/meta/recipes-support/db/db_5.3.28.bb @@ -22,6 +22,7 @@ SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" SRC_URI += "file://arm-thumb-mutex_db5.patch \ file://fix-parallel-build.patch \ file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ + file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ " # We are not interested in official latest 6.x versions; # let's track what debian is using. @@ -76,22 +77,32 @@ MUTEX = "" MUTEX_arm = "${ARM_MUTEX}" MUTEX_armeb = "${ARM_MUTEX}" EXTRA_OECONF += "${MUTEX} STRIP=true" -EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" +EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'" +EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java" AUTOTOOLS_SCRIPT_PATH = "${S}/dist" # Cancel the site stuff - it's set for db3 and destroys the # configure. CONFIG_SITE = "" -do_configure() { - cd ${B} - gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH} - oe_runconf + +oe_runconf_prepend() { + . ${S}/dist/RELEASE + # Edit version information we couldn't pre-compute. + sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \ + -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \ + -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ + -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ + -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ + -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ + -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \ + -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ + -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure } do_compile_prepend() { # Stop libtool adding RPATHs - sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool + sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool } do_install_append() {