diff --git a/contrib/sdk/sources/Intel-2D/Makefile b/contrib/sdk/sources/Intel-2D/Makefile index a8e753fa09..f3fb76d621 100644 --- a/contrib/sdk/sources/Intel-2D/Makefile +++ b/contrib/sdk/sources/Intel-2D/Makefile @@ -12,7 +12,7 @@ PXFLAGS:= --version-script pixlib.ver --out-implib $(LIBRARY).dll.a SNAFLAGS:= --version-script sna.ver --output-def sna.def UXAFLAGS:= --version-script uxa.ver --output-def uxa.def -INCLUDES= -I. -I../libdrm/intel -I../libdrm/include/drm -I./render_program -I../pixman -I../newlib/include +INCLUDES= -I. -I../libdrm/intel -I../libdrm/include/drm -I./render_program -I../pixman -I../newlib/libc/include LIBPATH:= -L../../lib diff --git a/contrib/sdk/sources/Intel-2D/sna/kgem.c b/contrib/sdk/sources/Intel-2D/sna/kgem.c index 84d5e8cfb8..1fa9bcbfe8 100644 --- a/contrib/sdk/sources/Intel-2D/sna/kgem.c +++ b/contrib/sdk/sources/Intel-2D/sna/kgem.c @@ -2744,7 +2744,7 @@ void _kgem_submit(struct kgem *kgem) if (DEBUG_DUMP) { - int fd = open("/tmp1/1/batchbuffer.bin", O_CREAT|O_WRONLY|O_BINARY); + int fd = open("/tmp1/1/batchbuffer.bin", O_CREAT|O_WRONLY); if (fd != -1) { ret = write(fd, kgem->batch, batch_end*sizeof(uint32_t)); fd = close(fd); diff --git a/contrib/sdk/sources/Intel-2D/sna/sna.h b/contrib/sdk/sources/Intel-2D/sna/sna.h index 97240ca23e..2e43bb0685 100644 --- a/contrib/sdk/sources/Intel-2D/sna/sna.h +++ b/contrib/sdk/sources/Intel-2D/sna/sna.h @@ -46,7 +46,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "compiler.h" -//#include +#include #include #include #include diff --git a/contrib/sdk/sources/Intel-2D/sna/sna_stream.c b/contrib/sdk/sources/Intel-2D/sna/sna_stream.c index 4eac3ab7b6..dd7e660ea0 100644 --- a/contrib/sdk/sources/Intel-2D/sna/sna_stream.c +++ b/contrib/sdk/sources/Intel-2D/sna/sna_stream.c @@ -86,7 +86,7 @@ struct kgem_bo *sna_static_stream_fini(struct sna *sna, if (DEBUG_DUMP) { - int fd = open("/tmp1/1/static.bin", O_CREAT|O_WRONLY|O_BINARY); + int fd = open("/tmp1/1/static.bin", O_CREAT|O_WRONLY); if (fd != -1) { write(fd, stream->data, stream->used); close(fd); diff --git a/contrib/sdk/sources/Makefile b/contrib/sdk/sources/Makefile index 49e146b237..fe162d266a 100644 --- a/contrib/sdk/sources/Makefile +++ b/contrib/sdk/sources/Makefile @@ -12,8 +12,8 @@ all: newlib zlib libpng freetype pixman cairo \ newlib: $(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libapp.a $(LIB_DIR)/libdll.a $(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libapp.a $(LIB_DIR)/libdll.a: - $(MAKE) -C newlib shared - $(MAKE) -C newlib install + $(MAKE) -C newlib/libc shared + $(MAKE) -C newlib/libc install ##################################### diff --git a/contrib/sdk/sources/Mesa/Makefile b/contrib/sdk/sources/Mesa/Makefile index 05bdcc527c..1da1c8ff79 100644 --- a/contrib/sdk/sources/Mesa/Makefile +++ b/contrib/sdk/sources/Mesa/Makefile @@ -15,8 +15,8 @@ CFLAGS = -c $(CFLAGS_OPT) LDFLAGS = -nostdlib -shared -s --image-base 0 -T ../newlib/dll.lds -e _DllStartup LDFLAGS+= --out-implib lib$(EGL).dll.a -INC_MESA= -I../newlib/include -I./include -I./src -I./src/glsl -I./src/mesa -I./src/mapi -INC_EGL= -I../newlib/include -I../../includes -I./include -I../libdrm -I../libdrm/include/drm -I./src/egl/main -I./src/gbm/backends/dri -I./src/gbm/main +INC_MESA= -I../newlib/libc/include -I./include -I./src -I./src/glsl -I./src/mesa -I./src/mapi +INC_EGL= -I../newlib/libc/include -I../../includes -I./include -I../libdrm -I../libdrm/include/drm -I./src/egl/main -I./src/gbm/backends/dri -I./src/gbm/main LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib diff --git a/contrib/sdk/sources/Mesa/src/egl/Makefile b/contrib/sdk/sources/Mesa/src/egl/Makefile index b78c8c73c7..3b6ac23b52 100644 --- a/contrib/sdk/sources/Mesa/src/egl/Makefile +++ b/contrib/sdk/sources/Mesa/src/egl/Makefile @@ -8,7 +8,7 @@ CFLAGS = -c $(CFLAGS_OPT) LDFLAGS = -nostdlib -shared -s --image-base 0 -T $(SRC_DIR)/newlib/dll.lds --out-implib libegl.dll.a -e _DllStartup -INC_EGL:= -I$(SRC_DIR)/newlib/include -I$(SDK_DIR)/includes -I$(SRC_DIR)/Mesa/include +INC_EGL:= -I$(SRC_DIR)/newlib/libc/include -I$(SDK_DIR)/includes -I$(SRC_DIR)/Mesa/include INC_EGL+= -I$(SRC_DIR)/libdrm -I$(SRC_DIR)/libdrm/include/drm -I./main INC_EGL+= -I$(MESA_SRC)/gbm/backends/dri -I$(MESA_SRC)/gbm/main diff --git a/contrib/sdk/sources/Mesa/src/glsl/Makefile b/contrib/sdk/sources/Mesa/src/glsl/Makefile index 10937f10b2..63f6cfed03 100644 --- a/contrib/sdk/sources/Mesa/src/glsl/Makefile +++ b/contrib/sdk/sources/Mesa/src/glsl/Makefile @@ -6,7 +6,7 @@ CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -Os CFLAGS_OPT+= -fomit-frame-pointer -mno-ms-bitfields CFLAGS = -c $(CFLAGS_OPT) -INC_MESA:= -I$(SRC_DIR)/newlib/include -I$(SRC_DIR)/Mesa/include +INC_MESA:= -I$(SRC_DIR)/newlib/libc/include -I$(SRC_DIR)/Mesa/include INC_MESA+= -I./src -I$(MESA_SRC)/glsl -I$(MESA_SRC)/mesa -I$(MESA_SRC)/mapi MESA_DEFS= -DMESA_DLL -DBUILD_GL32 -DMAPI_MODE_UTIL -DMAPI_TABLE_NUM_STATIC=87 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_SSE_ASM -DMAPI_TABLE_NUM_DYNAMIC=256 diff --git a/contrib/sdk/sources/Mesa/src/mapi/Makefile b/contrib/sdk/sources/Mesa/src/mapi/Makefile index bfa9789e77..93a72529e5 100644 --- a/contrib/sdk/sources/Mesa/src/mapi/Makefile +++ b/contrib/sdk/sources/Mesa/src/mapi/Makefile @@ -8,7 +8,7 @@ CFLAGS = -c $(CFLAGS_OPT) LDFLAGS = -nostdlib -shared -s --image-base 0 -T $(SRC_DIR)/newlib/dll.lds --out-implib libGL.dll.a -e _DllStartup -INC_MESA:= -I$(SRC_DIR)/newlib/include -I$(SRC_DIR)/Mesa/include +INC_MESA:= -I$(SRC_DIR)/newlib/libc/include -I$(SRC_DIR)/Mesa/include INC_MESA+= -I./src -I$(MESA_SRC)/glsl -I$(MESA_SRC)/mesa -I$(MESA_SRC)/mapi diff --git a/contrib/sdk/sources/Mesa/src/mesa/Makefile b/contrib/sdk/sources/Mesa/src/mesa/Makefile index 7807ffed9d..aea2744f86 100644 --- a/contrib/sdk/sources/Mesa/src/mesa/Makefile +++ b/contrib/sdk/sources/Mesa/src/mesa/Makefile @@ -8,7 +8,7 @@ CFLAGS = -c $(CFLAGS_OPT) LDFLAGS = -nostdlib -shared -s --image-base 0 -T $(SRC_DIR)/newlib/dll.lds -e _DllStartup -INC_MESA:= -I$(SRC_DIR)/newlib/include -I$(SRC_DIR)/Mesa/include +INC_MESA:= -I$(SRC_DIR)/newlib/libc/include -I$(SRC_DIR)/Mesa/include INC_MESA+= -I./ -I$(MESA_SRC)/glsl -I$(MESA_SRC)/mesa -I$(MESA_SRC)/mapi INC_MESA+= -I$(SRC_DIR)/libdrm -I$(MESA_SRC) -I$(SRC_DIR)/expat/lib INC_I965:= -I$(SRC_DIR)/libdrm/intel -I$(SRC_DIR)/libdrm/include/drm -I$(MESA_SRC)/mesa/drivers/dri/common diff --git a/contrib/sdk/sources/cairo/Makefile b/contrib/sdk/sources/cairo/Makefile index 8f3ae21712..01524c0fce 100644 --- a/contrib/sdk/sources/cairo/Makefile +++ b/contrib/sdk/sources/cairo/Makefile @@ -14,7 +14,7 @@ ARFLAGS = crs DEFINES = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -U_MSC_VER -DHAVE_CONFIG_H=1 -DCAIRO_NO_MUTEX=1 -INCLUDES = -I. -I../newlib/include -I../pixman -I../zlib -I../libpng -I../freetype/include +INCLUDES = -I. -I../newlib/libc/include -I../pixman -I../zlib -I../libpng -I../freetype/include LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib diff --git a/contrib/sdk/sources/eglut/Makefile b/contrib/sdk/sources/eglut/Makefile index d1e5ac4b2e..33b88232b5 100644 --- a/contrib/sdk/sources/eglut/Makefile +++ b/contrib/sdk/sources/eglut/Makefile @@ -8,9 +8,9 @@ LD = kos32-ld CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer -INCLUDES= -I. -I../newlib/include -I../Mesa/include -I../Mesa/src/gbm/main -I../libdrm/include +INCLUDES= -I. -I../newlib/libc/include -I../Mesa/include -I../Mesa/src/gbm/main -I../libdrm/include -LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 +LDFLAGS:= -shared -s -nostdlib -T ../newlib/libc/dll.lds --entry _DllStartup --image-base=0 LDFLAGS+= --out-implib $(IMPLIB) LIBPATH:= -L../../lib diff --git a/contrib/sdk/sources/expat/Makefile b/contrib/sdk/sources/expat/Makefile index 464fc13b63..d5ecdd998a 100644 --- a/contrib/sdk/sources/expat/Makefile +++ b/contrib/sdk/sources/expat/Makefile @@ -8,7 +8,7 @@ CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer ARFLAGS = crs -INCLUDES= -I. -I../newlib/include +INCLUDES= -I. -I../newlib/libc/include DEFS = -DHAVE_EXPAT_CONFIG_H diff --git a/contrib/sdk/sources/ffmpeg/config.mak b/contrib/sdk/sources/ffmpeg/config.mak index 86cc85aba0..b2ced04f65 100644 --- a/contrib/sdk/sources/ffmpeg/config.mak +++ b/contrib/sdk/sources/ffmpeg/config.mak @@ -34,9 +34,9 @@ STRIP=kos32-strip CP=cp -p LN_S=ln -s -f CPPFLAGS= -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=32 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -CFLAGS= -I../newlib/include -I../zlib -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99 -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O2 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla +CFLAGS= -I../newlib/libc/include -I../zlib -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99 -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O2 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla CXXFLAGS= -D__STDC_CONSTANT_MACROS -ASFLAGS= -I../newlib/include -U_Win32 -U_WIN32 -U__MINGW32__ +ASFLAGS= -I../newlib/libc/include -U_Win32 -U_WIN32 -U__MINGW32__ AS_C=-c AS_O=-o $@ CC_C=-c diff --git a/contrib/sdk/sources/freetype/Makefile b/contrib/sdk/sources/freetype/Makefile index 1ce2b61865..fa61551dec 100644 --- a/contrib/sdk/sources/freetype/Makefile +++ b/contrib/sdk/sources/freetype/Makefile @@ -12,7 +12,7 @@ LDFLAGS+= --out-implib lib$(LIBRARY).dll.a ARFLAGS = crs -INCLUDES= -I../newlib/include -I./include -I./include/freetype/config +INCLUDES= -I../newlib/libc/include -I./include -I./include/freetype/config LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib diff --git a/contrib/sdk/sources/gcc_eh/Makefile b/contrib/sdk/sources/gcc_eh/Makefile index 55a05e2d40..bd1d89de03 100644 --- a/contrib/sdk/sources/gcc_eh/Makefile +++ b/contrib/sdk/sources/gcc_eh/Makefile @@ -11,7 +11,7 @@ CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer ARFLAG = crs -INCLUDES= -I. -I../newlib/include +INCLUDES= -I. -I../newlib/libc/include LIBS:= -ldll -lc.dll diff --git a/contrib/sdk/sources/libdrm/Makefile b/contrib/sdk/sources/libdrm/Makefile index 8f39a262c8..f098073714 100644 --- a/contrib/sdk/sources/libdrm/Makefile +++ b/contrib/sdk/sources/libdrm/Makefile @@ -12,7 +12,7 @@ LDFLAGS+= --out-implib $(LIBRARY).dll.a ARFLAGS = crs -INCLUDES= -I. -I./include/drm -I../newlib/include +INCLUDES= -I. -I./include/drm -I../newlib/libc/include LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib diff --git a/contrib/sdk/sources/libpng/Makefile b/contrib/sdk/sources/libpng/Makefile index 89b5a18683..066a5bc3e2 100644 --- a/contrib/sdk/sources/libpng/Makefile +++ b/contrib/sdk/sources/libpng/Makefile @@ -12,7 +12,7 @@ LDFLAGS+= --out-implib $(LIBRARY).dll.a ARFLAGS:= crs -INCLUDES= -I. -I../newlib/include -I../zlib +INCLUDES= -I. -I../newlib/libc/include -I../zlib LIBPATH:= -L../../lib diff --git a/contrib/sdk/sources/libsupc++/Makefile b/contrib/sdk/sources/libsupc++/Makefile index 4ba59b3b92..5f5b543423 100644 --- a/contrib/sdk/sources/libsupc++/Makefile +++ b/contrib/sdk/sources/libsupc++/Makefile @@ -10,7 +10,7 @@ CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer ARFLAGS= crs -INCLUDES= -I. -I../newlib/include +INCLUDES= -I. -I../newlib/libc/include LIBS:= -ldll -lc.dll diff --git a/contrib/sdk/sources/newlib/libc/Makefile b/contrib/sdk/sources/newlib/libc/Makefile index c835bc5cb2..0a406d1063 100644 --- a/contrib/sdk/sources/newlib/libc/Makefile +++ b/contrib/sdk/sources/newlib/libc/Makefile @@ -1,5 +1,4 @@ - CC = kos32-gcc AR = kos32-ar LD = kos32-ld @@ -9,6 +8,7 @@ LDFLAGS = -shared -s -T libcdll.lds --out-implib libc.dll.a --image-base 0 #LDFLAGS+= --output-def libc.orig.def ARFLAGS = crs +SDK_DIR:= $(abspath ../../..) LIBC_TOPDIR = . LIBC_INCLUDES = $(LIBC_TOPDIR)/include @@ -19,7 +19,7 @@ DEFINES:= -D_IEEE_LIBM INCLUDES:= -I $(LIBC_INCLUDES) -LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib +LIBPATH:= -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib STATIC_SRCS:= \ crt/start.S \ @@ -400,10 +400,10 @@ $(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile #sed -f newlib.sed mem > libc.inc install: libc.dll libc.dll.a libapp.a libdll.a - mv -f libc.dll ../../bin - mv -f libc.dll.a ../../lib - mv -f libapp.a ../../lib - mv -f libdll.a ../../lib + mv -f libc.dll $(SDK_DIR)/bin + mv -f libc.dll.a $(SDK_DIR)/lib + mv -f libapp.a $(SDK_DIR)/lib + mv -f libdll.a $(SDK_DIR)/lib libapp.a: $(LIBCRT_OBJS) Makefile $(AR) $(ARFLAGS) libapp.a $(LIBCRT_OBJS) diff --git a/contrib/sdk/sources/newlib/libc/Makefile.ebox b/contrib/sdk/sources/newlib/libc/Makefile.ebox index 0b8a949e46..81a83682cb 100644 --- a/contrib/sdk/sources/newlib/libc/Makefile.ebox +++ b/contrib/sdk/sources/newlib/libc/Makefile.ebox @@ -1,10 +1,13 @@ -CC = gcc -AR = ar rc -LD = ld +CC = kos32-gcc +AR = kos32-ar +LD = kos32-ld -CFLAGS = -c -O2 -march=pentium-mmx -fomit-frame-pointer -DBUILD_DLL +CFLAGS = -c -O2 -march=pentium-mmx -fomit-frame-pointer -DBUILD_DLL -DMISSING_SYSCALL_NAMES LDFLAGS = -nostdlib -shared -s -T libcdll.lds --output-def libc.orig.def --out-implib libc.dll.a --image-base 0 +ARFLAGS = crs + +SDK_DIR:= $(abspath ../../..) LIBC_TOPDIR = . LIBC_INCLUDES = $(LIBC_TOPDIR)/include @@ -15,7 +18,7 @@ DEFINES:= -D_IEEE_LIBM INCLUDES:= -I $(LIBC_INCLUDES) -LIBPATH:= -L ../../lib +LIBPATH:= -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib STATIC_SRCS:= \ crt/start.S \ @@ -54,7 +57,6 @@ CORE_SRCS:= \ crt/thread.S \ crt/tls.S \ crt/setjmp.S \ - crt/assert.c \ crt/cpu_features.c \ ctype/ctype_.c \ ctype/isascii.c \ @@ -93,28 +95,43 @@ CORE_SRCS:= \ errno/errno.c \ locale/locale.c \ locale/lctype.c \ + locale/ldpart.c \ reent/impure.c \ reent/init_reent.c \ reent/getreent.c \ reent/mutex.c \ reent/gettimeofdayr.c \ - reent/hdlman.c \ reent/isattyr.c \ reent/openr.c \ reent/closer.c \ + reent/linkr.c \ reent/readr.c \ reent/lseekr.c \ reent/fstatr.c \ reent/writer.c \ + reent/timesr.c \ + reent/unlinkr.c \ search/qsort.c \ search/bsearch.c \ signal/signal.c \ + sys/close.c \ sys/create.c \ sys/delete.c \ + sys/errno.c \ sys/finfo.c \ + sys/fsize.c \ + sys/fstat.c \ + sys/gettod.c \ + sys/io.c \ + sys/ioread.c \ + sys/iowrite.c \ + sys/isatty.c \ + sys/lseek.c \ + sys/open.c \ sys/read.c \ + sys/unlink.c \ sys/write.c \ - sys/fsize.c \ + sys/io_alloc.S \ time/asctime.c \ time/asctime_r.c \ time/clock.c \ @@ -130,6 +147,7 @@ CORE_SRCS:= \ time/lcltime_r.c \ time/strftime.c \ time/time.c \ + time/timelocal.c \ time/tzlock.c \ time/tzvars.c @@ -139,6 +157,8 @@ STDLIB_SRCS= \ __call_atexit.c \ abort.c \ abs.c \ + assert.c \ + atexit.c \ atof.c \ atoi.c \ atol.c \ @@ -248,7 +268,6 @@ STDIO_SRCS= \ refill.c \ rget.c \ remove.c \ - rename.c \ setvbuf.c \ stdio.c \ tmpfile.c \ @@ -374,28 +393,28 @@ shared: $(NAME).dll libapp.a libdll.a $(NAME).dll: $(LIB_OBJS) $(SRC_DEP) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) --version-script libc.ver - sed -e "s/ @[^ ]*//" libc.orig.def > libc.def - sed -f cmd2.sed libc.def > mem - sed -f newlib.sed mem > libc.inc + $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver + #sed -e "s/ @[^ ]*//" libc.orig.def > libc.def + #sed -f cmd2.sed libc.def > mem + #sed -f newlib.sed mem > libc.inc install: libc.dll libc.dll.a libapp.a libdll.a - mv -f libc.dll ../../bin - mv -f libc.dll.a ../../lib - mv -f libapp.a ../../lib - mv -f libdll.a ../../lib + mv -f libc.dll $(SDK_DIR)/bin + mv -f libc.dll.a $(SDK_DIR)/lib + mv -f libapp.a $(SDK_DIR)/lib + mv -f libdll.a $(SDK_DIR)/lib libapp.a: $(LIBCRT_OBJS) Makefile - $(AR) libapp.a $(LIBCRT_OBJS) + $(AR) $(ARFLAGS) libapp.a $(LIBCRT_OBJS) libdll.a: $(LIBDLL_OBJS) Makefile - $(AR) libdll.a $(LIBDLL_OBJS) + $(AR) $(ARFLAGS) libdll.a $(LIBDLL_OBJS) static: $(NAME).a $(NAME).a: $(LIB_OBJS) $(SRC_DEP) Makefile - $(AR) $(NAME).a $(LIB_OBJS) + $(AR) $(ARFLAGS) $(NAME).a $(LIB_OBJS) diff --git a/contrib/sdk/sources/newlib/libc/crt/emutls.c b/contrib/sdk/sources/newlib/libc/crt/emutls.c index 77485e1422..3fe0c44f6e 100644 --- a/contrib/sdk/sources/newlib/libc/crt/emutls.c +++ b/contrib/sdk/sources/newlib/libc/crt/emutls.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include +#include #include #include diff --git a/contrib/sdk/sources/newlib/libc/include/assert.h b/contrib/sdk/sources/newlib/libc/include/assert.h index 9fa79c7de7..de5605ca76 100644 --- a/contrib/sdk/sources/newlib/libc/include/assert.h +++ b/contrib/sdk/sources/newlib/libc/include/assert.h @@ -2,6 +2,9 @@ assert.h */ +#ifndef __ASSERT_H__ +#define __ASSERT_H__ + #ifdef __cplusplus extern "C" { #endif @@ -48,3 +51,5 @@ void _EXFUN(__assert_func, (const char *, int, const char *, const char *) #ifdef __cplusplus } #endif + +#endif /* __ASSERT_H__ */ diff --git a/contrib/sdk/sources/newlib/libc/include/inttypes.h b/contrib/sdk/sources/newlib/libc/include/inttypes.h index d9d23028ff..a78e9a6f14 100644 --- a/contrib/sdk/sources/newlib/libc/include/inttypes.h +++ b/contrib/sdk/sources/newlib/libc/include/inttypes.h @@ -177,8 +177,8 @@ #define __PRI64(x) __STRINGIFY(l##x) #define __SCN64(x) __STRINGIFY(l##x) #elif __have_longlong64 -#define __PRI64(x) __STRINGIFY(ll##x) -#define __SCN64(x) __STRINGIFY(ll##x) +#define __PRI64(x) __STRINGIFY(I64##x) +#define __SCN64(x) __STRINGIFY(I64##x) #else #define __PRI64(x) __STRINGIFY(x) #define __SCN64(x) __STRINGIFY(x) diff --git a/contrib/sdk/sources/newlib/libc/include/stdint.h b/contrib/sdk/sources/newlib/libc/include/stdint.h index 6ec6c1e469..2b4f166881 100644 --- a/contrib/sdk/sources/newlib/libc/include/stdint.h +++ b/contrib/sdk/sources/newlib/libc/include/stdint.h @@ -35,6 +35,7 @@ extern "C" { #define __have_long64 1 #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) #define __have_long32 1 +#define __have_long64 0 #endif #ifdef ___int8_t_defined diff --git a/contrib/sdk/sources/newlib/libc/include/sys/stat.h b/contrib/sdk/sources/newlib/libc/include/sys/stat.h index 700e779f48..ac5906bcea 100644 --- a/contrib/sdk/sources/newlib/libc/include/sys/stat.h +++ b/contrib/sdk/sources/newlib/libc/include/sys/stat.h @@ -22,7 +22,7 @@ extern "C" { #define stat64 stat #endif #else -struct stat +struct stat { dev_t st_dev; ino_t st_ino; @@ -142,8 +142,6 @@ struct stat #define UTIME_OMIT -1L #endif -int _EXFUN(chmod,( const char *__path, mode_t __mode )); -int _EXFUN(fchmod,(int __fd, mode_t __mode)); int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); int _EXFUN(mkdir,( const char *_path, mode_t __mode )); int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); diff --git a/contrib/sdk/sources/pixman/Makefile b/contrib/sdk/sources/pixman/Makefile index 155425b4c1..a174d88152 100644 --- a/contrib/sdk/sources/pixman/Makefile +++ b/contrib/sdk/sources/pixman/Makefile @@ -12,7 +12,7 @@ LDFLAGS+= --out-implib lib$(LIBRARY).dll.a ARFLAGS = cvrs -INCLUDES= -I. -I../newlib/include +INCLUDES= -I. -I../newlib/libc/include LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib diff --git a/contrib/sdk/sources/pixman/Makefile.ebox b/contrib/sdk/sources/pixman/Makefile.ebox index 0245bab8ca..8f4b2d5e28 100644 --- a/contrib/sdk/sources/pixman/Makefile.ebox +++ b/contrib/sdk/sources/pixman/Makefile.ebox @@ -9,7 +9,7 @@ LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image- STRIP = $(PREFIX)strip -INCLUDES= -I. -I../newlib/include +INCLUDES= -I. -I../newlib/libc/include LIBPATH:= -L../../lib diff --git a/contrib/sdk/sources/render/Makefile b/contrib/sdk/sources/render/Makefile index c1f502ffd5..9ac55c6580 100644 --- a/contrib/sdk/sources/render/Makefile +++ b/contrib/sdk/sources/render/Makefile @@ -6,7 +6,7 @@ CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer AR= ar -INCLUDES= -I. -I../newlib/include -I../Mesa/include -I../libdrm/include/drm +INCLUDES= -I. -I../newlib/libc/include -I../Mesa/include -I../libdrm/include/drm LIBPATH:= -L../../lib diff --git a/contrib/sdk/sources/zlib/Makefile b/contrib/sdk/sources/zlib/Makefile index 0d7af0c7a0..a4822157bd 100644 --- a/contrib/sdk/sources/zlib/Makefile +++ b/contrib/sdk/sources/zlib/Makefile @@ -16,7 +16,7 @@ LD = kos32-ld AR = kos32-ar STRIP = kos32-strip -CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O2 -Wall -fomit-frame-pointer +CFLAGS = $(LOC) -DHAVE_UNISTD_H -U_Win32 -U_WIN32 -U__MINGW32__ -O2 -Wall -fomit-frame-pointer AS = $(CC) ASFLAGS = $(LOC) -Wall @@ -27,7 +27,7 @@ ARFLAGS = rcs LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB) -INCLUDES= -I../newlib/include +INCLUDES= -I../newlib/libc/include LIBPATH:= -L../../lib diff --git a/contrib/sdk/sources/zlib/Makefile.ebox b/contrib/sdk/sources/zlib/Makefile.ebox index b3e9eaac25..d754e4b85b 100644 --- a/contrib/sdk/sources/zlib/Makefile.ebox +++ b/contrib/sdk/sources/zlib/Makefile.ebox @@ -30,7 +30,7 @@ LDIMPORT:= -nostdlib --out-implib libzimp.a LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB) -INCLUDES= -I../newlib/include +INCLUDES= -I../newlib/libc/include LIBPATH:= -L../../lib