|
|
Choosing A Webhost: |
Re: libspeex/SSE Intrinsics with GCC 3.3.x: msg#00031audio.compression.speex.devel
On Fri, Apr 02, 2004 at 12:33:13AM -0500, Jean-Marc Valin wrote: > Do you have any sample code for that? Also, how do you tell autoconf to > append '-msse' without running into problems when CFLAGS is not set (and > usually defaults to -g -O2, but not always). Example patch attached. It only tries if the use passes --enable-sse; testing by target arch as Aron suggested is another reasonable approach. However, the -msse cflag test fails on powerpc-unknown-linux-gnu so it might be safe just to switch the default value of the --enable-sse arg. AC_PROG_CC tries to find a compiler and then checks whether it's actually gcc. If so it automatically adds '-g -O2' to the CFLAGS. That's the origin of those two flags. The patch includes an explicit call to AC_PROG_CC since it uses its cache results; however AM_PROG_LIBTOOL and possibly other macros will call it if it's not been called explicitly when they're invoked.) There are some options here; the -msse check could be conditional on gcc being detected, the way -O3 is. These flags are pretty much never portable, but it probably doesn't hurt to try. The patch as written results in CFLAGS="-g -O2 -O3 -msee" if it succeeds. You can avoid the duplicate optimization levels by saying something like: if test $ac_cv_prog_gcc = yes; then dnl remove any existing gcc -On flag oldcflags=`echo $old_cflags | sed -e 's/-O.//'` OPT_CFLAGS="$OPT_CFLAGS -O3" fi OPT_CFLAGS="$OPT_CFLAGS -msse" instead. So perhaps not so simple, but writing expert systems in sh never is. -r
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Problem compiling speex 1.1.4, Jean-Marc Valin |
|---|---|
| Next by Date: | Re: libspeex/SSE Intrinsics with GCC 3.3.x, Steve Kann |
| Previous by Thread: | Re: libspeex/SSE Intrinsics with GCC 3.3.x, Jean-Marc Valin |
| Next by Thread: | Re: libspeex/SSE Intrinsics with GCC 3.3.x, Steve Kann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |