public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH, regression?] Support --static-libstdc++ with native AIX ld
@ 2013-01-23 19:55 David Edelsohn
  2013-01-24  9:18 ` Michael Haubenwallner
  0 siblings, 1 reply; 18+ messages in thread
From: David Edelsohn @ 2013-01-23 19:55 UTC (permalink / raw)
  To: Michael Haubenwallner; +Cc: GCC Patches

This patch looks okay, although it needs a ChangeLog entry.

Also, is this really sufficient? I guess you are linking the shared
libstdc++ library statically, which is bulky but will work. In the
past there have been problems linking libstdc++ statically without
explicitly linking libsupc++ as well.

Thanks, David

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [PATCH, regression?] Support --static-libstdc++ with native AIX ld
@ 2013-01-23 11:24 Michael Haubenwallner
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Haubenwallner @ 2013-01-23 11:24 UTC (permalink / raw)
  To: GCC Patches

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

Hi,

attached patch actually makes gcc-4.8 useable after removing builddir when using native AIX ld,
as libstdc++ now really is statically linked into xgcc/xg++, like with other platforms or with
GNU binutils on AIX.

This also renders those tries/patches needless that drop the RPATH_ENVVAR=LD_LIBRARY_PATH on AIX.

Thank you!
/haubi/

2013-01-23  Michael Haubenwallner  <michael.haubenwallner@salomon.at>

    AIX ld does support -bstatic/-bdynamic instead of -Bstatic/-Bdynamic.
    * gcc/configure.ac (gcc_cv_ld_static_dynamic): Define for AIX native ld.
    * gcc/configure: Regenerate.

[-- Attachment #2: aixld-static-libstdcxx.patch --]
[-- Type: text/x-patch, Size: 1090 bytes --]

diff --git a/gcc/configure b/gcc/configure
index 10ff5ae..f153294 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -23650,6 +23650,12 @@ elif test x$gcc_cv_ld != x; then
       gcc_cv_ld_static_dynamic=yes
   else
     case "$target" in
+      # AIX ld uses -b flags
+      *-*-aix4.[23]*|*-*-aix[5-9]*)
+	gcc_cv_ld_static_dynamic=yes
+	gcc_cv_ld_static_option="-bstatic"
+	gcc_cv_ld_dynamic_option="-bdynamic"
+	;;
       # HP-UX ld uses -a flags to select between shared and archive.
       *-*-hpux*)
 	if test x"$gnu_ld" = xno; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3703a20..d33fcb2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3317,6 +3317,12 @@ elif test x$gcc_cv_ld != x; then
       gcc_cv_ld_static_dynamic=yes
   else
     case "$target" in
+      # AIX ld uses -b flags
+      *-*-aix4.[[23]]*|*-*-aix[[5-9]]*)
+	gcc_cv_ld_static_dynamic=yes
+	gcc_cv_ld_static_option="-bstatic"
+	gcc_cv_ld_dynamic_option="-bdynamic"
+	;;
       # HP-UX ld uses -a flags to select between shared and archive.
       *-*-hpux*)
 	if test x"$gnu_ld" = xno; then

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-01-30 16:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 19:55 [PATCH, regression?] Support --static-libstdc++ with native AIX ld David Edelsohn
2013-01-24  9:18 ` Michael Haubenwallner
2013-01-24 17:45   ` David Edelsohn
2013-01-25 13:56     ` Michael Haubenwallner
2013-01-25 15:56       ` David Edelsohn
2013-01-27  2:16       ` David Edelsohn
2013-01-28  9:08         ` Michael Haubenwallner
2013-01-28 15:07           ` David Edelsohn
2013-01-28 21:17             ` Mike Stump
2013-01-28 21:42               ` David Edelsohn
2013-01-30 11:35             ` Michael Haubenwallner
2013-01-30 14:16               ` David Edelsohn
2013-01-30 15:55                 ` Michael Haubenwallner
2013-01-30 16:02                   ` David Edelsohn
2013-01-30 16:07                     ` Michael Haubenwallner
2013-01-30 16:35                       ` David Edelsohn
2013-01-24 21:59   ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2013-01-23 11:24 Michael Haubenwallner

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).