]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: add the --without-libatomic configure option
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 May 2014 20:22:27 +0000 (20:22 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 May 2014 20:22:27 +0000 (20:22 +0000)
This adds the --without-libatomic configure option, which is useful for building libgo
with a non-gcc compiler.

It disables libgo's dependency on libatomic. This
is useful for platforms where it is known that the libatomic runtime
functions are not required, or where the compiler automatically
provides an implementation of them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211065 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/Makefile.am
libgo/Makefile.in
libgo/configure
libgo/configure.ac
libgo/testsuite/Makefile.in

index efdeeabdb877cbbeaf928bd9ba26247af9fba29d..91c5d1c6a8710144153a20678b5f93f121869b1e 100644 (file)
@@ -30,6 +30,8 @@ toolexeclibgodir = $(nover_glibgo_toolexeclibdir)/go/$(gcc_version)/$(target_ali
 LIBFFI = @LIBFFI@
 LIBFFIINCS = @LIBFFIINCS@
 
+LIBATOMIC = @LIBATOMIC@
+
 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
 
 # -I/-D flags to pass when compiling.
@@ -1949,8 +1951,7 @@ libgo_la_LDFLAGS = \
 
 libgo_la_LIBADD = \
        $(libgo_go_objs) ../libbacktrace/libbacktrace.la \
-       ../libatomic/libatomic_convenience.la \
-       $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
+       $(LIBATOMIC) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
 
 libgobegin_a_SOURCES = \
        runtime/go-main.c
index 1b3aedf248f9c849feaa82f48d33c9a0703e5cb6..53299835eab1a388512b79deea7a2ddf1853b55a 100644 (file)
@@ -171,10 +171,9 @@ am__DEPENDENCIES_2 = bufio.lo bytes.lo bytes/index.lo crypto.lo \
        testing/iotest.lo testing/quick.lo unicode/utf16.lo \
        unicode/utf8.lo
 libgo_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
-       ../libbacktrace/libbacktrace.la \
-       ../libatomic/libatomic_convenience.la $(am__DEPENDENCIES_1) \
+       ../libbacktrace/libbacktrace.la $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1)
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 @LIBGO_IS_LINUX_FALSE@am__objects_1 = lock_sema.lo thread-sema.lo
 @LIBGO_IS_LINUX_TRUE@am__objects_1 = lock_futex.lo thread-linux.lo
 @HAVE_SYS_MMAN_H_FALSE@am__objects_2 = mem_posix_memalign.lo
@@ -316,6 +315,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBATOMIC = @LIBATOMIC@
 LIBFFI = @LIBFFI@
 LIBFFIINCS = @LIBFFIINCS@
 LIBOBJS = @LIBOBJS@
@@ -2020,8 +2020,7 @@ libgo_la_LDFLAGS = \
 
 libgo_la_LIBADD = \
        $(libgo_go_objs) ../libbacktrace/libbacktrace.la \
-       ../libatomic/libatomic_convenience.la \
-       $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
+       $(LIBATOMIC) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
 
 libgobegin_a_SOURCES = \
        runtime/go-main.c
index 23ef791dcc735715d132d090ceda1d237d832f9b..22f935200cc08e9ec80173d06f9d48a5ca9d4e29 100755 (executable)
@@ -676,6 +676,7 @@ LIBGO_IS_FREEBSD_TRUE
 LIBGO_IS_DARWIN_FALSE
 LIBGO_IS_DARWIN_TRUE
 go_include
+LIBATOMIC
 LIBFFIINCS
 LIBFFI
 nover_glibgo_toolexeclibdir
@@ -817,6 +818,7 @@ enable_libtool_lock
 enable_werror
 enable_version_specific_runtime_libs
 with_libffi
+with_libatomic
 with_system_libunwind
 enable_sjlj_exceptions
 '
@@ -1469,6 +1471,7 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --without-libffi        don't use libffi
+  --without-libatomic     don't use libatomic
   --with-system-libunwind use installed libunwind
 
 Some influential environment variables:
@@ -11115,7 +11118,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11118 "configure"
+#line 11121 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11221,7 +11224,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11224 "configure"
+#line 11227 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
+# See if the user wants to configure without libatomic. This is useful if we are
+# on an architecture for which libgo does not need an atomic support library and
+# libatomic does not support our C compiler.
+
+# Check whether --with-libatomic was given.
+if test "${with_libatomic+set}" = set; then :
+  withval=$with_libatomic; :
+else
+  with_libatomic=${with_libatomic_default-yes}
+fi
+
+
+LIBATOMIC=
+if test "$with_libatomic" != no; then
+   LIBATOMIC=../libatomic/libatomic_convenience.la
+fi
+
+
 # Used to tell GNU make to include a file without telling automake to
 # include it.
 go_include="-include"
index 8f55cac797ca9245778fee8a967beb98a57e0341..1f5aea8c6763c883fe36d66ba09e1233873572f9 100644 (file)
@@ -122,6 +122,21 @@ fi
 AC_SUBST(LIBFFI)
 AC_SUBST(LIBFFIINCS)
 
+# See if the user wants to configure without libatomic. This is useful if we are
+# on an architecture for which libgo does not need an atomic support library and
+# libatomic does not support our C compiler.
+AC_ARG_WITH(libatomic,
+  AS_HELP_STRING([--without-libatomic],
+                 [don't use libatomic]),
+  [:],
+  [with_libatomic=${with_libatomic_default-yes}])
+
+LIBATOMIC=
+if test "$with_libatomic" != no; then
+   LIBATOMIC=../libatomic/libatomic_convenience.la
+fi
+AC_SUBST(LIBATOMIC)
+
 # Used to tell GNU make to include a file without telling automake to
 # include it.
 go_include="-include"
index 8f0e2ad9337d8f5b75df39c758bba48781a20408..7f7fb74c5896cb7528cf2c4f92e4e839d594d09f 100644 (file)
@@ -96,6 +96,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBATOMIC = @LIBATOMIC@
 LIBFFI = @LIBFFI@
 LIBFFIINCS = @LIBFFIINCS@
 LIBOBJS = @LIBOBJS@