From patchwork Mon Aug 27 06:51:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 145157 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3852180ljw; Sun, 26 Aug 2018 23:51:38 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZPYO1KdXDEvvPfSkM2SeCWaMV8iaZFPnJEVR4XZOCquaN4k+BWpVSQEIQtwTQHx+x7CYel X-Received: by 2002:a17:902:aa45:: with SMTP id c5-v6mr11554259plr.329.1535352698616; Sun, 26 Aug 2018 23:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535352698; cv=none; d=google.com; s=arc-20160816; b=oNCsyurLNxHCV3I73/eIPsunYl9sURWj6Sv4G/WXAGxlZZeWNJtGYfR0iBF1Btrzb2 Xs1FicFb4A337vIetW/ebhKjTcGihqiFevkPet6rj8jSqVN83VU4XA74Hc+rYIEz0CrX TvsIkH7toVnM3si+OmW9oYSsqLmLNg1x4EupZDz28QvV2QrfgN7P+VAKOuKXctN2S7Jn uAxi80bmjWdb5UJEmx4GwM25dX+EUmSrWTvDglU/M77GNASG8krsl2Jr9iHewX920aU0 Fsrf9fe0ntb1d+9MaDbcojgnaRKkmWm2y/SZsA1ArQKJdeHgkW0+pMTy3fHiUTeezBuE 0sTg== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=6EmJN1SV1Z/ECTJP3I3Sak2JY08MIdxaTk4cS/EjPao=; b=A2pKueursZxMjajtENFnB6VSodWGiOcNsJEDTjwcc2uIFNbJeUPB8Kgh7keb/jTz8j E04bCn+yx/5QWFrW7eqY2Th4ly6mcnNYZZnCm8Qx8IqpLgPNKSBVkii0Z2HQXzc5mfUb RmTUy+cpkU9IMPao1C0UBczFKJPyJPhugDaJbVbY/XU+qCuT4xeY9tDBCsUMTdUp1owO BIXtKy8jJa0mywp667m+Ppiiluv7tjl97bU0LWsbkDiR6u/QD78IMcieDOT2WVK5aHf/ PIaCx4e2lgd9EqX6KDnwziM64FKbMQSGYYZhthdSnZGb07OhCPqnm0t2/Pif/d2or/Tn jdXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=qFVDR+oQ; 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=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 b18-v6si1307046pgb.612.2018.08.26.23.51.38; Sun, 26 Aug 2018 23:51:38 -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=qFVDR+oQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 6CA4D79368; Mon, 27 Aug 2018 06:51:36 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mail.openembedded.org (Postfix) with ESMTP id 20BCF78741 for ; Mon, 27 Aug 2018 06:51:35 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id 60-v6so3716612ple.0 for ; Sun, 26 Aug 2018 23:51:36 -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:in-reply-to:references; bh=G27y9opvAnVJrtKfskCz0TDKWfwTBxfYX20OfxTeEL8=; b=qFVDR+oQO9IejYqVKfSu5VDW8wdUNkLvfDRhTUbuypA14lXYuKSYq5OxBVmiT27FKA IHplbLXs4Jwj4oS+/bRh+faOWsEYGrsdADSwM3aY1lgqPzQxIVvbuEn056kjYK0L4kow 2d0aumSDqYgFMG60uMfoMyZf6qkb1GdQnrHFYDK/b+ny7jSUru0myJjsMNnoa3nbSVQc 2V/XL5E721lKiukeywWZJ1L0nO6QiwgsXEaohfiVYjjr6ZSjFjivL3h0LYT38hNDT5us D/9R8RcUOXHOyNWBh/3pf+Ct5fPJB1iguRWDNyOdpT2pGv0U04Rk5p3Es8LY0Wjg9v+k fIFw== 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=G27y9opvAnVJrtKfskCz0TDKWfwTBxfYX20OfxTeEL8=; b=dBXF4IjsAkw9BkSPFO6LTNsL19R9pnZiNpYbwOhymqaf+rJ0JCmGftBWapsODniNBG v4j7YlTi7wX07vbbKOP+2zWrvVZFxfrcpsyzVufRRwDtiiMqHVnc4R470O2qXEvT6CXz ByWvJW5436Vf+MhMHFASroojAOG9TP3L/83OkC5cVZOcjzZcwUdUJ+cQoMpz8l2PGOU8 LeOIQKUCrATmeOBf7+fEhqmeqnyNpz5XPDFwcGBqqy+2Bkby5UhgB7fEr2ReVCjwQcMu 2ig+kFeRpxao+vo1IGg6Dq+VH0Xs8OlxfT4YjZpxKK62LAY8Su21/5X9mdPhO8pxBc6M 2Wgg== X-Gm-Message-State: APzg51BUtmaJ95Lu/XkIrBw3U348fBP0Yf0xOIoPk9u5tp237s67G8EO orhx/l9c2RZkHpczhwDfuqj4gvN6 X-Received: by 2002:a17:902:bd84:: with SMTP id q4-v6mr11867768pls.145.1535352695958; Sun, 26 Aug 2018 23:51:35 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::4add]) by smtp.gmail.com with ESMTPSA id l84-v6sm27437315pfg.3.2018.08.26.23.51.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Aug 2018 23:51:35 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 26 Aug 2018 23:51:25 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [OE-core] [PATCH 1/3] distutils-common-base.bbclass: Define commonly used compiler variables 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 This is inspired from https://github.com/python/cpython/blob/master/configure.ac Helps cross compiling python C modules in some cases where they do not respect normal CFLAGS Errors like using gcc to link when compiler is clang is fixed Signed-off-by: Khem Raj --- meta/classes/distutils-common-base.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.18.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/distutils-common-base.bbclass b/meta/classes/distutils-common-base.bbclass index 824a1b68b1..94b5fd426d 100644 --- a/meta/classes/distutils-common-base.bbclass +++ b/meta/classes/distutils-common-base.bbclass @@ -1,6 +1,18 @@ export STAGING_INCDIR export STAGING_LIBDIR +# LDSHARED is the ld *command* used to create shared library +export LDSHARED = "${CCLD} -shared" +# LDXXSHARED is the ld *command* used to create shared library of C++ +# objects +export LDCXXSHARED = "${CXX} -shared" +# CCSHARED are the C *flags* used to create objects to go into a shared +# library (module) +export CCSHARED = "-fPIC -DPIC" +# LINKFORSHARED are the flags passed to the $(CC) command that links +# the python executable +export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic" + FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" FILES_${PN}-staticdev += "\