Maarten Lankhorst m.b.lankhorst@gmail.com wrote:
Wine could build fine without c++, not sure why everything has to link against the c++ library as it will probably only be needed in winegcc. Also these compiling flags seem kind of agressive.
As I said, just quoted from my .profile, nothing special for wine. I just have -lstdc++ added there as some apps need it to compile with icc.
They are defined in include/winbase.h
That's the point. They are defined INCLUDING the asm code. That's why the asm code is already defined and not needed in the file itself.
just make sure icc is recognised there.
You mean: Make sure that icc doesn't get recognized as gcc. Well, I tried that. It doesn't work. This will still end in stuff like: /tmp/iccCwib4Das_.s:1499: Error: symbol `wine_get_fs' is already defined /tmp/iccCwib4Das_.s:1523: Error: symbol `wine_set_fs' is already defined
you can't just comment out those Interlocked functions, some applications might need them.
I only commented them out because they are defined TWICE. They are still there and thus the programs run. I tested running a few apps with this patch.
Plus the way you do it makes the code unreadable. I cannot test this as I don't have icc.
I'm sure someone on the list has icc.
On 4/21/07, Jonathan Schleifer js@h3c.de wrote:
I'm sure someone on the list has icc.
I had it installed before but its been a while. I never could get anything other than console apps to work, which I assumed could be do to a calling convention mismatch like Eric spoke about. I'd be interested in seeing bench marks of Wine compiled with gcc vs icc for tasks like Office Bench.
Thanks
"Steven Edwards" winehacker@gmail.com wrote:
I had it installed before but its been a while. I never could get anything other than console apps to work, which I assumed could be do to a calling convention mismatch like Eric spoke about. I'd be interested in seeing bench marks of Wine compiled with gcc vs icc for tasks like Office Bench.
I don't know which version you had, but it must be really old. GUI applications run with ICC. Gtk+ and QT. And of course ICC uses the C calling convention!
Jonathan Schleifer a écrit :
"Steven Edwards" winehacker@gmail.com wrote:
I had it installed before but its been a while. I never could get anything other than console apps to work, which I assumed could be do to a calling convention mismatch like Eric spoke about. I'd be interested in seeing bench marks of Wine compiled with gcc vs icc for tasks like Office Bench.
I don't know which version you had, but it must be really old. GUI applications run with ICC. Gtk+ and QT. And of course ICC uses the C calling convention!
the point isn't about using the C calling convention but the stdcall calling convention this seems to be fixed now icc still produces a warning for function pointers declared in structures with stdcall calling convention, but emits the correct assembly it seems now the major hurdle is that icc doesn't support the inline conventions of GCC (and is likely C99 compliant in that area) A+
Eric Pouech eric.pouech@wanadoo.fr wrote:
it seems now the major hurdle is that icc doesn't support the inline conventions of GCC (and is likely C99 compliant in that
ICC supports gcc inline asm. But it doesn't support defining a symbol twice.
Jonathan Schleifer js@h3c.de writes:
Eric Pouech eric.pouech@wanadoo.fr wrote:
it seems now the major hurdle is that icc doesn't support the inline conventions of GCC (and is likely C99 compliant in that
ICC supports gcc inline asm. But it doesn't support defining a symbol twice.
What version are you using? According to the man page this is supposed to be fixed in icc 9.1.
Alexandre Julliard a écrit :
Jonathan Schleifer js@h3c.de writes:
Eric Pouech eric.pouech@wanadoo.fr wrote:
it seems now the major hurdle is that icc doesn't support the inline conventions of GCC (and is likely C99 compliant in that
ICC supports gcc inline asm. But it doesn't support defining a symbol twice.
What version are you using? According to the man page this is supposed to be fixed in icc 9.1.
it's fixed for C functions, but not when the function is declared in assembly extern inline int foo(int a); extern inline int foo(int a) {return a + 1;} int foo(int a) {return a+1;} extern inline int ffo(int a); extern inline int ffo(int a) {return a + 1;} int ffo(int a) {return a+1;} __asm__( ".text\n\t" ".align 4\n\t" ".globl ffo\n\t" ".type ffo,@function\n" "ffo:\n\tret\n" "\n\t.previous" );
[eric@localhost wine-git]$ /opt2/intel/cc/9.1.047/bin/icc -c ~/icc2.c /home/eric/icc2.c(3): warning #290: function "foo" has already been defined int foo(int a) {return a+1;} ^
/home/eric/icc2.c(6): warning #290: function "ffo" has already been defined int ffo(int a) {return a+1;} ^
IPO: WARNING: File scope asm disables -ipo /home/eric/tmp/icc5IgzlBas_.s: Assembler messages: /home/eric/tmp/icc5IgzlBas_.s:40: Error: symbol `ffo' is already defined
(and embedding the asm code into a dummy function doesn't help either)
A+
Eric Pouech eric.pouech@wanadoo.fr writes:
it's fixed for C functions, but not when the function is declared in assembly extern inline int foo(int a); extern inline int foo(int a) {return a + 1;} int foo(int a) {return a+1;} extern inline int ffo(int a); extern inline int ffo(int a) {return a + 1;} int ffo(int a) {return a+1;} __asm__( ".text\n\t" ".align 4\n\t" ".globl ffo\n\t" ".type ffo,@function\n" "ffo:\n\tret\n" "\n\t.previous" );
[eric@localhost wine-git]$ /opt2/intel/cc/9.1.047/bin/icc -c ~/icc2.c /home/eric/icc2.c(3): warning #290: function "foo" has already been defined int foo(int a) {return a+1;} ^
/home/eric/icc2.c(6): warning #290: function "ffo" has already been defined int ffo(int a) {return a+1;} ^
IPO: WARNING: File scope asm disables -ipo /home/eric/tmp/icc5IgzlBas_.s: Assembler messages: /home/eric/tmp/icc5IgzlBas_.s:40: Error: symbol `ffo' is already defined
(and embedding the asm code into a dummy function doesn't help either)
But here you really have two non-inline definitions, one in C and one in assembly. What happens if you remove the C version?
Alexandre Julliard a écrit :
But here you really have two non-inline definitions, one in C and one in assembly. What happens if you remove the C version?
sorry, I redid my week end tests and went too fast the real "bad" case is:
/* case with 2 C declarations */ extern inline int foo(int a); extern inline int foo(int a) {return a + 1;} int tfoo(int b) { return foo(b) * b; } int foo(int a) {return a+1;}
/* case with C & ASM declarations */ extern inline int ffo(int a); extern inline int ffo(int a) {return a + 1;} int tffo(int f) { return ffo(f) * f; } __asm__( ".text\n\t" ".align 4\n\t" ".globl ffo\n\t" ".type ffo,@function\n" "ffo:\n\tret\n" "\n\t.previous" ); [eric@localhost wine-git]$ /opt2/intel/cc/9.1.047/bin/icc -c -O2 ~/icc2.c /home/eric/icc2.c(7): warning #290: function "foo" has already been defined int foo(int a) {return a+1;} ^
IPO: WARNING: File scope asm disables -ipo /home/eric/tmp/iccTSWeMaas_.s: Assembler messages: /home/eric/tmp/iccTSWeMaas_.s:86: Error: symbol `ffo' is already defined
we don't get the error if the inline function is not inlined changing the order of asm def & inline usage doesn't change the output either
A+
Alexandre Julliard julliard@winehq.org wrote:
What version are you using? According to the man page this is supposed to be fixed in icc 9.1.
I'm using ICC 9.1:
asgard:~$ icc --version icc (ICC) 9.1 20060706
Jonathan Schleifer a écrit :
Eric Pouech eric.pouech@wanadoo.fr wrote:
it seems now the major hurdle is that icc doesn't support the inline conventions of GCC (and is likely C99 compliant in that
ICC supports gcc inline asm. But it doesn't support defining a symbol twice.
I'm speaking of the inline keyword (especially about extern inline)
A+
Eric Pouech [mailto:eric.pouech@wanadoo.fr] wrote:
Jonathan Schleifer a écrit : ICC supports gcc inline asm. But it doesn't support defining a symbol twice.
I'm speaking of the inline keyword (especially about extern inline)
Same issue as at least Visual C 6.0 had for standard C code.
Rolf Kalbermatter