Hi, The attached patch attempts to enable automatic linking of libatomic, and makes the following changes: (1) Introduces a new driver option -f[no]-link-libatomic, which is enabled by default. (2) Adds new dependencies in toplevel Makefile.def so libatomic is built before other target libraries are configured. (3) Adds libatomic to $bootstrap_target_libs in toplevel configure.ac. (4) Passes -fno-link-libatomic when building libatomic itself and copies libatomic.a into $gcc_build/gcc/ directory, similar to libgcc's install-leaf rule. (5) Defines spec for linking libatomic in LINK_LIBATOMIC_SPEC and uses it in LINK_GCC_C_SEQUENCE_SPEC.
Patch passes bootstrap+test on aarch64-unknown-linux-gnu, and x86_64-linux-gnu. I have following questions: (1) Since the patch adds -f[no]-link-libatomic, would configure option still be required for enabling/disabling linking libatomic ? My motivation for adding a compiler option mainly was to disable linking libatomic while building libatomic itself. Also, I think there's perhaps excessive use of -fno-link-libatomic in libatomic's Makefile.am and configure.ac in the patch. I will try to trim it down. (2) While the patch passed testing, I am not sure if the link paths are setup correctly for linking with shared libatomic.so (the patch only copies libatomic.a into $gcc_build/gcc/). Do we need any additional changes here ? I would be grateful for suggestions on how to proceed. Thanks, Prathamesh
PR81358: Enable automatic linking of libatomic. ChangeLog: PR driver/81358 * Makefile.def: Add dependencies so libatomic is built before target libraries are configured. * configure.ac: Add libatomic to bootstrap_target_libs. * Makefile.in: Regenerate. * configure: Regenerate. gcc/ChangeLog: PR driver/81358 * common.opt: New option -flink-atomic. * config/gnu-user.h (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Use LINK_LIBATOMIC_SPEC. * gcc.cc (LINK_LIBATOMIC_SPEC): New macro. libatomic/ChangeLog: PR driver/81358 * Makefile.am: Pass -fno-link-atomic. New rule all. * configure.ac: Pass -fno-link-atomic. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. Signed-off-by: Prathamesh Kulkarni <prathame...@nvidia.com> Co-authored-by: Matthew Malcolmson <mmalcolm...@nvidia.com> diff --git a/Makefile.def b/Makefile.def index 19954e7d731..90899fa28cf 100644 --- a/Makefile.def +++ b/Makefile.def @@ -656,6 +656,26 @@ lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; }; // a dependency on libgcc for native targets to configure. lang_env_dependencies = { module=libiberty; no_c=true; }; +dependencies = { module=configure-target-libbacktrace; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgloss; on=all-target-libatomic; }; +dependencies = { module=configure-target-newlib; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgomp; on=all-target-libatomic; }; +dependencies = { module=configure-target-libitm; on=all-target-libatomic; }; +dependencies = { module=configure-target-libstdc++v3; on=all-target-libatomic; }; +dependencies = { module=configure-target-libsanitizer; on=all-target-libatomic; }; +dependencies = { module=configure-target-libvtv; on=all-target-libatomic; }; +dependencies = { module=configure-target-libssp; on=all-target-libatomic; }; +dependencies = { module=configure-target-libquadmath; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgfortran; on=all-target-libatomic; }; +dependencies = { module=configure-target-libffi; on=all-target-libatomic; }; +dependencies = { module=configure-target-libobjc; on=all-target-libatomic; }; +dependencies = { module=configure-target-libada; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgm2; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgo; on=all-target-libatomic; }; +dependencies = { module=configure-target-libgrust; on=all-target-libatomic; }; +dependencies = { module=configure-target-libphobos; on=all-target-libatomic; }; +dependencies = { module=configure-target-zlib; on=all-target-libatomic; }; + dependencies = { module=configure-target-fastjar; on=configure-target-zlib; }; dependencies = { module=all-target-fastjar; on=all-target-zlib; }; dependencies = { module=configure-target-libgo; on=configure-target-libffi; }; diff --git a/Makefile.in b/Makefile.in index 966d6045496..5295929bfa9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -68551,6 +68551,66 @@ all-flex: maybe-all-build-bison all-flex: maybe-all-m4 all-flex: maybe-all-build-texinfo all-m4: maybe-all-build-texinfo +configure-target-libbacktrace: maybe-all-target-libatomic +configure-stage1-target-libbacktrace: maybe-all-stage1-target-libatomic +configure-stage2-target-libbacktrace: maybe-all-stage2-target-libatomic +configure-stage3-target-libbacktrace: maybe-all-stage3-target-libatomic +configure-stage4-target-libbacktrace: maybe-all-stage4-target-libatomic +configure-stageprofile-target-libbacktrace: maybe-all-stageprofile-target-libatomic +configure-stagetrain-target-libbacktrace: maybe-all-stagetrain-target-libatomic +configure-stagefeedback-target-libbacktrace: maybe-all-stagefeedback-target-libatomic +configure-stageautoprofile-target-libbacktrace: maybe-all-stageautoprofile-target-libatomic +configure-stageautofeedback-target-libbacktrace: maybe-all-stageautofeedback-target-libatomic +configure-target-libgomp: maybe-all-target-libatomic +configure-stage1-target-libgomp: maybe-all-stage1-target-libatomic +configure-stage2-target-libgomp: maybe-all-stage2-target-libatomic +configure-stage3-target-libgomp: maybe-all-stage3-target-libatomic +configure-stage4-target-libgomp: maybe-all-stage4-target-libatomic +configure-stageprofile-target-libgomp: maybe-all-stageprofile-target-libatomic +configure-stagetrain-target-libgomp: maybe-all-stagetrain-target-libatomic +configure-stagefeedback-target-libgomp: maybe-all-stagefeedback-target-libatomic +configure-stageautoprofile-target-libgomp: maybe-all-stageautoprofile-target-libatomic +configure-stageautofeedback-target-libgomp: maybe-all-stageautofeedback-target-libatomic +configure-target-libsanitizer: maybe-all-target-libatomic +configure-stage1-target-libsanitizer: maybe-all-stage1-target-libatomic +configure-stage2-target-libsanitizer: maybe-all-stage2-target-libatomic +configure-stage3-target-libsanitizer: maybe-all-stage3-target-libatomic +configure-stage4-target-libsanitizer: maybe-all-stage4-target-libatomic +configure-stageprofile-target-libsanitizer: maybe-all-stageprofile-target-libatomic +configure-stagetrain-target-libsanitizer: maybe-all-stagetrain-target-libatomic +configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libatomic +configure-stageautoprofile-target-libsanitizer: maybe-all-stageautoprofile-target-libatomic +configure-stageautofeedback-target-libsanitizer: maybe-all-stageautofeedback-target-libatomic +configure-target-libvtv: maybe-all-target-libatomic +configure-stage1-target-libvtv: maybe-all-stage1-target-libatomic +configure-stage2-target-libvtv: maybe-all-stage2-target-libatomic +configure-stage3-target-libvtv: maybe-all-stage3-target-libatomic +configure-stage4-target-libvtv: maybe-all-stage4-target-libatomic +configure-stageprofile-target-libvtv: maybe-all-stageprofile-target-libatomic +configure-stagetrain-target-libvtv: maybe-all-stagetrain-target-libatomic +configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-target-libatomic +configure-stageautoprofile-target-libvtv: maybe-all-stageautoprofile-target-libatomic +configure-stageautofeedback-target-libvtv: maybe-all-stageautofeedback-target-libatomic +configure-target-libphobos: maybe-all-target-libatomic +configure-stage1-target-libphobos: maybe-all-stage1-target-libatomic +configure-stage2-target-libphobos: maybe-all-stage2-target-libatomic +configure-stage3-target-libphobos: maybe-all-stage3-target-libatomic +configure-stage4-target-libphobos: maybe-all-stage4-target-libatomic +configure-stageprofile-target-libphobos: maybe-all-stageprofile-target-libatomic +configure-stagetrain-target-libphobos: maybe-all-stagetrain-target-libatomic +configure-stagefeedback-target-libphobos: maybe-all-stagefeedback-target-libatomic +configure-stageautoprofile-target-libphobos: maybe-all-stageautoprofile-target-libatomic +configure-stageautofeedback-target-libphobos: maybe-all-stageautofeedback-target-libatomic +configure-target-zlib: maybe-all-target-libatomic +configure-stage1-target-zlib: maybe-all-stage1-target-libatomic +configure-stage2-target-zlib: maybe-all-stage2-target-libatomic +configure-stage3-target-zlib: maybe-all-stage3-target-libatomic +configure-stage4-target-zlib: maybe-all-stage4-target-libatomic +configure-stageprofile-target-zlib: maybe-all-stageprofile-target-libatomic +configure-stagetrain-target-zlib: maybe-all-stagetrain-target-libatomic +configure-stagefeedback-target-zlib: maybe-all-stagefeedback-target-libatomic +configure-stageautoprofile-target-zlib: maybe-all-stageautoprofile-target-libatomic +configure-stageautofeedback-target-zlib: maybe-all-stageautofeedback-target-libatomic configure-target-libgo: maybe-configure-target-libffi all-target-libgo: maybe-all-target-libffi configure-target-libphobos: maybe-configure-target-libbacktrace @@ -68678,6 +68738,45 @@ configure-m4: stage_last @endif gcc-bootstrap @if gcc-bootstrap +@unless target-libatomic-bootstrap +configure-target-libgloss: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-newlib: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libitm: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libstdc++v3: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libssp: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libquadmath: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libgfortran: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libffi: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libobjc: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libada: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libgm2: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libgo: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap +@unless target-libatomic-bootstrap +configure-target-libgrust: maybe-all-target-libatomic +@endunless target-libatomic-bootstrap @unless target-zlib-bootstrap configure-target-fastjar: maybe-configure-target-zlib @endunless target-zlib-bootstrap @@ -68755,6 +68854,19 @@ all-fastjar: maybe-all-libiberty all-bison: maybe-all-gettext all-flex: maybe-all-gettext all-m4: maybe-all-gettext +configure-target-libgloss: maybe-all-target-libatomic +configure-target-newlib: maybe-all-target-libatomic +configure-target-libitm: maybe-all-target-libatomic +configure-target-libstdc++v3: maybe-all-target-libatomic +configure-target-libssp: maybe-all-target-libatomic +configure-target-libquadmath: maybe-all-target-libatomic +configure-target-libgfortran: maybe-all-target-libatomic +configure-target-libffi: maybe-all-target-libatomic +configure-target-libobjc: maybe-all-target-libatomic +configure-target-libada: maybe-all-target-libatomic +configure-target-libgm2: maybe-all-target-libatomic +configure-target-libgo: maybe-all-target-libatomic +configure-target-libgrust: maybe-all-target-libatomic configure-target-fastjar: maybe-configure-target-zlib all-target-fastjar: maybe-all-target-zlib configure-target-libgo: maybe-all-target-libstdc++-v3 diff --git a/configure b/configure index a2e86731b08..e551e290e37 100755 --- a/configure +++ b/configure @@ -775,6 +775,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -949,6 +950,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1201,6 +1203,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1338,7 +1349,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1498,6 +1509,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -10870,6 +10882,11 @@ if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then bootstrap_target_libs=${bootstrap_target_libs}target-libgomp, fi +# If we are building libatomic, bootstrap it. +if echo " ${target_configdirs} " | grep " libatomic " > /dev/null 2>&1 ; then + bootstrap_target_libs=${bootstrap_target_libs}target-libatomic, +fi + # If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan # or bootstrap-ubsan, bootstrap it. if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then diff --git a/configure.ac b/configure.ac index 25419a1d2ab..566d18c0a9c 100644 --- a/configure.ac +++ b/configure.ac @@ -3106,6 +3106,11 @@ if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then bootstrap_target_libs=${bootstrap_target_libs}target-libgomp, fi +# If we are building libatomic, bootstrap it. +if echo " ${target_configdirs} " | grep " libatomic " > /dev/null 2>&1 ; then + bootstrap_target_libs=${bootstrap_target_libs}target-libatomic, +fi + # If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan # or bootstrap-ubsan, bootstrap it. if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then diff --git a/gcc/common.opt b/gcc/common.opt index 0b1f1ec26e1..b6245ab4509 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3329,6 +3329,9 @@ Use the Modern linker (MOLD) linker instead of the default linker. fuse-linker-plugin Common Undocumented Var(flag_use_linker_plugin) +flink-libatomic +Common Driver Var(flag_link_libatomic) Init(1) + ; Positive if we should track variables, negative if we should run ; the var-tracking pass only to discard debug annotations, zero if ; we're not to run it. diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h index f7eefdafe8b..27d0ef07e1e 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h @@ -109,8 +109,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " #endif + #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \ - "%{static|static-pie:--start-group} %G %{!nolibc:%L} \ + "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC "%L} \ %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}" #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/gcc.cc b/gcc/gcc.cc index 5fe5fd86a98..3bf77f28683 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -981,6 +981,13 @@ proper position among the other output files. */ /* Here is the spec for running the linker, after compiling all files. */ +#ifdef USE_LD_AS_NEEDED +#define LINK_LIBATOMIC_SPEC "%{!fno-link-libatomic:" LD_AS_NEEDED_OPTION \ + " -latomic " LD_NO_AS_NEEDED_OPTION "} " +#else +#define LINK_LIBATOMIC_SPEC "" +#endif + /* This is overridable by the target in case they need to specify the -lgcc and -lc order specially, yet not require them to override all of LINK_COMMAND_SPEC. */ diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am index efadd9dcd48..66ef9fd8675 100644 --- a/libatomic/Makefile.am +++ b/libatomic/Makefile.am @@ -35,9 +35,9 @@ search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) \ vpath % $(strip $(search_path)) DEFAULT_INCLUDES = $(addprefix -I, $(search_path)) -AM_CFLAGS = $(XCFLAGS) -AM_CCASFLAGS = $(XCFLAGS) -AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) +AM_CFLAGS = $(XCFLAGS) -fno-link-libatomic +AM_CCASFLAGS = $(XCFLAGS) -fno-link-libatomic +AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) -fno-link-libatomic toolexeclib_LTLIBRARIES = libatomic.la noinst_LTLIBRARIES = libatomic_convenience.la @@ -69,7 +69,7 @@ libatomic_darwin_rpath += -Wl,-rpath,@loader_path endif libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ - $(lt_host_flags) $(libatomic_darwin_rpath) + -Wc,-fno-link-libatomic $(lt_host_flags) $(libatomic_darwin_rpath) libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \ fenv.c fence.c flag.c @@ -162,6 +162,11 @@ libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD) # when it is reloaded during the build of all-multi. all-multi: $(libatomic_la_LIBADD) +gcc_objdir = $(MULTIBUILDTOP)../../$(host_subdir)/gcc +all: all-multi libatomic.la + $(INSTALL_DATA) .libs/libatomic.a $(gcc_objdir)/ + chmod 644 $(gcc_objdir)/libatomic.a + # target overrides -include $(tmake_file) diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in index 9798e7c09e9..62cd5e0a76b 100644 --- a/libatomic/Makefile.in +++ b/libatomic/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -187,11 +187,16 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = $(SHELL) $(top_srcdir)/../depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/atomic_16.Plo ./$(DEPDIR)/fence.Plo \ + ./$(DEPDIR)/fenv.Plo ./$(DEPDIR)/flag.Plo ./$(DEPDIR)/gcas.Plo \ + ./$(DEPDIR)/gexch.Plo ./$(DEPDIR)/glfree.Plo \ + ./$(DEPDIR)/gload.Plo ./$(DEPDIR)/gstore.Plo \ + ./$(DEPDIR)/init.Plo ./$(DEPDIR)/lock.Plo am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CCASFLAGS) $(CCASFLAGS) @@ -383,6 +388,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -405,9 +411,9 @@ search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) \ $(top_srcdir) $(top_builddir) DEFAULT_INCLUDES = $(addprefix -I, $(search_path)) -AM_CFLAGS = $(XCFLAGS) -AM_CCASFLAGS = $(XCFLAGS) -AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) +AM_CFLAGS = $(XCFLAGS) -fno-link-libatomic +AM_CCASFLAGS = $(XCFLAGS) -fno-link-libatomic +AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) -fno-link-libatomic toolexeclib_LTLIBRARIES = libatomic.la noinst_LTLIBRARIES = libatomic_convenience.la @LIBAT_BUILD_VERSIONED_SHLIB_FALSE@libatomic_version_script = @@ -421,7 +427,7 @@ libatomic_version_info = -version-info $(libtool_VERSION) @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ - $(lt_host_flags) $(libatomic_darwin_rpath) + -Wc,-fno-link-libatomic $(lt_host_flags) $(libatomic_darwin_rpath) libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c \ init.c fenv.c fence.c flag.c $(am__append_5) @@ -458,6 +464,7 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16 libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES) libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD) +gcc_objdir = $(MULTIBUILDTOP)../../$(host_subdir)/gcc MULTISRCTOP = MULTIBUILDTOP = MULTIDIRS = @@ -490,8 +497,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/../multilib.am $(am__empty): @@ -577,17 +584,23 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_16.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fence.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fenv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flag.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcas.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glfree.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gload.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstore.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_16.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fence.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fenv.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flag.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcas.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexch.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glfree.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gload.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstore.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .S.o: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -791,7 +804,17 @@ clean-am: clean-generic clean-libtool clean-local \ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/atomic_16.Plo + -rm -f ./$(DEPDIR)/fence.Plo + -rm -f ./$(DEPDIR)/fenv.Plo + -rm -f ./$(DEPDIR)/flag.Plo + -rm -f ./$(DEPDIR)/gcas.Plo + -rm -f ./$(DEPDIR)/gexch.Plo + -rm -f ./$(DEPDIR)/glfree.Plo + -rm -f ./$(DEPDIR)/gload.Plo + -rm -f ./$(DEPDIR)/gstore.Plo + -rm -f ./$(DEPDIR)/init.Plo + -rm -f ./$(DEPDIR)/lock.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-local distclean-tags @@ -839,7 +862,17 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/atomic_16.Plo + -rm -f ./$(DEPDIR)/fence.Plo + -rm -f ./$(DEPDIR)/fenv.Plo + -rm -f ./$(DEPDIR)/flag.Plo + -rm -f ./$(DEPDIR)/gcas.Plo + -rm -f ./$(DEPDIR)/gexch.Plo + -rm -f ./$(DEPDIR)/glfree.Plo + -rm -f ./$(DEPDIR)/gload.Plo + -rm -f ./$(DEPDIR)/gstore.Plo + -rm -f ./$(DEPDIR)/init.Plo + -rm -f ./$(DEPDIR)/lock.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local @@ -862,18 +895,19 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ - am--refresh check check-am clean clean-cscope clean-generic \ - clean-libtool clean-local clean-noinstLTLIBRARIES \ - clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-local distclean-tags \ - dvi dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-toolexeclibLTLIBRARIES installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ + am--depfiles am--refresh check check-am clean clean-cscope \ + clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES cscope \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-local distclean-tags dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-local install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip \ + install-toolexeclibLTLIBRARIES installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ mostlyclean-local pdf pdf-am ps ps-am tags tags-am uninstall \ @@ -901,6 +935,9 @@ vpath % $(strip $(search_path)) # makefile fragments to avoid broken *.Ppo getting included into the Makefile # when it is reloaded during the build of all-multi. all-multi: $(libatomic_la_LIBADD) +all: all-multi libatomic.la + $(INSTALL_DATA) .libs/libatomic.a $(gcc_objdir)/ + chmod 644 $(gcc_objdir)/libatomic.a # target overrides -include $(tmake_file) diff --git a/libatomic/aclocal.m4 b/libatomic/aclocal.m4 index 80e24219d7d..4bef515c0f2 100644 --- a/libatomic/aclocal.m4 +++ b/libatomic/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -352,13 +352,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -366,49 +365,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -417,18 +408,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -515,8 +505,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -583,7 +573,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <http://www.gnu.org/software/coreutils/>. +that behaves properly: <https://www.gnu.org/software/coreutils/>. If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -625,7 +615,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -649,7 +639,7 @@ AC_SUBST([install_sh])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -684,7 +674,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -692,49 +682,42 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -773,7 +756,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -802,7 +785,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -849,7 +832,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -868,7 +851,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -949,7 +932,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1009,7 +992,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1037,7 +1020,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1056,7 +1039,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/libatomic/configure b/libatomic/configure index d579bab96f8..d14a412ae16 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -698,7 +698,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -706,8 +705,8 @@ EXEEXT ac_ct_CC CPPFLAGS LDFLAGS -CFLAGS CC +CFLAGS toolexeclibdir toolexecdir multi_basedir @@ -771,6 +770,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -789,7 +789,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -855,6 +856,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1107,6 +1109,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1244,7 +1255,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1397,6 +1408,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2739,7 +2751,7 @@ target_alias=${target_alias-$host_alias} # -Wall: turns on all automake warnings... # -Wno-portability: ...except this one, since GNU make is required. # -Wno-override: ... and this one, since we do want this in testsuite. -am__api_version='1.15' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3255,8 +3267,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -3307,7 +3319,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <http://www.gnu.org/software/coreutils/>. +that behaves properly: <https://www.gnu.org/software/coreutils/>. If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3409,6 +3421,8 @@ esac +CFLAGS="$CFLAGS -fno-link-libatomic" + # Check the compiler. # The same as in boehm-gc and libstdc++. Have to borrow it from there. # We must force CC to /not/ be precious variables; otherwise @@ -4268,45 +4282,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -4591,8 +4605,6 @@ fi - - # In order to override CFLAGS_FOR_TARGET, all of our special flags go # in XCFLAGS. But we need them in CFLAGS during configury. So put them # in both places for now and restore CFLAGS at the end of config. @@ -11456,7 +11468,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11459 "configure" +#line 11471 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11562,7 +11574,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11565 "configure" +#line 11577 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11929,6 +11941,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac +SYSROOT_CFLAGS_FOR_TARGET="$SYSROOT_CFLAGS_FOR_TARGET -fno-link-libatomic" # Get target configury. @@ -14994,6 +15007,8 @@ rm -f core conftest.err conftest.$ac_objext \ ;; esac +CFLAGS="$CFLAGS -fno-link-libatomic" + # See what sort of export controls are available. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5 @@ -15753,12 +15768,16 @@ fi XCFLAGS="$XCFLAGS $CET_FLAGS" -XCFLAGS="$XCFLAGS $XPCFLAGS" +XCFLAGS="$XCFLAGS $XPCFLAGS -fno-link-libatomic" +XLDFLAGS="$XLDFLAGS -fno-link-libatomic" + + +LDFLAGS="$LDFLAGS -fno-link-libatomic" # Conditionalize the makefile for this target machine. @@ -16620,7 +16639,7 @@ CC="$CC" CXX="$CXX" GFORTRAN="$GFORTRAN" GDC="$GDC" -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -17523,29 +17542,35 @@ esac ;; # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17563,53 +17588,48 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/libatomic/configure.ac b/libatomic/configure.ac index 32a2cdb13ae..2472529f539 100644 --- a/libatomic/configure.ac +++ b/libatomic/configure.ac @@ -123,6 +123,8 @@ esac AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) +CFLAGS="$CFLAGS -fno-link-libatomic" +AC_SUBST(CFLAGS) # Check the compiler. # The same as in boehm-gc and libstdc++. Have to borrow it from there. # We must force CC to /not/ be precious variables; otherwise @@ -135,8 +137,6 @@ AC_PROG_CC AM_PROG_AS m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) -AC_SUBST(CFLAGS) - # In order to override CFLAGS_FOR_TARGET, all of our special flags go # in XCFLAGS. But we need them in CFLAGS during configury. So put them # in both places for now and restore CFLAGS at the end of config. @@ -172,6 +172,7 @@ case "$target" in ;; esac +SYSROOT_CFLAGS_FOR_TARGET="$SYSROOT_CFLAGS_FOR_TARGET -fno-link-libatomic" AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET) # Get target configury. @@ -239,6 +240,8 @@ case " $config_path " in ;; esac +CFLAGS="$CFLAGS -fno-link-libatomic" + # See what sort of export controls are available. LIBAT_CHECK_ATTRIBUTE_VISIBILITY LIBAT_CHECK_ATTRIBUTE_DLLEXPORT @@ -266,7 +269,8 @@ AS_IF([test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"], GCC_CET_FLAGS(CET_FLAGS) XCFLAGS="$XCFLAGS $CET_FLAGS" -XCFLAGS="$XCFLAGS $XPCFLAGS" +XCFLAGS="$XCFLAGS $XPCFLAGS -fno-link-libatomic" +XLDFLAGS="$XLDFLAGS -fno-link-libatomic" AC_SUBST(config_path) AC_SUBST(XCFLAGS) @@ -274,6 +278,9 @@ AC_SUBST(XLDFLAGS) AC_SUBST(LIBS) AC_SUBST(SIZES) +LDFLAGS="$LDFLAGS -fno-link-libatomic" +AC_SUBST(LDFLAGS) + # Conditionalize the makefile for this target machine. tmake_file_= for f in ${tmake_file} diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in index 247268f1949..3974ce8fe9f 100644 --- a/libatomic/testsuite/Makefile.in +++ b/libatomic/testsuite/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -253,6 +253,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -300,8 +301,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -332,7 +333,7 @@ check-DEJAGNU: site.exp EXPECT=$(EXPECT); export EXPECT; \ if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ - if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + if $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS); \ then :; else exit_status=1; fi; \ done; \ else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\