Merge commit '67c72f08a4707c18a67a4734660e3a23cc9488b6'
authorJames Almer <jamrial@gmail.com>
Sun, 12 Nov 2017 03:20:34 +0000 (00:20 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 12 Nov 2017 03:20:34 +0000 (00:20 -0300)
* commit '67c72f08a4707c18a67a4734660e3a23cc9488b6':
  configure: Stop using dlltool to create an import library

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

diff --cc configure
+++ b/configure
@@@ -4969,34 -3901,18 +4965,33 @@@ case $target_os i
          shlibdir_default="$bindir_default"
          SLIBPREF=""
          SLIBSUF=".dll"
 -        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)'
-         SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+         SLIB_EXTRA_CMD='cp $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
          SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
          SLIB_INSTALL_LINKS=
          SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
          SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
          SLIB_CREATE_DEF_CMD='ARCH="$(ARCH)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
 -        SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-auto-image-base $$(@:$(SLIBSUF)=.def)'
 +        SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--disable-auto-image-base $$(@:$(SLIBSUF)=.def)'
          enabled x86_64 && objformat="win64" || objformat="win32"
-         dlltool="${cross_prefix}dlltool"
          ranlib=:
          enable dos_paths
 +        check_ldflags -Wl,--nxcompat,--dynamicbase
 +        # Lets work around some stupidity in binutils.
 +        # ld will strip relocations from executables even though we need them
 +        # for dynamicbase (ASLR).  Using -pie does retain the reloc section
 +        # however ld then forgets what the entry point should be (oops) so we
 +        # have to manually (re)set it.
 +        if enabled x86_32; then
 +            disabled debug && add_ldexeflags -Wl,--pic-executable,-e,_mainCRTStartup
 +        elif enabled x86_64; then
 +            disabled debug && add_ldexeflags -Wl,--pic-executable,-e,mainCRTStartup
 +            check_ldflags -Wl,--high-entropy-va # binutils 2.25
 +            # Set image base >4GB for extra entropy with HEASLR
 +            add_ldexeflags -Wl,--image-base,0x140000000
 +            append SHFLAGS -Wl,--image-base,0x180000000
 +        fi
          ;;
      win32|win64)
          disable symver
@@@ -6817,18 -5251,10 +6812,17 @@@ OBJCC_O=$OBJCC_
  CC_C=$CC_C
  CC_E=$CC_E
  CC_O=$CC_O
 -X86ASM_O=$X86ASM_O
 +CXX_C=$CXX_C
 +CXX_O=$CXX_O
 +NVCC_C=$NVCC_C
 +NVCC_O=$NVCC_O
  LD_O=$LD_O
 +X86ASM_O=$X86ASM_O
  LD_LIB=$LD_LIB
  LD_PATH=$LD_PATH
- DLLTOOL=$dlltool
 +WINDRES=$windres
 +DEPWINDRES=$dep_cc
 +DOXYGEN=$doxygen
  LDFLAGS=$LDFLAGS
  LDEXEFLAGS=$LDEXEFLAGS
  LDSOFLAGS=$LDSOFLAGS
@@@ -6878,8 -5300,7 +6872,7 @@@ CFLAGS_HEADERS=$CFLAGS_HEADER
  LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
  EXTRALIBS=$extralibs
  COMPAT_OBJS=$compat_objs
 -INSTALL=install
 +INSTALL=$install
- LIBTARGET=${LIBTARGET}
  SLIBNAME=${SLIBNAME}
  SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}
  SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}