]> mj.ucw.cz Git - libucw.git/commitdiff
UCW::Configure::C: de-reference CPU_ARCH in COPT
authorMartin Mares <mj@ucw.cz>
Thu, 7 Oct 2010 14:58:43 +0000 (16:58 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 7 Oct 2010 14:58:43 +0000 (16:58 +0200)
Originally, when CONFIG_EXACT_CPU was enabled, COPT contained `-march=$(CPU_ARCH)',
which worked when it was used in a Makefile, but not when doing a test
compile in the configure script.

I changed it to dereference the variable immediately.

ucw/perl/UCW/Configure/C.pm

index c0d6b8c714ea3fff83e4b46059efb473f40ec2a2..84c20da00680e08c4eec9aa2f45674fba0a199eb 100644 (file)
@@ -188,7 +188,7 @@ Set("CLANG" => "-std=gnu99 -fno-common");
 # C optimizations
 Set("COPT" => '-O2');
 if (Get("CPU_ARCH") ne "unknown" && Get("CPU_ARCH") ne "default") {
-       Append("COPT", '-march=$(CPU_ARCH)');
+       Append("COPT", '-march=' . Get("CPU_ARCH"));
 }
 
 # C optimizations for highly exposed code