Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pavel Chupin <pavel.v.chupin@gmail.com>
To: gdb-patches@sourceware.org, "H.J. Lu" <hjl.tools@gmail.com>
Subject: [PATCH] Fix libtool.m4 dlopen lookup for mingw
Date: Tue, 27 Nov 2012 07:05:00 -0000	[thread overview]
Message-ID: <CANwJu1-ObTbjMgehfWOY7xTtkaEx3=3Kw-eqfhPJLA3f91MA1A@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]

Hi,
Attached patch removes mingw from special cases of dlopen lookup. It
allows dlopen to be found later in libdl and have it added properly as
-ldl in bfd and sim builds.

To reproduce the problem:

../configure --enable-plugins --target=arm-linux-android
--host=i586-pc-mingw32msvc --build=i386-linux-gnu
make

Error:
../../bfd/libbfd.a(plugin.o): In function `try_load_plugin':
/tmp/gdb/BUILD/bfd/../../bfd/plugin.c:170: undefined reference to `dlopen'
/tmp/gdb/BUILD/bfd/../../bfd/plugin.c:177: undefined reference to `dlsym'
/tmp/gdb/BUILD/bfd/../../bfd/plugin.c:173: undefined reference to `dlerror'

ChangeLog:

2012-11-27  Pavel Chupin  <pavel.v.chupin@intel.com>

        Fix libtool.m4 libdl lookup for mingw
        * libtool.m4: Remove mingw from special case of dlopen lookup
        * bfd/configure: Regenerate.
        * sim/arm/configure: Regenerate.
        * sim/avr/configure: Regenerate.
        * sim/bfin/configure: Regenerate.
        * sim/common/configure: Regenerate.
        * sim/cr16/configure: Regenerate.
        * sim/cris/configure: Regenerate.
        * sim/d10v/configure: Regenerate.
        * sim/erc32/configure: Regenerate.
        * sim/frv/configure: Regenerate.
        * sim/h8300/configure: Regenerate.
        * sim/iq2000/configure: Regenerate.
        * sim/lm32/configure: Regenerate.
        * sim/m32c/configure: Regenerate.
        * sim/m32r/configure: Regenerate.
        * sim/m68hc11/configure: Regenerate.
        * sim/mcore/configure: Regenerate.
        * sim/microblaze/configure: Regenerate.
        * sim/mips/configure: Regenerate.
        * sim/mn10300/configure: Regenerate.
        * sim/moxie/configure: Regenerate.
        * sim/rl78/configure: Regenerate.
        * sim/rx/configure: Regenerate.
        * sim/sh/configure: Regenerate.
        * sim/sh64/configure: Regenerate.
        * sim/v850/configure: Regenerate.

--
Pavel Chupin
Intel Corporation

