[MPlayer-dev-eng] [PATCH] configure fix re: gcc 3.3.3 and Prescott CPUs
Sergey Svishchev
svs+mplayer at grep.ru
Sun Sep 17 13:24:58 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good day,
On NetBSD/i386 3.0.1, configure fails on a system with following CPU
(detected as "prescott" by configure); see attached configure.log.
vendor_id : GenuineIntel
cpu family : 15
model : 4
stepping : 1
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 cflsh dts acpi mmx fxsr sse sse2 ss ht tm pbe pni monitor ds_cpl cid xtpr
cpu MHz : 3006.812
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
gcc 3.3.3 doesn't support -mcpu=prescott and -mcpu=nocona, so configure
should fall back to -mcpu=pentium4 (see attached patch).
- --
Sergey Svishchev
-----BEGIN PGP SIGNATURE-----
Comment: ''
iD8DBQFFDTBk3P+wmuUns7URAud0AKCJGpqFjw1GvW4LnXQeXVjtbEFhuwCfSuGQ
NIhlQ1ZN7Wy757+3/ANHjIg=
=ySAY
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: configure
===================================================================
--- configure (revision 19866)
+++ configure (working copy)
@@ -1008,6 +1008,9 @@
fi
fi
fi
+ if test "$proc" = "nocona" || test "$proc" = "prescott" ; then
+ cc_check -march=$proc $cpuopt=$proc || proc=pentium4
+ fi
if test "$proc" = "pentium4" || test "$proc" = "pentium-m" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon" || test "$proc" = "c3-2"; then
cc_check -march=$proc $cpuopt=$proc || proc=i686
fi
-------------- next part --------------
============ Checking for cc version ============
Result is: 3.3.3, ok
##########################################
============ Checking for host cc ============
Result is: cc
##########################################
============ Checking for cross compilation ============
int main() { return 0; }
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: no
##########################################
============ Checking for CPU vendor ============
Result is: GenuineIntel (15:4:1)
##########################################
============ Checking for CPU type ============
Result is: Intel (686-class)
##########################################
============ Checking for GCC & CPU optimization abilities ============
Result is: prescott
##########################################
============ Checking for kernel support of mmx ============
#include <signal.h>
void catch() { exit(1); }
int main(void){
signal(SIGILL, catch);
__asm__ __volatile__ ("emms":::"memory");return(0);
}
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: yes
##########################################
============ Checking for kernel support of mmxext ============
#include <signal.h>
void catch() { exit(1); }
int main(void){
signal(SIGILL, catch);
__asm__ __volatile__ ("sfence":::"memory");return(0);
}
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: yes
##########################################
============ Checking for kernel support of sse ============
#include <signal.h>
void catch() { exit(1); }
int main(void){
signal(SIGILL, catch);
__asm__ __volatile__ ("xorps %%xmm0, %%xmm0":::"memory");return(0);
}
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: yes
##########################################
============ Checking for kernel support of sse2 ============
#include <signal.h>
void catch() { exit(1); }
int main(void){
signal(SIGILL, catch);
__asm__ __volatile__ ("xorpd %%xmm0, %%xmm0":::"memory");return(0);
}
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: yes
##########################################
============ Checking for mtrr support ============
Result is: yes
##########################################
============ Checking for xmmintrin.h ============
#include <xmmintrin.h>
int main() { _mm_sfence(); return 0; }
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -msse
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: yes
##########################################
============ Checking for assembler support of -pipe option ============
int main(void) { return 0; }
cc -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -pipe
ldd /tmp/mplayer-conf-20875-9942.o
/tmp/mplayer-conf-20875-9942.o:
-lc.12 => /usr/lib/libc.so.12
Result is: yes
##########################################
============ Checking for assembler (as 2.15) ============
Result is: ok
##########################################
============ Checking for .align is a power of two ============
main() { asm (".align 3"); }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for MPlayer binary name ============
Result is: mplayer
##########################################
============ Checking for awk ============
configure: line 2442: mawk: command not found
Result is: gawk
##########################################
============ Checking for extra headers ============
Result is: none
##########################################
============ Checking for extra libs ============
Result is: none
##########################################
============ Checking for -lposix ============
int main(void) { return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lposix
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for -lm ============
int main(void) { return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lm
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for langinfo ============
#include <langinfo.h>
int main(void) { nl_langinfo(CODESET); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for language ============
Result is: using en (man pages: en)
##########################################
============ Checking for enable sighandler ============
Result is: yes
##########################################
============ Checking for runtime cpudetection ============
Result is: no
##########################################
============ Checking for restrict keyword ============
void foo(char * restrict p); int main(){}
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
void foo(char * __restrict p); int main(){}
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
void foo(char * __restrict__ p); int main(){}
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: none
##########################################
============ Checking for __builtin_expect ============
int foo (int a) {
a = __builtin_expect (a, 10);
return a == 10 ? 0 : 1;
}
int main() { return foo(10) && foo(0); }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for kstat ============
#include <kstat.h>
int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lkstat
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for posix4 ============
#include <time.h>
int main(void) { (void) nanosleep(0, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lposix4
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for lrintf ============
#include <math.h>
int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -D_GNU_SOURCE
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for round ============
#include <math.h>
int main(void) { (void) round(0.0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for nanosleep ============
#include <time.h>
int main(void) { (void) nanosleep(0, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for socklib ============
#include <netdb.h>
#include <sys/socket.h>
int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lsocket -lbind
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <netdb.h>
#include <sys/socket.h>
int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lsocket -ldnet
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <netdb.h>
#include <sys/socket.h>
int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lsocket -lnsl
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <netdb.h>
#include <sys/socket.h>
int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lnsl
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <netdb.h>
#include <sys/socket.h>
int main(void) { (void) gethostbyname(0); (void) socket(AF_INET, SOCK_STREAM, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lsocket
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <winsock2.h>
int main(void) { (void) gethostbyname(0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lws2_32
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for inet_pton() ============
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_pton(0, 0, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_pton(0, 0, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lresolv
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no (trying inet_aton next)
##########################################
============ Checking for inet_aton() ============
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_aton(0, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int main(void) { (void) inet_aton(0, 0); return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c -lresolv
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no (network support disabled)
##########################################
============ Checking for inttypes.h (required) ============
#include <inttypes.h>
int main(void) { return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
Result is: no
##########################################
============ Checking for bitypes.h (inttypes.h predecessor) ============
#include <sys/bitypes.h>
int main(void) { return 0; }
cc -O4 -march=prescott -mcpu=prescott -pipe -ffast-math -fomit-frame-pointer -o /tmp/mplayer-conf-20875-9942.o /tmp/mplayer-conf-30451-9942.c
cc1: error: bad value (prescott) for -march= switch
cc1: error: bad value (prescott) for -mcpu= switch
ldd /tmp/mplayer-conf-20875-9942.o
ldd: /tmp/mplayer-conf-20875-9942.o: No such file or directory
More information about the MPlayer-dev-eng
mailing list