Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 6556 → Rev 6555

/contrib/toolchain/gcc/5x/libstdc++-v3/Makefile
35,13 → 35,13
src/c++98/compatibility-debug_list-2.cc
 
cxx11_sources = \
src/c++11/compatibility-c++0x.cc \
src/c++11/compatibility-atomic-c++0x.cc \
src/c++11/compatibility-thread-c++0x.cc \
src/c++11/compatibility-chrono.cc \
src/c++11/compatibility-condvar.cc
compatibility-c++0x.cc \
compatibility-atomic-c++0x.cc \
compatibility-thread-c++0x.cc \
compatibility-chrono.cc \
compatibility-condvar.cc
compat_sources = $(cxx98_sources) $(cxx11_sources)
compat_sources = $(cxx98_sources)
 
cow_string_host_sources = \
src/c++98/collate_members_cow.cc \
244,20 → 244,8
 
 
src/c++11/hashtable_c++0x.o: src/c++11/hashtable_c++0x.cc
$(CXXCOMPILE) -std=gnu++11 -fimplicit-templates -o $@ $<
$(CXXCOMPILE) -fimplicit-templates -o $@ $<
 
src/c++11/compatibility-c++0x.o: src/c++11/compatibility-c++0x.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
src/c++11/compatibility-thread-c++0x.o: src/c++11/compatibility-thread-c++0x.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
src/c++11/compatibility-chrono.o: src/c++11/compatibility-chrono.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
src/c++11/compatibility-condvar.o: src/c++11/compatibility-condvar.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
clean:
-rm -f *.o
 
/contrib/toolchain/gcc/5x/libstdc++-v3/libsupc++/Makefile
6,45 → 6,32
CPP= kos32-g++
STRIP = kos32-strip
 
INSTALLDIR:= /home/autobuild/tools/win32/mingw32/lib
 
export SDK_DIR:= $(abspath ../../../../../sdk)
 
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
CFLAGSCPP = -nostdinc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
CFLAGSCPP+= -fdiagnostics-show-location=once -ffunction-sections -fdata-sections
CPPFLAGS = -fno-rtti
 
ARFLAGS= crs
 
GLIBCXX_INCLUDE_DIR= ../include
INCLUDES= -I../include/mingw32 -I../include -I./ -I$(SDK_DIR)/sources/newlib/libc/include
INCLUDES= -I. -I../include/mingw32 -I../include -I../../newlib/libc/include -I/home/autobuild/tools/win32/include
 
DEFINES= -D_GLIBCXX_HAVE_TLS
LIBS:= -ldll -lc.dll
 
C_COMPILE= $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES)
CXXCOMPILE= $(CPP) $(CFLAGS) $(CFLAGSCPP) $(INCLUDES) $(DEFINES)
DEFINES= -DHAVE_CONFIG_H -DIN_GCC -DIN_GLIBCPP_V3 -DUSE_EMUTLS=1 -D_GLIBCXX_HAVE_TLS
 
 
SOURCES = \
cp-demangle.c \
array_type_info.cc \
atexit_arm.cc \
atexit_thread.cc \
bad_alloc.cc \
bad_array_length.cc \
bad_array_new.cc \
bad_cast.cc \
bad_typeid.cc \
class_type_info.cc \
del_op.cc \
del_ops.cc \
del_opnt.cc \
del_opv.cc \
del_opvs.cc \
del_opvnt.cc \
dyncast.cc \
eh_alloc.cc \
eh_arm.cc \
eh_aux_runtime.cc \
eh_call.cc \
eh_catch.cc \
54,9 → 41,9
eh_ptr.cc \
eh_term_handler.cc \
eh_terminate.cc \
eh_throw.cc \
eh_tm.cc \
eh_throw.cc \
eh_type.cc \
eh_type.c \
eh_unex_handler.cc \
enum_type_info.cc \
function_type_info.cc \
90,60 → 77,29
 