[-- Attachment #2: Fix-gdb-configure-with-plugins-mingw.patch --]
[-- Type: application/octet-stream, Size: 8611 bytes --]

commit a3f9eedf8de75203dc220d2eb4472152ac81f882
Author: Pavel Chupin <pavel.v.chupin@intel.com>
Date:   Tue Nov 27 10:38:32 2012 +0400

    Fix libtool.m4 libdl lookup for mingw
    
    Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>

diff --git a/bfd/configure b/bfd/configure
index 141e76d..365bf88 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -11143,7 +11143,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/libtool.m4 b/libtool.m4
index 8a14e2b..93a61fb 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1722,7 +1722,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/arm/configure b/sim/arm/configure
index 9afe368..a4de454 100755
--- a/sim/arm/configure
+++ b/sim/arm/configure
@@ -11983,7 +11983,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/avr/configure b/sim/avr/configure
index 632a81a..639295d 100755
--- a/sim/avr/configure
+++ b/sim/avr/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/bfin/configure b/sim/bfin/configure
index 629e08a..b78b5cd 100755
--- a/sim/bfin/configure
+++ b/sim/bfin/configure
@@ -12022,7 +12022,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/common/configure b/sim/common/configure
index e8b6f34..f783480 100755
--- a/sim/common/configure
+++ b/sim/common/configure
@@ -10253,7 +10253,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/cr16/configure b/sim/cr16/configure
index ca6dcab..d1131bc 100644
--- a/sim/cr16/configure
+++ b/sim/cr16/configure
@@ -11990,7 +11990,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/cris/configure b/sim/cris/configure
index efdd4d9..cc2934d 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -12009,7 +12009,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/d10v/configure b/sim/d10v/configure
index ca6dcab..d1131bc 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -11990,7 +11990,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/erc32/configure b/sim/erc32/configure
index a5677bf..9b6e878 100755
--- a/sim/erc32/configure
+++ b/sim/erc32/configure
@@ -11984,7 +11984,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/frv/configure b/sim/frv/configure
index 84ee783..9cb7bee 100755
--- a/sim/frv/configure
+++ b/sim/frv/configure
@@ -12002,7 +12002,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/h8300/configure b/sim/h8300/configure
index 4e11d7a..ee6f66e 100755
--- a/sim/h8300/configure
+++ b/sim/h8300/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/iq2000/configure b/sim/iq2000/configure
index b70a129..22e93c4 100755
--- a/sim/iq2000/configure
+++ b/sim/iq2000/configure
@@ -12001,7 +12001,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/lm32/configure b/sim/lm32/configure
index 2159228..b7289b5 100755
--- a/sim/lm32/configure
+++ b/sim/lm32/configure
@@ -12001,7 +12001,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/m32c/configure b/sim/m32c/configure
index 98db593..e3e14ad 100755
--- a/sim/m32c/configure
+++ b/sim/m32c/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/m32r/configure b/sim/m32r/configure
index 40a109f..6c618ad 100755
--- a/sim/m32r/configure
+++ b/sim/m32r/configure
@@ -12003,7 +12003,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index cb6c81d..b6710ca 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -11999,7 +11999,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/mcore/configure b/sim/mcore/configure
index 2e0ca18..0aef9e0 100755
--- a/sim/mcore/configure
+++ b/sim/mcore/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/microblaze/configure b/sim/microblaze/configure
index 2e0ca18..0aef9e0 100644
--- a/sim/microblaze/configure
+++ b/sim/microblaze/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/mips/configure b/sim/mips/configure
index c4cb96a..314de82 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -12028,7 +12028,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index 2db2ee8..cbc6c79 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -12004,7 +12004,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/moxie/configure b/sim/moxie/configure
index e408e04..ecd7296 100644
--- a/sim/moxie/configure
+++ b/sim/moxie/configure
@@ -11993,7 +11993,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/rl78/configure b/sim/rl78/configure
index fa84f3e..85343e5 100755
--- a/sim/rl78/configure
+++ b/sim/rl78/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/rx/configure b/sim/rx/configure
index 087c246..f9c9541 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -11986,7 +11986,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/sh/configure b/sim/sh/configure
index 2e0ca18..0aef9e0 100755
--- a/sim/sh/configure
+++ b/sim/sh/configure
@@ -11982,7 +11982,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/sh64/configure b/sim/sh64/configure
index fb8a72d..5871110 100755
--- a/sim/sh64/configure
+++ b/sim/sh64/configure
@@ -12001,7 +12001,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
diff --git a/sim/v850/configure b/sim/v850/configure
index 47c9088..7565d86 100755
--- a/sim/v850/configure
+++ b/sim/v850/configure
@@ -12000,7 +12000,7 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32* | cegcc*)
+  pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;

             reply	other threads:[~2012-11-27  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  7:05 Pavel Chupin [this message]
2012-11-27  8:11 ` Joel Brobecker
2012-11-27  8:16   ` Kai Tietz
2012-11-27 12:17     ` Pavel Chupin
2012-11-27 13:33       ` Joel Brobecker
2012-11-27 14:58 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANwJu1-ObTbjMgehfWOY7xTtkaEx3=3Kw-eqfhPJLA3f91MA1A@mail.gmail.com' \
    --to=pavel.v.chupin@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox