* [PATCH] Fix libtool.m4 dlopen lookup for mingw
@ 2012-11-27 7:05 Pavel Chupin
2012-11-27 8:11 ` Joel Brobecker
2012-11-27 14:58 ` Eli Zaretskii
0 siblings, 2 replies; 6+ messages in thread
From: Pavel Chupin @ 2012-11-27 7:05 UTC (permalink / raw)
To: gdb-patches, H.J. Lu
[-- 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=
;;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix libtool.m4 dlopen lookup for mingw
2012-11-27 7:05 [PATCH] Fix libtool.m4 dlopen lookup for mingw Pavel Chupin
@ 2012-11-27 8:11 ` Joel Brobecker
2012-11-27 8:16 ` Kai Tietz
2012-11-27 14:58 ` Eli Zaretskii
1 sibling, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2012-11-27 8:11 UTC (permalink / raw)
To: Pavel Chupin; +Cc: gdb-patches, H.J. Lu
Hi Pavel,
> 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.
Thanks for sending this patch.
Changes to the root directory are controled by the GCC developers,
so you will need to send your patch there for approval. But looking
at your patch, I am wondering whether it is actually right. I have
two reasons for questioning your patch:
- I don't think MinGW actually provides libdl, at least not by default.
Your change would probably break the build for those who do not
have the dlfcn extension installed;
- Looking at bfd/plugin.c, there are implementations of these
dlfcn functions provided by that file for Windows.
These implementations are guarded by:
#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
I am guessing that your MinGW install has dlfcn.h. Perhaps the problem
would need to be fixed in bfd instead (binutils AT sourceware dot org).
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix libtool.m4 dlopen lookup for mingw
2012-11-27 8:11 ` Joel Brobecker
@ 2012-11-27 8:16 ` Kai Tietz
2012-11-27 12:17 ` Pavel Chupin
0 siblings, 1 reply; 6+ messages in thread
From: Kai Tietz @ 2012-11-27 8:16 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Pavel Chupin, gdb-patches, H.J. Lu
2012/11/27 Joel Brobecker <brobecker@adacore.com>:
> Hi Pavel,
>
>> 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.
>
> Thanks for sending this patch.
>
> Changes to the root directory are controled by the GCC developers,
> so you will need to send your patch there for approval. But looking
> at your patch, I am wondering whether it is actually right. I have
> two reasons for questioning your patch:
>
> - I don't think MinGW actually provides libdl, at least not by default.
> Your change would probably break the build for those who do not
> have the dlfcn extension installed;
Right, by default there is no such library present. Therefore mingw
can't dependent on the presence of such a library.
> - Looking at bfd/plugin.c, there are implementations of these
> dlfcn functions provided by that file for Windows.
> These implementations are guarded by:
>
> #if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
>
> I am guessing that your MinGW install has dlfcn.h. Perhaps the problem
> would need to be fixed in bfd instead (binutils AT sourceware dot org).
Yes, I assume that a fix of the issue you had should be addressed in
binutils instead.
Regards,
Kai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix libtool.m4 dlopen lookup for mingw
2012-11-27 8:16 ` Kai Tietz
@ 2012-11-27 12:17 ` Pavel Chupin
2012-11-27 13:33 ` Joel Brobecker
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Chupin @ 2012-11-27 12:17 UTC (permalink / raw)
To: Kai Tietz; +Cc: Joel Brobecker, gdb-patches, H.J. Lu
On Tue, Nov 27, 2012 at 12:16 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
> 2012/11/27 Joel Brobecker <brobecker@adacore.com>:
>> Hi Pavel,
>>
>>> 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.
>>
>> Thanks for sending this patch.
>>
>> Changes to the root directory are controled by the GCC developers,
>> so you will need to send your patch there for approval. But looking
>> at your patch, I am wondering whether it is actually right. I have
>> two reasons for questioning your patch:
>>
>> - I don't think MinGW actually provides libdl, at least not by default.
>> Your change would probably break the build for those who do not
>> have the dlfcn extension installed;
>
> Right, by default there is no such library present. Therefore mingw
> can't dependent on the presence of such a library.
>
>> - Looking at bfd/plugin.c, there are implementations of these
>> dlfcn functions provided by that file for Windows.
>> These implementations are guarded by:
>>
>> #if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
>>
>> I am guessing that your MinGW install has dlfcn.h. Perhaps the problem
>> would need to be fixed in bfd instead (binutils AT sourceware dot org).
>
> Yes, I assume that a fix of the issue you had should be addressed in
> binutils instead.
>
> Regards,
> Kai
Thanks for review. You are right. I've removed mingw-dlfcn on my
machine and dlopen is picked up from plugin.c so issue is gone. It
seems to fix both cases need to add check for dlfcn.h for mingw and if
present use dlopen from libdl, otherwise use LoadLibrary version.
Looks like libtool.m4 is the right place to do such sort of checks.
What do you think?
--
Pavel Chupin
Intel Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix libtool.m4 dlopen lookup for mingw
2012-11-27 12:17 ` Pavel Chupin
@ 2012-11-27 13:33 ` Joel Brobecker
0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2012-11-27 13:33 UTC (permalink / raw)
To: Pavel Chupin; +Cc: Kai Tietz, gdb-patches, H.J. Lu
> Looks like libtool.m4 is the right place to do such sort of checks.
> What do you think?
I cannot really answer that question authoratively, because the file
is maintained by GCC, as far as I can tell. In my opinion, and if I had
to write this check today, I'd probably do it differently, yes. For
instance, I would do all the dlopen tests, and if those fails, then
I would test for LoadLibrary as an alternative, etc. More generally
speaking, the recommended way of writing checks is to check for
features, rather than setting things up based on the type of system.
That being said, the current implementation kind of works, and enhancing
libtool.m4 might not be sufficient. I am not sure.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix libtool.m4 dlopen lookup for mingw
2012-11-27 7:05 [PATCH] Fix libtool.m4 dlopen lookup for mingw Pavel Chupin
2012-11-27 8:11 ` Joel Brobecker
@ 2012-11-27 14:58 ` Eli Zaretskii
1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2012-11-27 14:58 UTC (permalink / raw)
To: Pavel Chupin; +Cc: gdb-patches, hjl.tools
> Date: Tue, 27 Nov 2012 11:05:17 +0400
> From: Pavel Chupin <pavel.v.chupin@gmail.com>
>
> 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.
What effect will this have on native builds, where both host and
target are MinGW? Will it require to have libdl installed? AFAIR, it
doesn't require that now.
If this problem only happens with this combination of host, target,
and build:
> ../configure --enable-plugins --target=arm-linux-android
> --host=i586-pc-mingw32msvc --build=i386-linux-gnu
then wouldn't it be better to fix only that combination?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-27 14:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-27 7:05 [PATCH] Fix libtool.m4 dlopen lookup for mingw Pavel Chupin
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox