From: H.J. Lu Date: Fri, 2 Feb 2007 13:59:54 +0000 (+0000) Subject: 2076-02-02 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7aad4c3d675f44a20cf9e5a66dc32181da1e9a2e;p=binutils-gdb.git 2076-02-02 H.J. Lu 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. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 8ab84ccefdc..58e63a6b609 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,13 @@ +2076-02-02 H.J. Lu + + 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 * doc/binutils.texi (objdump): Document support for disassembling diff --git a/binutils/configure b/binutils/configure index 30ff85862b0..96ccacdcb8f 100755 --- a/binutils/configure +++ b/binutils/configure @@ -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 diff --git a/binutils/configure.in b/binutils/configure.in index 383dbcdae10..cd89a4cb192 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -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 diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 8a449a0e139..803383ceb80 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -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;