mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fix quirks for building PPC on windows.
svn path=/trunk/; revision=29591
This commit is contained in:
parent
001703300c
commit
3d34c28eb4
5 changed files with 24 additions and 14 deletions
|
@ -286,7 +286,7 @@ int strcasecmp(const char *str1, const char *str2);
|
|||
# endif
|
||||
#endif /* !defined(HAVE_STRCASECMP) */
|
||||
|
||||
#ifndef HAVE_USLEEP
|
||||
#if !defined(HAVE_USLEEP) && !defined(__CYGWIN__)
|
||||
int usleep (unsigned int useconds);
|
||||
#endif /* !defined(HAVE_USLEEP) */
|
||||
|
||||
|
|
|
@ -2,32 +2,36 @@ O=$(INTERMEDIATE)/lib/ppcmmu
|
|||
S=lib/ppcmmu
|
||||
CC=powerpc-unknown-elf-gcc -I$T/include/reactos/ppcmmu
|
||||
AR=powerpc-unknown-elf-ar
|
||||
CFLAGS=-Iinclude/reactos/libs -Iinclude/crt -Iinclude/reactos -D__cdecl__=
|
||||
OBJCOPY=powerpc-unknown-elf-objcopy
|
||||
LDSCRIPT=-Wl,-T,$S/ldscript
|
||||
PPCMMU_TARGETS=$O/libppcmmu_code.a
|
||||
MMUOBJECT_OBJS=$O/devint.o $O/mmuobject.o $O/mmuutil_object.o $O/mmutest.o $O/gdblib.o
|
||||
|
||||
$O/mmuutil_object.o: $S/mmuutil.c | $O
|
||||
$(CC) -Iinclude/reactos/libs -g -c -o $@ $S/mmuutil.c
|
||||
mkdir_ppcmmu:
|
||||
-mkdir -p $O
|
||||
|
||||
$O/libppcmmu_code.a: $(MMUOBJECT_OBJS) | $O
|
||||
$O/mmuutil_object.o: $S/mmuutil.c | mkdir_ppcmmu
|
||||
$(CC) $(CFLAGS) -g -c -o $@ $S/mmuutil.c
|
||||
|
||||
$O/libppcmmu_code.a: $(MMUOBJECT_OBJS)
|
||||
$(CC) -Wl,-N -nostartfiles -nostdlib -o $O/mmuobject -Ttext=0x10000 $(LDSCRIPT) -Wl,-u,mmumain -Wl,-u,data_miss_start -Wl,-u,data_miss_end $(MMUOBJECT_OBJS)
|
||||
$(OBJCOPY) -O binary $O/mmuobject mmucode
|
||||
$(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common mmucode $O/mmucode.o
|
||||
mkdir -p `dirname $@`
|
||||
$(AR) cr $@ $O/mmucode.o
|
||||
|
||||
$O/gdblib.o: $S/gdblib.c | $O
|
||||
$(CC) -Iinclude/reactos -Iinclude/reactos/libs -g -c -o $@ $S/gdblib.c
|
||||
$O/gdblib.o: $S/gdblib.c | mkdir_ppcmmu
|
||||
$(CC) $(CFLAGS) -g -c -o $@ $S/gdblib.c
|
||||
|
||||
$O/devint.o: $S/devint.s | $O
|
||||
$(CC) -Iinclude/reactos -Iinclude/reactos/libs -g -c -o $@ $S/devint.s
|
||||
$O/devint.o: $S/devint.s | mkdir_ppcmmu
|
||||
$(CC) $(CFLAGS) -g -c -o $@ $S/devint.s
|
||||
|
||||
$O/mmuobject.o: $S/mmuobject.c $S/mmuobject.h | $O
|
||||
$(CC) -Iinclude/reactos -Iinclude/reactos/libs -g -c -o $@ $S/mmuobject.c
|
||||
$O/mmuobject.o: $S/mmuobject.c $S/mmuobject.h | mkdir_ppcmmu
|
||||
$(CC) $(CFLAGS) -g -c -o $@ $S/mmuobject.c
|
||||
|
||||
$O/mmutest.o: $S/mmutest.c $S/mmuobject.h | $O
|
||||
$(CC) -Iinclude/reactos/libs -g -c -o $@ $S/mmutest.c
|
||||
$O/mmutest.o: $S/mmutest.c $S/mmuobject.h | mkdir_ppcmmu
|
||||
$(CC) $(CFLAGS) -g -c -o $@ $S/mmutest.c
|
||||
|
||||
ppcmmuobject_clean:
|
||||
rm -f $O/*.o $O/*.a mmucode $O/mmuobject
|
||||
|
|
|
@ -37,7 +37,7 @@ inline int iswdigit ( wchar_t c )
|
|||
#endif
|
||||
#endif//WIN32
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__APPLE__)
|
||||
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
# define __isnan isnan
|
||||
# define __finite finite
|
||||
# define powl __builtin_powl
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
#include <string>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
namespace std {
|
||||
typedef basic_string<wchar_t> wstring;
|
||||
}
|
||||
#endif
|
||||
|
||||
std::string ssprintf ( const char* fmt, ... );
|
||||
std::string ssvprintf ( const char* fmt, va_list args );
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ filelen ( FILE* f )
|
|||
#ifdef WIN32
|
||||
return _filelengthi64 ( _fileno(f) );
|
||||
#else
|
||||
# if defined(__FreeBSD__) || defined(__APPLE__)
|
||||
# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
struct stat file_stat;
|
||||
if ( fstat(fileno(f), &file_stat) != 0 )
|
||||
# else
|
||||
|
|
Loading…
Reference in a new issue