From patchwork Wed Aug 5 16:04:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 51960 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 61896229FD for ; Wed, 5 Aug 2015 16:05:14 +0000 (UTC) Received: by lbbyj8 with SMTP id yj8sf14673551lbb.3 for ; Wed, 05 Aug 2015 09:05:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=DP3CXUDsyA27I75uPQCsWGzneWdrsBe92WWVFqA+J0s=; b=Ngud8/P/zeeQKRE5m1obd7VJWHhZJqu+MLES7QWfoDueLDAf9XC36Jc4WWYAynQWso jSpogeDOMWlW3e/vp7E5zAlqn5zNyDFI6DoHso7KsWn1Zt7J+ozLu6v112B4Wj0i3jsR 9o38L10yHo6WjYhbUa8SsbDwAnM20tyTlxlInyxV+5V2aI1Lx6hoHVZRrBYZCtOMCFYu KuVrlEnXd0FXlTBAryxDBQdAlELFOgJfB+CchJqI5e1lZ8eoE+iHNWxxGH99nrcaO7F2 Hyult9PMeXmccz8cUId2lwqoYP3sitl68ZAPtTPdWvXLUbsPyoQ9phgivA4AwcRieQFa zWkQ== X-Gm-Message-State: ALoCoQkTYBL6B021P1i+YGqXaGAIZNx18H9ION9hcqpVLG1Kn9hA7Fziz0xzuA1J2VlkCQxI5olH X-Received: by 10.112.189.131 with SMTP id gi3mr2931183lbc.6.1438790713356; Wed, 05 Aug 2015 09:05:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.228 with SMTP id bb4ls189401lab.88.gmail; Wed, 05 Aug 2015 09:05:13 -0700 (PDT) X-Received: by 10.112.63.137 with SMTP id g9mr9939866lbs.121.1438790713207; Wed, 05 Aug 2015 09:05:13 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id wp4si2411278lbb.116.2015.08.05.09.05.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 09:05:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labow3 with SMTP id ow3so31991154lab.1 for ; Wed, 05 Aug 2015 09:05:13 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr9829419lbc.112.1438790713065; Wed, 05 Aug 2015 09:05:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp453604lba; Wed, 5 Aug 2015 09:05:11 -0700 (PDT) X-Received: by 10.107.136.160 with SMTP id s32mr10531087ioi.174.1438790711338; Wed, 05 Aug 2015 09:05:11 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f137si2822798ioe.19.2015.08.05.09.05.07; Wed, 05 Aug 2015 09:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 5050C61B7D; Wed, 5 Aug 2015 16:05:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5CA3561F28; Wed, 5 Aug 2015 16:04:32 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9727361FC5; Wed, 5 Aug 2015 16:04:16 +0000 (UTC) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by lists.linaro.org (Postfix) with ESMTPS id 3297961E75 for ; Wed, 5 Aug 2015 16:04:15 +0000 (UTC) Received: by wibxm9 with SMTP id xm9so214858051wib.0 for ; Wed, 05 Aug 2015 09:04:14 -0700 (PDT) X-Received: by 10.194.133.73 with SMTP id pa9mr21269956wjb.148.1438790654381; Wed, 05 Aug 2015 09:04:14 -0700 (PDT) Received: from localhost.localdomain ([87.120.178.39]) by smtp.gmail.com with ESMTPSA id y15sm5457452wib.7.2015.08.05.09.04.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Aug 2015 09:04:13 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 5 Aug 2015 19:04:05 +0300 Message-Id: <1438790646-5670-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438790646-5670-1-git-send-email-maxim.uvarov@linaro.org> References: <1438790646-5670-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH 1/2] linux-generic: improve compilation of arch code X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Compile all arch depandant code to library, then link that library to main libodp.a Signed-off-by: Maxim Uvarov --- platform/linux-generic/Makefile.am | 6 ++++-- platform/linux-generic/arch/linux/Makefile.am | 5 +++++ platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ platform/linux-generic/arch/x86/Makefile.am | 5 +++++ platform/linux-generic/m4/configure.m4 | 4 +++- 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 platform/linux-generic/arch/linux/Makefile.am create mode 100644 platform/linux-generic/arch/mips64/Makefile.am create mode 100644 platform/linux-generic/arch/x86/Makefile.am diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 34ceb20..5b0b181 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ odp_time.c \ odp_timer.c \ odp_version.c \ - odp_weak.c \ - arch/@ARCH@/odp_time.c + odp_weak.c +SUBDIRS= @platform_with_arch@ +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la diff --git a/platform/linux-generic/arch/linux/Makefile.am b/platform/linux-generic/arch/linux/Makefile.am new file mode 100644 index 0000000..5539e3a --- /dev/null +++ b/platform/linux-generic/arch/linux/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS += -I$(srcdir)/../../include +AM_CFLAGS += -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libodparch.la +libodparch_la_SOURCES = odp_time.c diff --git a/platform/linux-generic/arch/mips64/Makefile.am b/platform/linux-generic/arch/mips64/Makefile.am new file mode 100644 index 0000000..5539e3a --- /dev/null +++ b/platform/linux-generic/arch/mips64/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS += -I$(srcdir)/../../include +AM_CFLAGS += -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libodparch.la +libodparch_la_SOURCES = odp_time.c diff --git a/platform/linux-generic/arch/x86/Makefile.am b/platform/linux-generic/arch/x86/Makefile.am new file mode 100644 index 0000000..5539e3a --- /dev/null +++ b/platform/linux-generic/arch/x86/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS += -I$(srcdir)/../../include +AM_CFLAGS += -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libodparch.la +libodparch_la_SOURCES = odp_time.c diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 55124f1..697465a 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -16,4 +16,6 @@ AC_LINK_IFELSE( echo "Use newer version. For gcc > 4.7.0" exit -1) -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) +AC_CONFIG_FILES([platform/linux-generic/test/Makefile + platform/linux-generic/arch/${ARCH}/Makefile])