]> granicus.if.org Git - gc/commitdiff
Remove build_atomic_ops.sh
authorIvan Maidanski <ivmai@mail.ru>
Tue, 17 Jun 2014 20:11:11 +0000 (00:11 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Jun 2014 20:11:11 +0000 (00:11 +0400)
* Makefile.am (EXTRA_DIST): Remove build_atomic_ops.sh,
build_atomic_ops.sh.cygwin entries.
* Makefile.direct (OTHER_MAKEFILES): Likewise.
* Makefile.direct (AO_SRC_DIR): Update comment.
* Makefile.direct (AO_INSTALL_DIR): Remove variable.
* Makefile.direct (CFLAGS_EXTRA): New variable (empty by default).
* Makefile.direct (CFLAGS, SPECIALCFLAGS): Replace
"$(AO_INSTALL_DIR)/include" with "$(AO_SRC_DIR)/src" include folder.
* Makefile.direct (CFLAGS): Add $(CFLAGS_EXTRA).
* Makefile.direct (OBJS): Add atomic_ops.o, atomic_ops_sysdeps.o
entries.
* Makefile.direct (AO_INSTALL_DIR): Remove rule (build essential .o
files of libatomic_ops directly instead of configure and make).
* Makefile.direct (atomic_ops.o, atomic_ops_sysdeps.o): Add rule.
* Makefile.direct (tests/test.o, setjmp_test): Remove dependency on
$(AO_INSTALL_DIR).
* Makefile.direct (gc.a): Do not copy contents of libatomic_ops.a to
gc.a.
* Makefile.direct (sunos5gc.so): Do not link with libatomic_ops.a.
* Makefile.direct (gc.tar): Do not make libatomic_ops.
* build_atomic_ops.sh: Remove file.
* build_atomic_ops.sh.cygwin: Likewise.

Makefile.am
Makefile.direct
build_atomic_ops.sh [deleted file]
build_atomic_ops.sh.cygwin [deleted file]

index ce91bf0731c2fb9146221b6646d04ec607bc4903..27add775eea0dc23fb1ce0230996d2c2ab897bb9 100644 (file)
@@ -172,7 +172,7 @@ EXTRA_DIST += README.QUICK TODO
 EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE \
     OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
     Makefile.direct Makefile.dj SMakefile.amiga \
-    WCC_MAKEFILE autogen.sh build_atomic_ops.sh build_atomic_ops.sh.cygwin \
+    WCC_MAKEFILE autogen.sh \
     NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE \
     NT_X64_THREADS_MAKEFILE CMakeLists.txt tests/CMakeLists.txt
 
index 6999512f446957e9684f2a6e8415e1dd6e055fdb..f553e101e979efa5dc6de0c6b27f134e251008fd 100644 (file)
@@ -31,12 +31,13 @@ AS=as $(AS_ABI_FLAG)
 srcdir= .
 VPATH= $(srcdir)
 
-# Atomic_ops installation directory.  If this doesn't exist, we create
-# it from the included libatomic_ops distribution.
+# Path to atomic_ops source.
 AO_SRC_DIR=$(srcdir)/libatomic_ops
-AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install
 
-CFLAGS= -O -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
+CFLAGS_EXTRA=
+CFLAGS= -O -I$(srcdir)/include -I$(AO_SRC_DIR)/src \
+  -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS \
+  $(CFLAGS_EXTRA)
 
 # To build the parallel collector on Linux, add to the above:
 # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
@@ -75,7 +76,7 @@ OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o \
   malloc.o stubborn.o checksums.o pthread_support.o pthread_stop_world.o \
   darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o gcj_mlc.o specific.o \
   gc_dlopen.o backgraph.o win32_threads.o pthread_start.o \
-  thread_local_alloc.o fnlz_mlc.o
+  thread_local_alloc.o fnlz_mlc.o atomic_ops.o atomic_ops_sysdeps.o
 
 CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c \
   headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c \
@@ -137,8 +138,7 @@ OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE gc.mak \
   BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
   PCR-Makefile SMakefile.amiga \
   digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
-  NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE \
-  build_atomic_ops.sh build_atomic_ops.sh.cygwin
+  NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE
 
 OTHER_FILES= tools/setjmp_t.c tools/callprocs.sh extra/MacOS.c \
   extra/Mac_files/datastart.c extra/Mac_files/dataend.c \
@@ -162,7 +162,7 @@ CURSES= -lcurses -ltermlib
 # the SHELL environment variable.
 SHELL= /bin/sh
 
-SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include
+SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_SRC_DIR)/src
 # Alternative flags to the C compiler for mach_dep.c.
 # Mach_dep.c often doesn't like optimization, and it's
 # not time-critical anyway.
