diff --git a/Makefile.def b/Makefile.def index e5b95d7f705..e7f33345aa8 100644 --- a/Makefile.def +++ b/Makefile.def @@ -650,14 +650,15 @@ dependencies = { module=all-m4; on=all-build-texinfo; }; // on libgcc and newlib/libgloss. lang_env_dependencies = { module=libitm; cxx=true; }; lang_env_dependencies = { module=libffi; cxx=true; }; -lang_env_dependencies = { module=newlib; no_c=true; }; -lang_env_dependencies = { module=libgloss; no_c=true; }; -lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; }; +lang_env_dependencies = { module=newlib; no_c=true; no_atomic=true; }; +lang_env_dependencies = { module=libgloss; no_c=true; no_atomic=true; }; +lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; no_atomic=true; }; // libiberty does not depend on newlib or libgloss because it must be // built newlib on some targets (e.g. Cygwin). It still needs // a dependency on libgcc for native targets to configure. -lang_env_dependencies = { module=libiberty; no_c=true; }; -lang_env_dependencies = { module=libgcobol; cxx=true; }; +lang_env_dependencies = { module=libiberty; no_c=true; no_atomic=true; }; +lang_env_dependencies = { module=libgcobol; cxx=true; no_atomic=true; }; +lang_env_dependencies = { module=libatomic; no_atomic=true; }; dependencies = { module=configure-target-fastjar; on=configure-target-zlib; }; dependencies = { module=all-target-fastjar; on=all-target-zlib; }; diff --git a/configure b/configure index 673c6728604..2551fe02752 100755 --- a/configure +++ b/configure @@ -11075,6 +11075,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 2996a124206..94321ffd20a 100644 --- a/configure.ac +++ b/configure.ac @@ -3251,6 +3251,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