From owner-freebsd-stable@FreeBSD.ORG Wed Oct 24 11:26:38 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BB0760C; Wed, 24 Oct 2012 11:26:38 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 61CD38FC12; Wed, 24 Oct 2012 11:26:38 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so313960pad.13 for ; Wed, 24 Oct 2012 04:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6DxKy3ofAclhqGOKizeXkanS3EeE2YzFToOmNPg0p8s=; b=NwY109/xRwMmjyktfm2ad1DaH34s4HPOZRIgWgLq/7IxN72u3f3q327sFtBr6iQ8yE ORh+DP3IX5ZH9JPlwo+48iDurxwebGx66arWM9TzXYMKwgfreL4d8kf8cFiu173y+mxN Bk7Cta6DdY88sWuX8FMN2BcKuCcZGsnvkN3gUCVQGzPfYwhYhS/a3nnQLDyUf7amTArG WTev0c3M1o685G+iKeY1E0Pbr9UMburdHVKAHPZkm0aKh2Dg8tN7dtP7IwQ96ht5ngXv ugYZIlojilXwgx9MiK6kCPtMEcw69ATSZr+g7tPviNDvsoMwj6bvSks0Cl6TrVhbU0nZ ZbIQ== Received: by 10.68.233.230 with SMTP id tz6mr48946314pbc.36.1351077997780; Wed, 24 Oct 2012 04:26:37 -0700 (PDT) Received: from [192.168.1.131] (mau.donbass.com. [92.242.127.250]) by mx.google.com with ESMTPS id uh7sm9323446pbc.35.2012.10.24.04.26.35 (version=SSLv3 cipher=OTHER); Wed, 24 Oct 2012 04:26:37 -0700 (PDT) Message-ID: <5087D069.7040700@gmail.com> Date: Wed, 24 Oct 2012 14:26:33 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121015 Thunderbird/16.0.1 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: wine, gcc and clang with CPUTYPE References: <50879F62.2010004@gmail.com> <5087BD71.9090002@FreeBSD.org> <5087C428.2020908@gmail.com> <5087CA5D.2090407@FreeBSD.org> In-Reply-To: <5087CA5D.2090407@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 11:26:38 -0000 24.10.2012 14:00, Dimitry Andric wrote: >>> On the problematic athlons, can you please post the exact CPUIDs from >>> dmesg? If you have WITH_CLANG_EXTRAS enabled, please also post the >>> output of "opt -version". >> >> Oct 24 01:47:20 limbo kernel: CPU: AMD Athlon(tm) XP 2500+ (1833.95-MHz >> 686-class CPU) >> Oct 24 01:47:20 limbo kernel: Origin = "AuthenticAMD" Id = 0x6a0 >> Family = 0x6 Model = 0xa Stepping = 0 > > Ok, this CPU should be recognized by llvm as "athlon-xp". There is in > fact no need to compile all the WITH_CLANG_EXTRAS programs, I just > remembered. > > If you compile a sample program with -march=native -v, it should show > you the detected CPU in the verbose command line output, e.g.: > > $ clang -v -march=native -c /home/dim/src/example.c > FreeBSD clang version 3.2 (trunk 162107) 20120817 > Target: i386-unknown-freebsd10.0 > Thread model: posix > "/usr/bin/clang" -cc1 -triple i386-unknown-freebsd10.0 -emit-obj > -mrelax-all -disable-free -main-file-name example.c -mrelocation-model > static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu > core2 -momit-leaf-frame-pointer -v -coverage-file hw.o -resource-dir > /usr/bin/../lib/clang/3.2 -fmodule-cache-path > /home/dim/tmp/clang-module-cache -fdebug-compilation-dir /home/dim/src > -ferror-limit 19 -fmessage-length 265 -mstackrealign > -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o > hw.o -x c /home/dim/src/example.c > clang -cc1 version 3.2 based upon LLVM 3.2svn default target > i386-unknown-freebsd10.0 > ignoring nonexistent directory "/usr/bin/../lib/clang/3.2/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/include/clang/3.2 > /usr/include > End of search list. > > In my case, it uses "-target-cpu core2", as you can see. Yes, my CPU is detected as athlon-xp by clang: # : | clang -v -E -march=native - FreeBSD clang version 3.1 (branches/release_31 156863) 20120523 Target: i386-unknown-freebsd9.0 Thread model: posix "/usr/bin/clang" -cc1 -triple i386-unknown-freebsd9.0 -E -disable-free -main-file-name - -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu athlon-xp -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.1 -fmodule-cache-path /var/tmp/clang-module-cache -fdebug-compilation-dir /usr/src -ferror-limit 19 -fmessage-length 186 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=non-legacy -fdiagnostics-show-option -fcolor-diagnostics -o - -x c - clang -cc1 version 3.1 based upon LLVM 3.1 default target i386-unknown-freebsd9.0 ignoring nonexistent directory "/usr/bin/../lib/clang/3.1/include" #include "..." search starts here: #include <...> search starts here: /usr/include/clang/3.1 /usr/include End of search list. # 1 "" # 1 "" 1 # 1 "" 1 # 1 "" 3 # 147 "" 3 # 1 "" 1 # 1 "" 2 # 1 "" 2 And as athlon-4 by gcc: # : | gcc -v -E -march=native - Using built-in specs. Target: i386-undermydesk-freebsd Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 4.2.1 20070831 patched [FreeBSD] /usr/libexec/cc1 -E -quiet -v -D_LONGLONG - -march=athlon-4 -mtune=athlon-4 #include "..." search starts here: #include <...> search starts here: /usr/include/gcc/4.2 /usr/include End of search list. # 1 "" # 1 "" # 1 "" # 1 "" # : | gcc46 -v -E -march=native - Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc46 COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/lto-wrapper Target: i386-portbld-freebsd9.1 Configured with: ./../gcc-4.6.3/configure --disable-bootstrap --disable-nls --libdir=/usr/local/lib/gcc46 --libexecdir=/usr/local/libexec/gcc46 --program-suffix=46 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc46/include/c++/ --with-ld=/usr/local/bin/ld --with-libiconv-prefix=/usr/local --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --disable-libgcj --enable-languages=c,c++,objc,fortran --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc46 --build=i386-portbld-freebsd9.1 Thread model: posix gcc version 4.6.3 (FreeBSD Ports Collection) COLLECT_GCC_OPTIONS='-v' '-E' '-march=native' /usr/local/libexec/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/cc1 -E -quiet -v - -march=athlon-4 -mno-cx16 -mno-sahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=athlon ignoring nonexistent directory "/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/../../../../../i386-portbld-freebsd9.1/include" #include "..." search starts here: #include <...> search starts here: /usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/include /usr/local/include /usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/include-fixed /usr/include End of search list. # 1 "" # 1 "" # 1 "" # 1 "" COMPILER_PATH=/usr/local/libexec/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/:/usr/local/libexec/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/:/usr/local/libexec/gcc46/gcc/i386-portbld-freebsd9.1/:/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/:/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/:/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/../../../../../i386-portbld-freebsd9.1/bin/ LIBRARY_PATH=/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/:/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/../../../../../i386-portbld-freebsd9.1/lib/:/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-E' '-march=native' So I'll proceed to reproducing gcc errors. -- Sphinx of black quartz, judge my vow.