@@ -170,10 +170,11 @@ SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include
 
 all: gc.a gctest
 
-# if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
-# the default location, and we need to build
-$(AO_INSTALL_DIR):
-       CC=$(CC) MAKE=$(MAKE) $(srcdir)/build_atomic_ops.sh
+atomic_ops.o: $(AO_SRC_DIR)/src/atomic_ops.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+
+atomic_ops_sysdeps.o: $(AO_SRC_DIR)/src/atomic_ops_sysdeps.S
+       $(CC) $(CFLAGS) -c -o $@ $<
 
 LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
 
@@ -204,7 +205,7 @@ $(OBJS) tests/test.o dyn_load.o dyn_load_sunos53.o: \
     $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
     $(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \
     $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
-    $(srcdir)/include/gc_config_macros.h $(AO_INSTALL_DIR)
+    $(srcdir)/include/gc_config_macros.h
 
 mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h \
                                         $(srcdir)/include/private/gc_pmark.h
@@ -225,7 +226,6 @@ tests:
 base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
        echo > base_lib
        rm -f dont_ar_1
-       cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a
        ./if_mach SPARC SOLARIS touch dont_ar_1
        ./if_mach SPARC SOLARIS $(AR) rus gc.a $(OBJS) dyn_load.o
        ./if_mach M68K AMIGA touch dont_ar_1
@@ -274,7 +274,7 @@ dyn_load_sunos53.o: dyn_load.c
 
 # SunOS5 shared library version of the collector
 sunos5gc.so: $(OBJS) dyn_load_sunos53.o
-       $(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o $(AO_INSTALL_DIR)/lib/libatomic_ops.a -ldl
+       $(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o -ldl
        ln sunos5gc.so libgc.so
 
 # Alpha/OSF shared library version of the collector
@@ -394,7 +394,7 @@ gctest: tests/test.o gc.a $(UTILS)
 # If an optimized setjmp_test generates a segmentation fault,
 # odds are your compiler is broken.  Gctest may still work.
 # Try compiling setjmp_t.c unoptimized.
-setjmp_test: $(srcdir)/tools/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
+setjmp_test: $(srcdir)/tools/setjmp_t.c $(srcdir)/include/gc.h $(UTILS)
        $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/tools/setjmp_t.c
 
 test: KandRtest cord/cordtest
@@ -413,7 +413,6 @@ gcname: $(srcdir)/tools/gcname.c $(srcdir)/include/gc_version.h
 
 #We assume this is being done from source directory.
 dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
-       cd $(AO_SRC_DIR); $(MAKE) dist
        rm -f `./gcname`
        ln -s . `./gcname`
        ./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) > /tmp/gc.tar-files
diff --git a/build_atomic_ops.sh b/build_atomic_ops.sh
deleted file mode 100755 (executable)
index aa42dec..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-P=`pwd`/libatomic_ops-install
-cd libatomic_ops
-./configure --prefix=$P
-$MAKE CC=$CC install
diff --git a/build_atomic_ops.sh.cygwin b/build_atomic_ops.sh.cygwin
deleted file mode 100755 (executable)
index 848a270..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# We install through the temporary directory in case pwd contains spaces,
-# which otherwise breaks the build machinery.
-# This is a gross hack and probably breaks incremental rebuilds
-mkdir libatomic_ops-install
-P=`pwd`
-Q=`mktemp -d`
-ln -s "$P" $Q/dir
-cd $Q/dir/libatomic_ops
-./configure --prefix=$Q/dir/libatomic_ops-install
-$MAKE CC=$CC install
-cd /
-rm $Q/dir
-rmdir $Q