Merge commit '81bffae368f331b6cd386a814f225a58e3f32f40'
authorJames Almer <jamrial@gmail.com>
Tue, 17 Oct 2017 18:14:10 +0000 (15:14 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 17 Oct 2017 18:14:10 +0000 (15:14 -0300)
* commit '81bffae368f331b6cd386a814f225a58e3f32f40':
  configure: Check for -no_weak_imports in ldflags on macOS

Merged-by: James Almer <jamrial@gmail.com>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -5027,16 -3945,15 +5027,17 @@@ case $target_os i
          ;;
      darwin)
          enabled ppc && add_asflags -force_cpusubtype_ALL
 -        SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
 +        install_name_dir_default='$(SHLIBDIR)'
 +        SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
          enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
 +        strip="${strip} -x"
          add_ldflags -Wl,-dynamic,-search_paths_first
+         check_ldflags -Wl,-no_weak_imports
          SLIBSUF=".dylib"
 -        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
 -        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
 +        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
 +        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
          enabled x86_64 && objformat="macho64" || objformat="macho32"
 -        enabled_any pic shared ||
 +        enabled_any pic shared x86_64 ||
              { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
          check_header dispatch/dispatch.h &&
              add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'