From patchwork Tue Apr 29 04:13:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Tsou X-Patchwork-Id: 343658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [213.95.27.120]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A6B7014008D for ; Tue, 29 Apr 2014 14:16:30 +1000 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WezSo-0007zg-0y; Tue, 29 Apr 2014 06:16:14 +0200 Received: from mail-qa0-f41.google.com ([209.85.216.41]) by ganesha.gnumonks.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from ) id 1WezPt-0007g2-VZ for openbsc@lists.osmocom.org; Tue, 29 Apr 2014 06:13:17 +0200 Received: by mail-qa0-f41.google.com with SMTP id j5so7312070qaq.0 for ; Mon, 28 Apr 2014 21:13:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=71zCXMebCYBa5YecAZGvG2EZLyocWXuNd2npzhEVVs0=; b=hoYEwxWzAH720MgJ0Llp8LLGUZi/y8iELIc4dUdpEXiKJ98mYGGxoHNJzN96f27FAj W2rWyDMNa5/5jB6gVRcVLm2bLG8yHr4ge0ABhxEKUyY97yJdMj2mfgSOO86waS4cTOHw 8yHkdo7PlOp8ywIf949k/+YvmMsNEor5ky5Imnz9l9HA6mVX13mkz5fIUb1CI6TvsZSc QNHO4i0tqQZ1l8kabQBQGlCDW2K5Y2TGCXgVA/sSNq2pzh6sqJGwRRqiwdWNIZ5P2LTZ YeCUm4XCVamFJqAzDOZpxUGAGem4t8S9G5LNYNjBkFwYc1290GUuk9fI0Ag7kOA6XYYx 937g== X-Gm-Message-State: ALoCoQmcE8Ft0Mq5jEzjpR9gDVV4w4ZVUF66189yQBmpIM1EZexXUXqdCv/3z+n9BdLR3Tve8W3q X-Received: by 10.224.74.131 with SMTP id u3mr38484610qaj.46.1398744792644; Mon, 28 Apr 2014 21:13:12 -0700 (PDT) Received: from localhost ([2601:8:1f00:292:96de:80ff:fe6f:b37e]) by mx.google.com with ESMTPSA id 11sm24923565qgv.20.2014.04.28.21.13.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Apr 2014 21:13:12 -0700 (PDT) Date: Tue, 29 Apr 2014 00:13:11 -0400 From: Thomas Tsou To: 246tnt@gmail.com, alexander.chemeris@gmail.com, openbsc@lists.osmocom.org Subject: [PATCH 3/4] build: Add x86 architecture type detection Message-ID: <20140429041311.GA5175@phenom.hsd1.va.comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: 1.1 (+) X-Spam-Report: SpamASsassin versoin 3.3.1 on ganesha.gnumonks.org summary: Content analysis details: (1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: configure.ac] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.41 listed in list.dnswl.org] X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org Detect x86 SSE availability for architecture specific convolutional decoding. Use the GNU autoconf macro AX_EXT to provide built time detection and set the following definitions. http://www.gnu.org/software/autoconf-archive/ax_ext.html HAVE_SSE3 HAVE_SSE4_1 AX_EXT is generally packaged with autoconf-archive and requires the following macro files. ax_check_compile_flag.m4 ax_ext.m4 ax_gcc_x86_avx_xgetbv.m4 ax_gcc_x86_cpuid.m4 Set -march=native for automatic compile flag setting. Combined, this allows automatic detection on x86 and pass-through support for non-x86 platforms (e.g. ARM). Signed-off-by: Thomas Tsou --- configure.ac | 1 + src/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index eaaab50..4b0c572 100644 --- a/configure.ac +++ b/configure.ac @@ -179,6 +179,7 @@ then AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi +AX_EXT AC_OUTPUT( libosmocore.pc diff --git a/src/Makefile.am b/src/Makefile.am index 0ecf4b0..c0b78a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=4:0:0 -AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include -march=native lib_LTLIBRARIES = libosmocore.la