$(LIBRARY).a: $(OBJECTS) Makefile
$(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS)
mv -f $(LIBRARY).a $(INSTALLDIR)
mv -f $(LIBRARY).a ../../../lib
 
%.o : %.c Makefile
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
 
%.o : %.cc Makefile
$(CXXCOMPILE) -o $@ $<
$(CPP) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
 
cp-demangle.o: cp-demangle.c
$(C_COMPILE) -DHAVE_CONFIG_H -D_USE_32BIT_TIME_T -DIN_GLIBCPP_V3 -Wno-error -o $@ $<
 
bad_array_length.o: bad_array_length.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
bad_array_new.o: bad_array_new.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
eh_aux_runtime.o: eh_aux_runtime.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
eh_ptr.o: eh_ptr.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
$(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
eh_terminate.o: eh_terminate.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
eh_throw.o: eh_throw.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
$(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
guard.o: guard.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
$(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
atexit_thread.o: atexit_thread.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
$(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
nested_exception.o: nested_exception.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
$(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
 
new_handler.o: new_handler.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
new_op.o: new_op.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
new_opnt.o: new_opnt.cc
$(CXXCOMPILE) -std=gnu++11 -o $@ $<
 
del_ops.o: del_ops.cc
$(CXXCOMPILE) -std=gnu++14 -o $@ $<
 
del_opvs.o: del_opvs.cc
$(CXXCOMPILE) -std=gnu++14 -o $@ $<
 
 
clean:
-rm -f *.o
 
/contrib/toolchain/gcc/5x/libstdc++-v3/libsupc++/cp-demangle.h
122,11 → 122,6
mangled name to the demangled name, such as standard
substitutions and builtin types. */
int expansion;
/* Non-zero if we are parsing an expression. */
int is_expression;
/* Non-zero if we are parsing the type operand of a conversion
operator, but not when in an expression. */
int is_conversion;
};
 
/* To avoid running past the ending '\0', don't:
/contrib/toolchain/gcc/5x/libstdc++-v3/libsupc++/demangle.h
63,10 → 63,9
#define DMGL_EDG (1 << 13)
#define DMGL_GNU_V3 (1 << 14)
#define DMGL_GNAT (1 << 15)
#define DMGL_DLANG (1 << 16)
 
/* If none of these are set, use 'current_demangling_style' as the default. */
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG)
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
 
/* Enumeration of possible demangling styles.
 
88,8 → 87,7
edg_demangling = DMGL_EDG,
gnu_v3_demangling = DMGL_GNU_V3,
java_demangling = DMGL_JAVA,
gnat_demangling = DMGL_GNAT,
dlang_demangling = DMGL_DLANG
gnat_demangling = DMGL_GNAT
} current_demangling_style;
 
/* Define string names for the various demangling styles. */
104,7 → 102,6
#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
#define JAVA_DEMANGLING_STYLE_STRING "java"
#define GNAT_DEMANGLING_STYLE_STRING "gnat"
#define DLANG_DEMANGLING_STYLE_STRING "dlang"
 
/* Some macros to test what demangling style is active. */
 
118,7 → 115,6
#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
#define DLANG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_DLANG)
 
/* Provide information about the available demangle styles. This code is
pulled from gdb into libiberty because it is useful to binutils also. */
173,17 → 169,10
char *
ada_demangle (const char *mangled, int options);
 
extern char *
dlang_demangle (const char *mangled, int options);
 
enum gnu_v3_ctor_kinds {
gnu_v3_complete_object_ctor = 1,
gnu_v3_base_object_ctor,
gnu_v3_complete_object_allocating_ctor,
/* These are not part of the V3 ABI. Unified constructors are generated
as a speed-for-space optimization when the -fdeclone-ctor-dtor option
is used, and are always internal symbols. */
gnu_v3_unified_ctor,
gnu_v3_object_ctor_group
};
 
199,10 → 188,6
gnu_v3_deleting_dtor = 1,
gnu_v3_complete_object_dtor,
gnu_v3_base_object_dtor,
/* These are not part of the V3 ABI. Unified destructors are generated
as a speed-for-space optimization when the -fdeclone-ctor-dtor option
is used, and are always internal symbols. */
gnu_v3_unified_dtor,
gnu_v3_object_dtor_group
};
 
380,10 → 365,6
/* A typecast, represented as a unary operator. The one subtree is
the type to which the argument should be cast. */
DEMANGLE_COMPONENT_CAST,
/* A conversion operator, represented as a unary operator. The one
subtree is the type to which the argument should be converted
to. */
DEMANGLE_COMPONENT_CONVERSION,
/* A nullary expression. The left subtree is the operator. */
DEMANGLE_COMPONENT_NULLARY,
/* A unary expression. The left subtree is the operator, and the
/contrib/toolchain/gcc/5x/libstdc++-v3/libsupc++/gthr_mutex.c
0,0 → 1,150
#include <stdlib.h>
#include <sys/errno.h>
#include <kos32sys.h>
 
void __mutex_lock(volatile int *val);
 
static inline int tls_get(int key)
{
int val;
__asm__ __volatile__(
"movl %%fs:(%1), %0"
:"=r"(val)
:"r"(key));
 
return val;
};
 
typedef struct {
int done;
long started;
} __gthread_once_t;
 
typedef struct {
int counter;
void *sema;
} __gthread_mutex_t;
 
typedef struct {
int counter;
int depth;
unsigned long owner;
int sema;
} __gthread_recursive_mutex_t;
 
 
int
__gthr_win32_once (__gthread_once_t *once, void (*func) (void))
{
if (once == NULL || func == NULL)
return EINVAL;
 
if (! once->done)
{
if (__sync_add_and_fetch (&(once->started), 1) == 0)
{
(*func) ();
once->done = 1;
}
else
{
/* Another thread is currently executing the code, so wait for it
to finish; yield the CPU in the meantime. If performance
does become an issue, the solution is to use an Event that
we wait on here (and set above), but that implies a place to
create the event before this routine is called. */
while (! once->done)
delay(1);
}
}
return 0;
}
 
void __gthr_win32_mutex_init_function (__gthread_mutex_t *mutex)
{
mutex->counter = 0;
mutex->sema = 0;
}
 
int __gthr_win32_mutex_lock (__gthread_mutex_t *mutex)
{
__mutex_lock(&mutex->counter);
return 0;
}
 
int
__gthr_win32_mutex_unlock (__gthread_mutex_t *mutex)
{
mutex->counter = 0;
return 0;
}
 
void
__gthr_win32_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
{
mutex->counter = -1;
mutex->depth = 0;
mutex->owner = 0;
mutex->sema = 0;
}
 
void
__gthr_win32_mutex_destroy (__gthread_mutex_t *mutex)
{ }
 
int
__gthr_win32_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
{
int me = tls_get(0);
if ( __sync_add_and_fetch(&mutex->counter, 1) == 0)
{
mutex->depth = 1;
mutex->owner = me;
mutex->sema = 1;
}
else if (mutex->owner == me)
{
__sync_sub_and_fetch(&mutex->counter, 1);
++(mutex->depth);
}
else
{
__mutex_lock(&mutex->sema);
mutex->depth = 1;
mutex->owner = me;
}
return 0;
}
 
int
__gthr_win32_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
{
int me = tls_get(0);
if (__sync_val_compare_and_swap (&mutex->counter, -1, 0) < 0)
{
mutex->depth = 1;
mutex->owner = me;
mutex->sema = 1;
}
else if (mutex->owner == me)
++(mutex->depth);
else
return 1;
 
return 0;
}
 
int
__gthr_win32_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
{
--(mutex->depth);
if (mutex->depth == 0)
{
mutex->owner = 0;
 
if (__sync_sub_and_fetch (&mutex->counter, 1) >= 0)
mutex->sema = 0;
}
 
return 0;
}
/contrib/toolchain/gcc/5x/libstdc++-v3/libsupc++/vterminate.idb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property