From f9dc6d51977f86cc5651c95747714cf3ec3a4919 Mon Sep 17 00:00:00 2001 From: ivmai Date: Mon, 19 Oct 2009 10:56:20 +0000 Subject: [PATCH] 2009-10-19 Ivan Maidanski * extra/gc.c: New file. * Makefile.am (EXTRA_DIST): Add "extra/gc.c". * configure: Regenerate. * Makefile.in: Ditto. --- ChangeLog | 7 ++++++ Makefile.am | 26 ++++++++++----------- Makefile.in | 14 ++++++------ configure | 2 +- extra/gc.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 22 deletions(-) create mode 100644 extra/gc.c diff --git a/ChangeLog b/ChangeLog index 1f3fd391..169c777e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-19 Ivan Maidanski + + * extra/gc.c: New file. + * Makefile.am (EXTRA_DIST): Add "extra/gc.c". + * configure: Regenerate. + * Makefile.in: Ditto. + 2009-10-19 Ivan Maidanski * misc.c (GC_log): Remove the declaration; move the definition (to diff --git a/Makefile.am b/Makefile.am index cafc6fdc..1dc609fb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. -# +# # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. -# +# # Permission is hereby granted to use or copy this program # for any purpose, provided the above notices are retained on all copies. # Permission to modify the code and to distribute modified code is granted, @@ -40,7 +40,7 @@ AM_CPPFLAGS += -I$(top_builddir)/libatomic_ops/src \ endif # Initialize variables so that we can declare files locally. -EXTRA_DIST = +EXTRA_DIST = lib_LTLIBRARIES = include_HEADERS = pkginclude_HEADERS = @@ -78,11 +78,11 @@ if WIN32_THREADS libgc_la_SOURCES += win32_threads.c endif -if USE_INTERNAL_LIBATOMIC_OPS +if USE_INTERNAL_LIBATOMIC_OPS nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c -endif - -if NEED_ATOMIC_OPS_ASM +endif + +if NEED_ATOMIC_OPS_ASM nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S endif @@ -122,7 +122,7 @@ AM_CXXFLAGS = @GC_CFLAGS@ AM_CFLAGS = @GC_CFLAGS@ ## FIXME: relies on internal code generated by automake. -## FIXME: ./configure --enable-dependency-tracking should be used +## FIXME: ./configure --enable-dependency-tracking should be used #all_objs = @addobjs@ $(libgc_la_OBJECTS) #$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \ #include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \ @@ -177,9 +177,9 @@ EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE \ # files used by makefiles other than Makefile.am # -EXTRA_DIST += extra/add_gc_prefix.c extra/gcname.c extra/if_mach.c \ - extra/if_not_there.c hpux_test_and_clear.s gc.mak extra/MacOS.c \ - MacProjects.sit.hqx mach_dep.c extra/setjmp_t.c \ +EXTRA_DIST += extra/add_gc_prefix.c extra/gc.c extra/gcname.c \ + extra/if_mach.c extra/if_not_there.c hpux_test_and_clear.s gc.mak \ + extra/MacOS.c MacProjects.sit.hqx mach_dep.c extra/setjmp_t.c \ extra/threadlibs.c extra/AmigaOS.c \ Mac_files/datastart.c Mac_files/dataend.c \ Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \ @@ -194,7 +194,7 @@ EXTRA_DIST += libatomic_ops CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host # -# :GOTCHA: GNU make rule for making .s out of .S is flawed, +# :GOTCHA: GNU make rule for making .s out of .S is flawed, # it will not remove dest if building fails .S.s: if $(CPP) $< >$@ ; then :; else rm -f $@; fi @@ -205,5 +205,3 @@ include tests/tests.am include doc/doc.am # Putting these at the top causes cord to be built first, and not find libgc.a # on HP/UX. There may be a better fix. - - diff --git a/Makefile.in b/Makefile.in index 095bd311..459be22e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,10 +15,10 @@ @SET_MAKE@ # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. -# +# # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. -# +# # Permission is hereby granted to use or copy this program # for any purpose, provided the above notices are retained on all copies. # Permission to modify the code and to distribute modified code is granted, @@ -479,10 +479,10 @@ EXTRA_DIST = gc_cpp.cpp README.QUICK BCC_MAKEFILE NT_MAKEFILE \ Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \ WCC_MAKEFILE build_atomic_ops.sh build_atomic_ops.sh.cygwin \ NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE \ - NT_X64_THREADS_MAKEFILE extra/add_gc_prefix.c extra/gcname.c \ - extra/if_mach.c extra/if_not_there.c hpux_test_and_clear.s \ - gc.mak extra/MacOS.c MacProjects.sit.hqx mach_dep.c \ - extra/setjmp_t.c extra/threadlibs.c extra/AmigaOS.c \ + NT_X64_THREADS_MAKEFILE extra/add_gc_prefix.c extra/gc.c \ + extra/gcname.c extra/if_mach.c extra/if_not_there.c \ + hpux_test_and_clear.s gc.mak extra/MacOS.c MacProjects.sit.hqx \ + mach_dep.c extra/setjmp_t.c extra/threadlibs.c extra/AmigaOS.c \ Mac_files/datastart.c Mac_files/dataend.c \ Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \ include/private/msvc_dbg.h extra/msvc_dbg.c libatomic_ops \ @@ -1601,7 +1601,7 @@ uninstall-am: uninstall-dist_pkgdataDATA uninstall-includeHEADERS \ $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $< # -# :GOTCHA: GNU make rule for making .s out of .S is flawed, +# :GOTCHA: GNU make rule for making .s out of .S is flawed, # it will not remove dest if building fails .S.s: if $(CPP) $< >$@ ; then :; else rm -f $@; fi diff --git a/configure b/configure index 2713cea2..ae05b44d 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.54 . +# From configure.ac Revision: 1.55 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for gc 7.2alpha3. # diff --git a/extra/gc.c b/extra/gc.c new file mode 100644 index 00000000..3baa4e51 --- /dev/null +++ b/extra/gc.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 1994 by Xerox Corporation. All rights reserved. + * Copyright (c) 1996 by Silicon Graphics. All rights reserved. + * Copyright (c) 1998 by Fergus Henderson. All rights reserved. + * Copyright (c) 2000-2009 by Hewlett-Packard Development Company. + * All rights reserved. + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + +/* This file could be used for the following purposes: */ +/* - get the complete GC as a single link object file (module); */ +/* - enable more compiler optimizations. */ + +/* Tip: to get the highest level of compiler optimizations, the typical */ +/* compiler options (GCC) to use are: */ +/* -O3 -fno-strict-aliasing -march=native -Wall -fprofile-generate/use */ + +/* This file is not well tested (for now). */ + + +/* Small files go first... */ +#include "../backgraph.c" +#include "../blacklst.c" +#include "../checksums.c" +#include "../gcj_mlc.c" +#include "../headers.c" +#include "../malloc.c" +#include "../new_hblk.c" +#include "../obj_map.c" +#include "../ptr_chck.c" +#include "../stubborn.c" + +#include "../allchblk.c" +#include "../alloc.c" +#include "../dbg_mlc.c" +#include "../finalize.c" +#include "../mallocx.c" +#include "../mark.c" +#include "../mark_rts.c" +#include "../reclaim.c" +#include "../typd_mlc.c" + +#include "../misc.c" +#include "../os_dep.c" +#include "../thread_local_alloc.c" + +/* Most platform-specific files go here... */ +#include "../darwin_stop_world.c" +#include "../dyn_load.c" +#include "../gc_dlopen.c" +#include "../mach_dep.c" +#include "../pcr_interface.c" +#include "../pthread_stop_world.c" +#include "../pthread_support.c" +#include "../specific.c" +#include "../win32_threads.c" + +/* real_malloc.c, extra/MacOS.c, extra/msvc_dbg.c are not included. */ -- 2.40.0