From patchwork Mon Jul 30 21:59:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Hundeb=C3=B8ll?= X-Patchwork-Id: 143173 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4565917ljj; Mon, 30 Jul 2018 14:59:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc3mlRcywa7zBV6ZAEdUk2c1HvM7qACdxXQGCXbP6HAf8kkggAn9pIU6g4euaQAaGP22CIU X-Received: by 2002:a63:6fcc:: with SMTP id k195-v6mr18019468pgc.135.1532987957102; Mon, 30 Jul 2018 14:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532987957; cv=none; d=google.com; s=arc-20160816; b=qiv9D7Y+LGicNeocSDRJUqQPJDRRB6yuMsQ+NGDK6ZKLEBJlgD8pOOyL8aghbzF1w9 WOxGNSZA6ksqNI7LmWBtD2iPuCvc5pOr6ShPOu8oN/t89A4ILwHrFcWluqiD9eqU429h qdqWcKHD0jU/izL2pou/er0ZurNDoDqCmAUIKFaLBDoJ6xCFkO0eHnUs8UGpAuby8VTn +PfziiKvu6a7sGcVNfAby861MGUDT9LoozZF7C19BOiGEDo4cvBu7I+crA7EZ04C/3NJ wKuCP0XxwOWNl+7YSL3j53Yc9YzGF3HSQuOT+tjf+vC4w2aEH20SnENgGBOlFwNUQ9Ad ynew== 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:delivered-to :arc-authentication-results; bh=fTztRJ5RuzNMsGg3YzderzsoGgCVsR+MF6ot1qbubkA=; b=0EtlLNegwJ0jNA2oFBOEWhyufmk4DlMhc9tQSPNV26pI6qZbyJ2m6ShzFPPyctE6cQ rWkh6TbTqjsVNo7tUWihKtBRCIbm4ipbYcwfgiC9CSrW6Ad/CFYctrrEnZD/CKnN1+Fp kLptciYYKUwHuTg+ZlaUUrLN3klKisLOEFVNXOBlLimCjCk8mPHIpzDeOVIJklvQNfsa GUMvWB/SQNPeRwaOXA7ywK88NB2WzijZFC3FsG9wP4Ctfg8CWuYqJLydRfgezowJ1qx0 3nxfhR413PGTCLtS0SjGgrICjGrWBwq7vBzhyjyDeXx3nE+2tnjyoiEmALALd+3Hft5u R8Wg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id x12-v6si6429709pgj.175.2018.07.30.14.59.16; Mon, 30 Jul 2018 14:59:17 -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; 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 Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id F3AE078D5B; Mon, 30 Jul 2018 21:59:13 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail.hundeboll.net (mail.hundeboll.net [88.198.92.70]) by mail.openembedded.org (Postfix) with ESMTP id C82897473A for ; Mon, 30 Jul 2018 21:59:11 +0000 (UTC) Received: from xps.local (unknown [85.184.147.232]) by mail.hundeboll.net (Postfix) with ESMTPSA id DAF961C09C8; Mon, 30 Jul 2018 23:59:11 +0200 (CEST) From: =?utf-8?q?Martin_Hundeb=C3=B8ll?= To: openembedded-core@lists.openembedded.org Date: Mon, 30 Jul 2018 23:59:06 +0200 Message-Id: <20180730215906.30079-1-martin@geanix.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH][sumo] python2: Fix build with gcc8 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: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton (From OE-Core rev: 910f68c9c8dc26e12d28ef29e956af63d100f121) Signed-off-by: Ross Burton Signed-off-by: Khem Raj Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Martin Hundebøll --- .../python/python-native_2.7.14.bb | 1 + .../python/python/fix-gc-alignment.patch | 43 +++++++++++++++++++ meta/recipes-devtools/python/python_2.7.14.bb | 1 + 3 files changed, 45 insertions(+) create mode 100644 meta/recipes-devtools/python/python/fix-gc-alignment.patch diff --git a/meta/recipes-devtools/python/python-native_2.7.14.bb b/meta/recipes-devtools/python/python-native_2.7.14.bb index 7c491fa3e0..b822583c53 100644 --- a/meta/recipes-devtools/python/python-native_2.7.14.bb +++ b/meta/recipes-devtools/python/python-native_2.7.14.bb @@ -16,6 +16,7 @@ SRC_URI += "\ file://builddir.patch \ file://parallel-makeinst-create-bindir.patch \ file://revert_use_of_sysconfigdata.patch \ + file://fix-gc-alignment.patch \ " S = "${WORKDIR}/Python-${PV}" diff --git a/meta/recipes-devtools/python/python/fix-gc-alignment.patch b/meta/recipes-devtools/python/python/fix-gc-alignment.patch new file mode 100644 index 0000000000..b63cd08747 --- /dev/null +++ b/meta/recipes-devtools/python/python/fix-gc-alignment.patch @@ -0,0 +1,43 @@ +Upstream-Status: Submitted +Signed-off-by: Ross Burton + +Fix for over-aligned GC info +Patch by Florian Weimer + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1540316 +Upstream discussion: https://mail.python.org/pipermail/python-dev/2018-January/152000.html + +diff --git a/Include/objimpl.h b/Include/objimpl.h +index 55e83eced6..aa906144dc 100644 +--- a/Include/objimpl.h ++++ b/Include/objimpl.h +@@ -248,6 +248,18 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); + /* for source compatibility with 2.2 */ + #define _PyObject_GC_Del PyObject_GC_Del + ++/* Former over-aligned definition of PyGC_Head, used to compute the ++ size of the padding for the new version below. */ ++union _gc_head; ++union _gc_head_old { ++ struct { ++ union _gc_head *gc_next; ++ union _gc_head *gc_prev; ++ Py_ssize_t gc_refs; ++ } gc; ++ long double dummy; ++}; ++ + /* GC information is stored BEFORE the object structure. */ + typedef union _gc_head { + struct { +@@ -255,7 +267,8 @@ typedef union _gc_head { + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; +- long double dummy; /* force worst-case alignment */ ++ double dummy; /* force worst-case alignment */ ++ char dummy_padding[sizeof(union _gc_head_old)]; + } PyGC_Head; + + extern PyGC_Head *_PyGC_generation0; + \ No newline at end of file diff --git a/meta/recipes-devtools/python/python_2.7.14.bb b/meta/recipes-devtools/python/python_2.7.14.bb index 3044c3d363..b923b9237b 100644 --- a/meta/recipes-devtools/python/python_2.7.14.bb +++ b/meta/recipes-devtools/python/python_2.7.14.bb @@ -30,6 +30,7 @@ SRC_URI += "\ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ file://pass-missing-libraries-to-Extension-for-mul.patch \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ + file://fix-gc-alignment.patch \ " S = "${WORKDIR}/Python-${PV}"