From patchwork Tue May 13 15:51:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 30093 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 92F6520446 for ; Tue, 13 May 2014 15:58:54 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id i57sf1685194yha.8 for ; Tue, 13 May 2014 08:58:54 -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:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=211pUtZqgGbi6muoWHVgigJnuQlH17Yhhzw1XmjM7iw=; b=D/+RRRmmhnr1Y5wXmcLwToSx4D/13hXJafIcRvRGaoh+K5VS4VOvSkNiWWRJE2tnxG m0TDO7mUIbySfIfyINj1K0710NNt9dTgUeCU1Q0hKymNj+5iHN18YD5hOFbJJn11Iskx Gs5kgsHgH2bvayTHPCDXiEDqeI80UBAjYm1UBljviMKEnv2xHez1E/Q1Ck0GxfADJ+29 7jfKllQqfE9LVYZZOFAmtjOyfB9xkz1pKQ2ptzl2ZQZnlZxY0H75xtDsDE0PK/W9tR6e pIFVImXBNCO0+dznp+KuO2NKz3T7kh23OaeK71fbnMuB0ypGknBBhm6o1bcNyCn4TOTj Bt2Q== X-Gm-Message-State: ALoCoQkzZlz47RB1XuFDNWHYYs6Xhwz+8kYpiUJDqcQvrXv/utPVfn6eBd3PWbYLryJ9Ju+ob8KO X-Received: by 10.236.11.194 with SMTP id 42mr14410714yhx.49.1399996734360; Tue, 13 May 2014 08:58:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.51 with SMTP id 48ls903791qgu.23.gmail; Tue, 13 May 2014 08:58:54 -0700 (PDT) X-Received: by 10.221.20.199 with SMTP id qp7mr29672323vcb.24.1399996734224; Tue, 13 May 2014 08:58:54 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ej2si2719672veb.203.2014.05.13.08.58.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 08:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hr9so717300vcb.31 for ; Tue, 13 May 2014 08:58:54 -0700 (PDT) X-Received: by 10.220.7.131 with SMTP id d3mr963978vcd.45.1399996734121; Tue, 13 May 2014 08:58:54 -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.220.221.72 with SMTP id ib8csp162591vcb; Tue, 13 May 2014 08:58:53 -0700 (PDT) X-Received: by 10.140.94.39 with SMTP id f36mr46823940qge.64.1399996288086; Tue, 13 May 2014 08:51:28 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id e7si7949008qai.272.2014.05.13.08.51.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 13 May 2014 08:51:28 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WkEyS-0003CL-9e; Tue, 13 May 2014 15:50:36 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WkEyM-0003CG-8q for lng-odp@lists.linaro.org; Tue, 13 May 2014 15:50:30 +0000 Received: by mail-lb0-f169.google.com with SMTP id s7so447515lbd.0 for ; Tue, 13 May 2014 08:51:14 -0700 (PDT) X-Received: by 10.152.4.227 with SMTP id n3mr4090089lan.16.1399996274671; Tue, 13 May 2014 08:51:14 -0700 (PDT) Received: from maxim-lap.localhost.onion ([92.39.133.154]) by mx.google.com with ESMTPSA id a2sm17258948lbz.25.2014.05.13.08.51.13 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 08:51:13 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 13 May 2014 19:51:08 +0400 Message-Id: <1399996268-13125-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [APPS/PATCH] cross compilation support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org 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.220.172 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 Signed-off-by: Maxim Uvarov --- Makefile | 4 +++- libpcap/Makefile | 8 +++++--- openvpn/Makefile | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index cab82f4..78e9320 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ all: openvpn libpcap +export $(CROSS_COMPILE) + libpcap: odp make -C libpcap ODP_DIR=$(PWD)/odp.git @@ -12,7 +14,7 @@ odp: if [ ! -d odp.git ]; \ then git clone http://git.linaro.org/git/lng/odp.git odp.git; \ fi - cd odp.git; make libs_install CFLAGS="-fPIC" + cd odp.git; make libs_install CFLAGS="-fPIC" CC=$(CROSS_COMPILE)-gcc distclean: rm -rf odp.git diff --git a/libpcap/Makefile b/libpcap/Makefile index 5e47b4a..a00f5b7 100644 --- a/libpcap/Makefile +++ b/libpcap/Makefile @@ -15,6 +15,8 @@ WIRESHARK_VERSION=wireshark-1.8.9 ODP_DIR ?= $(PWD)/../odp.git +HOST ?= `$(CROSS_COMPILE)-gcc -dumpmachine` + .PHONY: all all: libpcap tcpdump @@ -32,7 +34,7 @@ libpcap: get_libpcap cd $(LIBPCAP_DIR) \ && git checkout $(LIBPCAP_VERSION) \ && git am ../patches/*.patch \ - && ./configure --with-odp=$(ODP_DIR) --libdir=/usr/lib + && ac_cv_linux_vers=3.2.51 ./configure --with-pcap=linux --with-odp=$(ODP_DIR) --libdir=/usr/lib --host=$(HOST) $(MAKE) -C $(LIBPCAP_DIR) .PHONY: get_libpcap @@ -54,7 +56,7 @@ clean_libpcap: tcpdump: get_tcpdump libpcap cd $(TCPDUMP_DIR) \ && git checkout $(TCPDUMP_VERSION) \ - && ./configure LIBS="-lrt" + && ac_cv_linux_vers=3.2.51 ./configure LIBS="-lrt" --host=$(HOST) $(MAKE) -C $(TCPDUMP_DIR) .PHONY: get_tcpdump @@ -76,7 +78,7 @@ clean_tcpdump: wireshark: get_wireshark libpcap cd $(WIRESHARK_DIR) \ && git checkout $(WIRESHARK_VERSION) \ - && ./autogen.sh && ./configure + && ./autogen.sh && ./configure --host=$(HOST) $(MAKE) -C $(WIRESHARK_DIR) .PHONY: get_wireshark diff --git a/openvpn/Makefile b/openvpn/Makefile index 68e4348..5117490 100644 --- a/openvpn/Makefile +++ b/openvpn/Makefile @@ -9,6 +9,8 @@ OPENVPN_VERSION=cd6555e0159987ef264789f4976053ce2aa5fc20 ODP_DIR ?= $(PWD)/../odp.git +HOST ?= `$(CROSS_COMPILE)-gcc -dumpmachine` + .PHONY: all all: openvpn odp_ipcd @@ -22,14 +24,12 @@ openvpn: git clone $(OPENVPN_REPO) $(OPENVPN_DIR);\ else\ cd $(OPENVPN_DIR);\ - git fetch --all;\ fi - cd $(OPENVPN_DIR) \ && git checkout $(OPENVPN_VERSION) \ && git am ../patches/*.patch \ && autoreconf -i -v -f \ - && ./configure + && ./configure --host=$(HOST) --disable-snappy --disable-lzo make -C $(OPENVPN_DIR) .PHONY: clean_openvpn