2076-02-02 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 2 Feb 2007 13:59:54 +0000 (13:59 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 2 Feb 2007 13:59:54 +0000 (13:59 +0000)
PR binutils/3945
* configure.in (DLLTOOL_DEFAULT): New. Defined for the first PE
target.
(DLLTOOL_DEFS): Add $DLLTOOL_DEFAULT.
* configure: Regenerated.

* dlltool.c (mname): Defined with DLLTOOL_DEFAULT_XXX.

binutils/ChangeLog
binutils/configure
binutils/configure.in
binutils/dlltool.c

index 8ab84ccefdcf70e454ee507b5300fc29e20e5877..58e63a6b60998e42830d6ce217c1e1b5d21afffc 100644 (file)
@@ -1,3 +1,13 @@
+2076-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/3945
+       * configure.in (DLLTOOL_DEFAULT): New. Defined for the first PE
+       target.
+       (DLLTOOL_DEFS): Add $DLLTOOL_DEFAULT.
+       * configure: Regenerated.
+
+       * dlltool.c (mname): Defined with DLLTOOL_DEFAULT_XXX.
+
 2007-02-02  Nick Clifton  <nickc@redhat.com>
 
        * doc/binutils.texi (objdump): Document support for disassembling
index 30ff85862b05635eb35f65d4bc3624c523d7ff4c..96ccacdcb8fd490b3c0a0c3a99b7cf18f400cd41 100755 (executable)
@@ -8598,6 +8598,7 @@ NLMCONV_DEFS=
 BUILD_SRCONV=
 BUILD_DLLTOOL=
 DLLTOOL_DEFS=
+DLLTOOL_DEFAULT=
 BUILD_WINDRES=
 BUILD_DLLWRAP=
 BUILD_MISC=
@@ -8635,38 +8636,59 @@ do
        case $targ in
        arm-epoc-pe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        arm-wince-pe* | arm-*-wince)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        arm-*-pe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        thumb-*-pe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        x86_64-*-mingw*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
          ;;
        i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
          ;;
        i[3-7]86-*-interix)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
          ;;
        powerpc*-aix5.[01])
@@ -8676,6 +8698,9 @@ do
          ;;
        powerpc*-*-pe* | powerpc*-*-cygwin*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
@@ -8684,27 +8709,41 @@ do
          ;;
        sh*-*-pe)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        mips*-*-pe)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        mcore-*-pe)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        mcore-*-elf)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
          ;;
        esac
     fi
 done
 
+DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT"
+
 if test "${with_windres+set}" = set; then
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
 fi
index 383dbcdae10356026f37a993452fba6323a7711b..cd89a4cb1924dbd14ba713e42f906b527dd945b7 100644 (file)
@@ -207,6 +207,7 @@ NLMCONV_DEFS=
 BUILD_SRCONV=
 BUILD_DLLTOOL=
 DLLTOOL_DEFS=
+DLLTOOL_DEFAULT=
 BUILD_WINDRES=
 BUILD_DLLWRAP=
 BUILD_MISC=
@@ -246,26 +247,41 @@ changequote([,])dnl
        case $targ in
        arm-epoc-pe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        arm-wince-pe* | arm-*-wince)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        arm-*-pe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        thumb-*-pe*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        x86_64-*-mingw*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
@@ -274,6 +290,9 @@ changequote(,)dnl
        i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
 changequote([,])dnl
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
@@ -282,6 +301,9 @@ changequote(,)dnl
        i[3-7]86-*-interix)
 changequote([,])dnl
          BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
          ;;
 changequote(,)dnl
@@ -293,6 +315,9 @@ changequote([,])dnl
          ;;
        powerpc*-*-pe* | powerpc*-*-cygwin*)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
@@ -301,27 +326,41 @@ changequote([,])dnl
          ;;
        sh*-*-pe)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        mips*-*-pe)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        mcore-*-pe)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
          ;;
        mcore-*-elf)
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+         if test -z "$DLLTOOL_DEFAULT"; then
+           DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF"
+         fi
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
          ;;
        esac
     fi
 done
 
+DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT"
+
 if test "${with_windres+set}" = set; then
          BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
 fi
index 8a449a0e13943c59043853a38e5ee94018a71040..803383ceb8030ba1b7c85e18d0067a35a1b46dcb 100644 (file)
@@ -387,41 +387,43 @@ static int verbose;
 static FILE *output_def;
 static FILE *base_file;
 
-#ifdef DLLTOOL_ARM
-#if defined(DLLTOOL_ARM_EPOC)
-static const char *mname = "arm-epoc";
-#elif defined(DLLTOOL_ARM_WINCE)
-static const char *mname = "arm-wince";
-#else
+#ifdef DLLTOOL_DEFAULT_ARM
 static const char *mname = "arm";
 #endif
+
+#ifdef DLLTOOL_DEFAULT_ARM_EPOC
+static const char *mname = "arm-epoc";
+#endif
+
+#ifdef DLLTOOL_DEFAULT_ARM_WINCE
+static const char *mname = "arm-wince";
 #endif
 
-#ifdef DLLTOOL_I386
+#ifdef DLLTOOL_DEFAULT_I386
 static const char *mname = "i386";
 #endif
 
-#ifdef DLLTOOL_MX86_64
+#ifdef DLLTOOL_DEFAULT_MX86_64
 static const char *mname = "i386:x86-64";
 #endif
 
-#ifdef DLLTOOL_PPC
+#ifdef DLLTOOL_DEFAULT_PPC
 static const char *mname = "ppc";
 #endif
 
-#ifdef DLLTOOL_SH
+#ifdef DLLTOOL_DEFAULT_SH
 static const char *mname = "sh";
 #endif
 
-#ifdef DLLTOOL_MIPS
+#ifdef DLLTOOL_DEFAULT_MIPS
 static const char *mname = "mips";
 #endif
 
-#ifdef DLLTOOL_MCORE
+#ifdef DLLTOOL_DEFAULT_MCORE
 static const char * mname = "mcore-le";
 #endif
 
-#ifdef DLLTOOL_MCORE_ELF
+#ifdef DLLTOOL_DEFAULT_MCORE_ELF
 static const char * mname = "mcore-elf";
 static char * mcore_elf_out_file = NULL;
 static char * mcore_elf_linker   = NULL;