Date: Wed, 24 Oct 2012 14:26:33 +0300 From: Volodymyr Kostyrko <c.kworr@gmail.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: freebsd-stable@freebsd.org Subject: Re: wine, gcc and clang with CPUTYPE Message-ID: <5087D069.7040700@gmail.com> In-Reply-To: <5087CA5D.2090407@FreeBSD.org> References: <50879F62.2010004@gmail.com> <5087BD71.9090002@FreeBSD.org> <5087C428.2020908@gmail.com> <5087CA5D.2090407@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 "<stdin>" # 1 "<stdin>" 1 # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 147 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "<stdin>" 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 "<stdin>" # 1 "<built-in>" # 1 "<command-line>" # 1 "<stdin>" # : | 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 "<stdin>" # 1 "<built-in>" # 1 "<command-line>" # 1 "<stdin>" 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5087D069.7040700>