* [RFA] fix AIX builds
@ 2003-02-20 5:40 Martin M. Hunt
2003-02-20 13:04 ` Andrew Cagney
2003-02-20 15:04 ` Kevin Buettner
0 siblings, 2 replies; 4+ messages in thread
From: Martin M. Hunt @ 2003-02-20 5:40 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
AIX builds are failing because CONFIG_LDFLAGS is getting set to
-lpthdebug which results in the library being linked before all the
object files. The library needs to be after the object files and
CONFIG_LDFLAGS is for flags not libraries. This patch basically reverts
a previous one from a few months ago. There might be a better way to do
this but this seems to work OK for me.
2003-02-19 Martin M. Hunt <hunt@redhat.com>
* configure.in: Don't set CONFIG_LDFLAGS to -lpthdebug.
* config/powerpc/aix432.mh (NAT_CLIBS): Set to -lpthdebug.
[-- Attachment #2: p --]
[-- Type: text/x-patch, Size: 1054 bytes --]
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.124
diff -u -r1.124 configure.in
--- configure.in 17 Feb 2003 21:56:29 -0000 1.124
+++ configure.in 20 Feb 2003 05:35:58 -0000
@@ -875,7 +875,6 @@
if test $gdb_cv_have_aix_thread_debug = yes; then
CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
- CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
fi
;;
esac
Index: config/powerpc/aix432.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/aix432.mh,v
retrieving revision 1.3
diff -u -r1.3 aix432.mh
--- config/powerpc/aix432.mh 2 Dec 2002 15:44:22 -0000 1.3
+++ config/powerpc/aix432.mh 20 Feb 2003 05:35:58 -0000
@@ -17,3 +17,5 @@
# This switch may be needed for some vendor compilers.
# MH_LDFLAGS = -Wl,-bbigtoc
+# pthread debugging support
+NAT_CLIBS = -lpthdebug
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] fix AIX builds
2003-02-20 5:40 [RFA] fix AIX builds Martin M. Hunt
@ 2003-02-20 13:04 ` Andrew Cagney
2003-02-20 15:04 ` Kevin Buettner
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-02-20 13:04 UTC (permalink / raw)
To: Martin M. Hunt; +Cc: gdb-patches
> AIX builds are failing because CONFIG_LDFLAGS is getting set to
> -lpthdebug which results in the library being linked before all the
> object files. The library needs to be after the object files and
> CONFIG_LDFLAGS is for flags not libraries. This patch basically reverts
> a previous one from a few months ago. There might be a better way to do
> this but this seems to work OK for me.
>
> 2003-02-19 Martin M. Hunt <hunt@redhat.com>
>
> * configure.in: Don't set CONFIG_LDFLAGS to -lpthdebug.
> * config/powerpc/aix432.mh (NAT_CLIBS): Set to -lpthdebug.
>
>
This is configure, approval isn't needed. How quickly you commit
something depends on how lucky you feel. Do you feel lucky? :-)
> +# pthread debugging support
> +NAT_CLIBS = -lpthdebug
Given it reverts something, you'll want to add comments explaining why
it didn't work the other way.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] fix AIX builds
2003-02-20 5:40 [RFA] fix AIX builds Martin M. Hunt
2003-02-20 13:04 ` Andrew Cagney
@ 2003-02-20 15:04 ` Kevin Buettner
2003-02-20 23:19 ` Joel Brobecker
1 sibling, 1 reply; 4+ messages in thread
From: Kevin Buettner @ 2003-02-20 15:04 UTC (permalink / raw)
To: Martin M. Hunt, gdb-patches
On Feb 19, 9:40pm, Martin M. Hunt wrote:
> AIX builds are failing because CONFIG_LDFLAGS is getting set to
> -lpthdebug which results in the library being linked before all the
> object files. The library needs to be after the object files and
> CONFIG_LDFLAGS is for flags not libraries. This patch basically reverts
> a previous one from a few months ago. There might be a better way to do
> this but this seems to work OK for me.
>
> 2003-02-19 Martin M. Hunt <hunt@redhat.com>
>
> * configure.in: Don't set CONFIG_LDFLAGS to -lpthdebug.
> * config/powerpc/aix432.mh (NAT_CLIBS): Set to -lpthdebug.
Martin,
The reason for Joel's patch of a few months ago is due to the fact
that some versions of AIX contain a libpthdebug that's too old for
aix-thread.c. See:
http://sources.redhat.com/ml/gdb-patches/2002-11/msg00705.html
You haven't reverted the portion which conditionally pulls in
aix-thread.o. But you have backed out the portion which causes
-lpthdebug to be positioned at an inopportune location on the link
line. Setting it via NAT_CLIBS will always cause gdb (for native AIX)
to be linked against libpthdebug. That *should* be okay. (I'm not
completely certain though.)
Just out of curiosity, did you try changing:
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
to:
LIBS="${LIBS} -lpthdebug"
?
If this works, I like it better...
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] fix AIX builds
2003-02-20 15:04 ` Kevin Buettner
@ 2003-02-20 23:19 ` Joel Brobecker
0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2003-02-20 23:19 UTC (permalink / raw)
To: Kevin Buettner; +Cc: Martin M. Hunt, gdb-patches
> Setting it via NAT_CLIBS will always cause gdb (for native AIX)
> to be linked against libpthdebug. That *should* be okay. (I'm not
> completely certain though.)
I think it should be okay too, because there should be no code using
this library. However, it's a bit of a shame to be linking in this
library unconditionaly...
> Just out of curiosity, did you try changing:
>
> CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
>
> to:
>
> LIBS="${LIBS} -lpthdebug"
> ?
I like it better too. I'd love to test this change and commit it, but
since I tested this change on our AiX 5.1 machine, a successful build
here will not mean a succesful build on Martin's machine.
Martin, would you mind trying out Kevin's suggestion?
Thanks,
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-20 23:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 5:40 [RFA] fix AIX builds Martin M. Hunt
2003-02-20 13:04 ` Andrew Cagney
2003-02-20 15:04 ` Kevin Buettner
2003-02-20 23:19 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox