X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fautoconf.cfg;h=b0e3c536eba25d2bcd05e30a24f69f12a8d62815;hb=ab3b3f178718c0ae7b5738e987e350537574d2e6;hp=a919f99c78a76fa56dd3f71dd3cc73e0f50ff1ae;hpb=735eaea479ea7ed8624a4d525dbd994df24b1868;p=libucw.git diff --git a/lib/autoconf.cfg b/lib/autoconf.cfg index a919f99c..b0e3c536 100644 --- a/lib/autoconf.cfg +++ b/lib/autoconf.cfg @@ -163,7 +163,7 @@ if (Get("CPU_ARCH") eq "unknown") { ### Compiler and its Options ### # C flags: tell the compiler we're speaking C99, and disable common symbols -Set("CLANG" => "-std=gnu99 -fno-common -fPIC"); +Set("CLANG" => "-std=gnu99 -fno-common"); # C optimizations Set("COPT" => '-O2'); @@ -205,6 +205,10 @@ if ($gccver == 3000) { Append("CWARNS" => "-Wundef -Wredundant-decls -Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers"); Append("CWARNS_OFF" => "-Wno-pointer-sign"); Append("COPT" => "-finline-limit=5000 --param large-function-insns=5000 --param inline-unit-growth=200 --param large-function-growth=400"); +} elsif ($gccver == 4002) { + Append("CWARNS" => "-Wundef -Wredundant-decls -Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers"); + Append("CWARNS_OFF" => "-Wno-pointer-sign"); + Append("COPT" => "-finline-limit=5000 --param large-function-insns=5000 --param inline-unit-growth=200 --param large-function-growth=400 -fgnu89-inline"); } else { Warn "Don't know anything about this GCC version, using default switches.\n"; } @@ -255,6 +259,15 @@ Set("PARTMAP_IS_MMAP") if IsSet("CPU_64BIT_POINTERS"); # Option for lib/mempool.c Set("POOL_IS_MMAP"); +# Guess optimal bit width of the radix-sorter +if (Get("CPU_ARCH") eq "default" || Get("CPU_ARCH") =~ /^i[345]86$/) { + # This should be safe everywhere + Set("CONFIG_UCW_RADIX_SORTER_BITS" => 10); +} else { + # Use this on modern CPU's + Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12); +} + # If debugging memory allocations: #LIBS+=-lefence #CDEBUG+=-DDEBUG_DMALLOC