Re: Compiling winelib on SPARC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 4 Dec 2001, David Lee Lambert wrote:

> .configure   .. works fine
> make depend  .. works fine
> make         .. chokes as follows:

Changes I did to try to get it to compile...

(1) dlls/ntdll/Makefile:
(3) dlls/kernel/Makefile:
etc..
[I ended up making a patch to do this and running it on dlls/*/Makefile
with a one-line bash script.

The problem is that we have GNU's 'as' as /opt/bin/as,  but the installed
version of gcc doesn't call it for some reason.]

(near line 197)

.c.o:
	/opt/bin/gcc -S $(ALLCFLAGS) -o /tmp/temp-c.s $<
	/opt/bin/as -o $*.o /tmp/temp-c.s

(2) relay32/snoop.c: [function definition missing an argument]

(near line 390)

#else	/* !__i386__ */
void SNOOP_RegisterDLL(HMODULE hmod,LPCSTR name,
		       DWORD ordbase,DWORD nrofordinals) {
	if (!TRACE_ON(snoop)) return;
	FIXME("snooping works only on i386 for now.\n");
}

(4) dlls/msvcrt/math.c

complaints in functions 'div' and 'ldiv', fixed as follows:

unsigned int _controlfp(unsigned int newval, unsigned int mask)
{
#ifdef __i386__
  return _control87( newval, mask & ~_EM_DENORMAL );
#else
  FIXME("does nothing on SPARC");
  return 0;
#endif
}

#else
/*********************************************************************
 *		div (MSVCRT.@)
 * VERSION
 *	[!i386] Non-x86 can't run win32 apps so we don't need binary
compatibility
 */
MSVCRT_div_t MSVCRT_div(int num, int denom)
{
  div_t z;
  MSVCRT_div_t Z;
  z = div(num,denom);
  Z.quot = z.quot;
  Z.rem =  z.rem;
  return Z;
}
#endif /* ifdef __i386__ */

...

#else
/*********************************************************************
 *		ldiv (MSVCRT.@)
 * VERSION
 *	[!i386] Non-x86 can't run win32 apps so we don't need binary
compatibility
 */
MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
{
  ldiv_t z;
  MSVCRT_ldiv_t Z;
  z = ldiv(num,denom);
  Z.quot = z.quot;
  Z.rem =  z.rem;
  return Z;
}
#endif /* ifdef __i386__ */

(5) (not fixed yet) and,  finally,  an alignment error:

/opt/bin/as -o imagehlp.spec.o /tmp/temp-c.s
gcc -Wl,-G -Wl,-h,libimagehlp.so -Wl,-B,symbolic imagehlp.spec.o  access.o
debug.o imagehlp_main.o integrity.o internal.o modify.o symbol.o      -o
libimagehlp.so -L../../dlls  -L../../library -lwine  -lncurses -lsocket
-lnsl -lm  -ldl
Undefined                       first referenced
 symbol                             in file
main
/opt/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/crt1.o
ld: warning: Symbol referencing errors
ld: fatal: relocation error: R_SPARC_RELATIVE: file access.o: symbol
<unknown>: offset 0x1dcbe is non-aligned
ld: fatal: relocation error: R_SPARC_RELATIVE: file access.o: symbol
<unknown>: offset 0x1dcc2 is non-aligned
collect2: ld returned 1 exit status
make[1]: *** [libimagehlp.so] Error 1
make[1]: Leaving directory `/tmp/wine-20011108/dlls/imagehlp'
make: *** [imagehlp/libimagehlp.so] Error 2
<70 [lamber45@mulder]:/tmp/wine-20011108/dlls >

I'd say that Winelib isn't ready to use for porting Windows to the SPARC
yet,  but the fact that 99% of it compiles OK is impressive...

--
DLL







[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux