* [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds
@ 2010-06-07 21:24 Matthias Klose
2010-08-16 10:32 ` [ping] " Matthias Klose
0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2010-06-07 21:24 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
In cross builds with host=build, the target objdump is used in the configure
check for --enable-plugin instead of the host objdump. The patch does use of
the host tool for host=build, and the target tool for host=target, and throws an
error for other cross builds. Is there a better way than using "objdump$exeext"
when running the host tool? A similiar patch should go to the 4.5 branch.
Matthias
[-- Attachment #2: xxx2.diff --]
[-- Type: text/plain, Size: 2376 bytes --]
2010-06-07 Matthias Klose <doko@ubuntu.com>
PR bootstrap/43847
* configure.ac (--enable-plugin): Enhance for cross builds.
* configure: Regenerate.
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (revision 160359)
+++ gcc/configure.ac (working copy)
@@ -4551,32 +4551,52 @@
enable_plugin=yes; default_plugin=yes)
pluginlibs=
-if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
+case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+ export_sym_check="nm${exeext} -g"
+ elif x$host = x$target; then
export_sym_check="$gcc_cv_nm -g"
- ;;
- *)
+ else
+ export_sym_check=
+ fi
+ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+ elif x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
- ;;
- esac
+ else
+ export_sym_check=
+ fi
+ ;;
+esac
+
+if test x"$enable_plugin" = x"yes"; then
+
AC_MSG_CHECKING([for exported symbols])
- echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
- ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
- if $export_sym_check conftest | grep foobar > /dev/null; then
- : # No need to use a flag
- else
- AC_MSG_CHECKING([for -rdynamic])
- ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
+ if test "x$export_sym_check" != x; then
+ echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
+ ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
if $export_sym_check conftest | grep foobar > /dev/null; then
- plugin_rdynamic=yes
- pluginlibs="-rdynamic"
+ : # No need to use a flag
+ AC_MSG_RESULT([yes])
else
- plugin_rdynamic=no
- enable_plugin=no
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([for -rdynamic])
+ ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
+ if $export_sym_check conftest | grep foobar > /dev/null; then
+ plugin_rdynamic=yes
+ pluginlibs="-rdynamic"
+ else
+ plugin_rdynamic=no
+ enable_plugin=no
+ fi
+ AC_MSG_RESULT([$plugin_rdynamic])
fi
- AC_MSG_RESULT([$plugin_rdynamic])
+ else
+ AC_MSG_RESULT([unable to check])
fi
# Check -ldl
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ping] Re: [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds
2010-06-07 21:24 [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds Matthias Klose
@ 2010-08-16 10:32 ` Matthias Klose
2010-09-06 10:05 ` [ping2] " Matthias Klose
0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2010-08-16 10:32 UTC (permalink / raw)
To: gcc-patches; +Cc: Diego Novillo
ping
On 07.06.2010 16:48, Matthias Klose wrote:
> In cross builds with host=build, the target objdump is used in the
> configure check for --enable-plugin instead of the host objdump. The
> patch does use of the host tool for host=build, and the target tool for
> host=target, and throws an error for other cross builds. Is there a
> better way than using "objdump$exeext" when running the host tool? A
> similiar patch should go to the 4.5 branch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ping2] Re: [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds
2010-08-16 10:32 ` [ping] " Matthias Klose
@ 2010-09-06 10:05 ` Matthias Klose
2010-09-09 15:37 ` Diego Novillo
0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2010-09-06 10:05 UTC (permalink / raw)
To: Matthias Klose; +Cc: gcc-patches, Diego Novillo
ping2
On 16.08.2010 12:20, Matthias Klose wrote:
> ping
>
> On 07.06.2010 16:48, Matthias Klose wrote:
>> In cross builds with host=build, the target objdump is used in the
>> configure check for --enable-plugin instead of the host objdump. The
>> patch does use of the host tool for host=build, and the target tool for
>> host=target, and throws an error for other cross builds. Is there a
>> better way than using "objdump$exeext" when running the host tool? A
>> similiar patch should go to the 4.5 branch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ping2] Re: [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds
2010-09-06 10:05 ` [ping2] " Matthias Klose
@ 2010-09-09 15:37 ` Diego Novillo
2010-09-09 16:17 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Diego Novillo @ 2010-09-09 15:37 UTC (permalink / raw)
To: Matthias Klose, Paolo Bonzini; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
On Mon, Sep 6, 2010 at 06:01, Matthias Klose <doko@ubuntu.com> wrote:
> ping2
Looks basically OK for me, but I would prefer if one of the
config/build maintainers takes a look. Paolo, does this look
reasonable? (I'm attaching Matthias's original patch for reference)
Thanks. Diego.
[-- Attachment #2: xxx2.diff --]
[-- Type: application/octet-stream, Size: 2376 bytes --]
2010-06-07 Matthias Klose <doko@ubuntu.com>
PR bootstrap/43847
* configure.ac (--enable-plugin): Enhance for cross builds.
* configure: Regenerate.
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (revision 160359)
+++ gcc/configure.ac (working copy)
@@ -4551,32 +4551,52 @@
enable_plugin=yes; default_plugin=yes)
pluginlibs=
-if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
+case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+ export_sym_check="nm${exeext} -g"
+ elif x$host = x$target; then
export_sym_check="$gcc_cv_nm -g"
- ;;
- *)
+ else
+ export_sym_check=
+ fi
+ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+ elif x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
- ;;
- esac
+ else
+ export_sym_check=
+ fi
+ ;;
+esac
+
+if test x"$enable_plugin" = x"yes"; then
+
AC_MSG_CHECKING([for exported symbols])
- echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
- ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
- if $export_sym_check conftest | grep foobar > /dev/null; then
- : # No need to use a flag
- else
- AC_MSG_CHECKING([for -rdynamic])
- ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
+ if test "x$export_sym_check" != x; then
+ echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
+ ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
if $export_sym_check conftest | grep foobar > /dev/null; then
- plugin_rdynamic=yes
- pluginlibs="-rdynamic"
+ : # No need to use a flag
+ AC_MSG_RESULT([yes])
else
- plugin_rdynamic=no
- enable_plugin=no
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([for -rdynamic])
+ ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
+ if $export_sym_check conftest | grep foobar > /dev/null; then
+ plugin_rdynamic=yes
+ pluginlibs="-rdynamic"
+ else
+ plugin_rdynamic=no
+ enable_plugin=no
+ fi
+ AC_MSG_RESULT([$plugin_rdynamic])
fi
- AC_MSG_RESULT([$plugin_rdynamic])
+ else
+ AC_MSG_RESULT([unable to check])
fi
# Check -ldl
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ping2] Re: [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds
2010-09-09 15:37 ` Diego Novillo
@ 2010-09-09 16:17 ` Paolo Bonzini
2010-09-09 16:26 ` Diego Novillo
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2010-09-09 16:17 UTC (permalink / raw)
To: Diego Novillo; +Cc: Matthias Klose, gcc-patches
On 09/09/2010 05:22 PM, Diego Novillo wrote:
> Looks basically OK for me, but I would prefer if one of the
> config/build maintainers takes a look. Paolo, does this look
> reasonable? (I'm attaching Matthias's original patch for reference)
Yes, but I can't say I did a very careful review.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ping2] Re: [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds
2010-09-09 16:17 ` Paolo Bonzini
@ 2010-09-09 16:26 ` Diego Novillo
0 siblings, 0 replies; 6+ messages in thread
From: Diego Novillo @ 2010-09-09 16:26 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Matthias Klose, gcc-patches
On Thu, Sep 9, 2010 at 11:59, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 09/09/2010 05:22 PM, Diego Novillo wrote:
>>
>> Looks basically OK for me, but I would prefer if one of the
>> config/build maintainers takes a look. Paolo, does this look
>> reasonable? (I'm attaching Matthias's original patch for reference)
>
> Yes, but I can't say I did a very careful review.
Thanks.
Matthias, please commit the patch and be and the lookout for fallout.
Diego.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-09-09 16:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-07 21:24 [rfc, patch] PR bootstrap/43847 - fix --enable-plugin for cross builds Matthias Klose
2010-08-16 10:32 ` [ping] " Matthias Klose
2010-09-06 10:05 ` [ping2] " Matthias Klose
2010-09-09 15:37 ` Diego Novillo
2010-09-09 16:17 ` Paolo Bonzini
2010-09-09 16:26 ` Diego Novillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).