Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nitish Kumar Mishra <mishra.nitish.88@gmail.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: pedro@palves.net, gdb@sourceware.org, Yao Qi <qiyaoltc@gmail.com>
Subject: Re: Issue with Latest GDB on AIX with GCC-6.12
Date: Mon, 20 Feb 2017 11:25:00 -0000	[thread overview]
Message-ID: <CACC+hkiy6EjY5dAdKDfuBLOmfOLhf1CY6tcUpf7GmP1cx7_w6A@mail.gmail.com> (raw)
In-Reply-To: <CACC+hkjUivbHFSL=3BFrK+vMv9Tty+wkSE8p-kXvxi3JUt37ig@mail.gmail.com>

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

Hi All !

Please find the patch attachment with this mail.
Any comments are more than welcome.

Thanks,
Nitish

On Mon, Feb 20, 2017 at 4:52 PM, Nitish Kumar Mishra
<mishra.nitish.88@gmail.com> wrote:
> Hi All !
>
> I have created a bug for this issue. The bug id is: 21187.
> I have created a patch for configure file in which new configure
> option --enable-staticlib and --disable-staticlib is implemented.
> By default the linking of GDB with libstdc++ and libgcc will be static.
>
> Attching the patch with the mail.
>
> On Mon, Feb 13, 2017 at 9:08 PM, Nitish Kumar Mishra
> <mishra.nitish.88@gmail.com> wrote:
>> Hi David !
>>
>>>Who built GCC 6.1 for you?  Is this an IBM build or Bull Freeware?
>> IBM does not have GCC-6 build yet, and generally Bull's rpm breaks our
>> environment. I took it from perzl.org.
>> But now I have tested it with Bull's RPM, static linking still not
>> working but removing --static-libstdc++ and --static-libgcc
>> is working for me as well.
>> Now, I will run the testsuite and will paste the result once it's finished.
>>
>> I disabled the static options manually. I don't see any configure
>> option for disabling the static linking. I tried with one configure
>> option --disable-libstdcxx, but I dont think it will lead to dynamic
>> linking. Anyways, for me, using this option --disable-libstdcxx
>> was giving compilation error, saying, "ld soes not support target".
>>
>> Thanks,
>> Nitish
>>
>>
>> On Mon, Feb 13, 2017 at 8:49 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>>>> From: David Edelsohn <dje.gcc@gmail.com>
>>>> Date: Mon, 13 Feb 2017 10:02:35 -0500
>>>> Cc: Nitish Kumar Mishra <mishra.nitish.88@gmail.com>, "gdb@sourceware.org" <gdb@sourceware.org>,      Yao Qi <qiyaoltc@gmail.com>
>>>>
>>>> >> Can we disable -static-libgcc and -static-libstdc++ for AIX?
>>>> >
>>>> > Works for me.  Those are added by the top level configure.  They were
>>>> > originally added for gcc, we just inherited it.  Ideally adding
>>>> > those would be controllable with a configure option, IMO.
>>>>
>>>> We shouldn't disable static-libgcc and static-libstdc++ for GCC.  And
>>>> static would be better.  But linking GDB dynamically could be helpful
>>>> as an interim work-around.
>>>
>>> Please let's not do that on MS-Windows at least.  Dynamically linking
>>> against these two libraries has the following 2 adverse effects:
>>>
>>>   . it requires any site that distributes precompiled Windows binaries
>>>     of GDB to also distribute the full humongous tarball of GCC
>>>     sources (because libgcc runtime exception doesn't cover dynamic
>>>     linking against shared libraries); and
>>>
>>>   . it opens the gates of the "DLL hell", since there's any number of
>>>     libgcc and libstdc++ DLLs from different versions of GCC floating
>>>     around on any given Windows system with GNU software, and there's
>>>     no practical way to ensure binary compatibility between the one
>>>     found first on PATH and a particular version of GDB one wants to
>>>     run

[-- Attachment #2: disable_static_link_aix.patch --]
[-- Type: application/octet-stream, Size: 2419 bytes --]

--- configure_org	2017-01-06 04:12:08.000000000 -0600
+++ configure	2017-02-20 04:34:10.000000000 -0600
@@ -760,6 +760,7 @@
  enable_libada
  enable_libssp
  enable_libstdcxx
+ enable_staticlib
  enable_liboffloadmic
  enable_static_libjava
  enable_bootstrap
@@ -1487,6 +1488,7 @@
    --enable-libada         build libada directory
    --enable-libssp         build libssp directory
    --disable-libstdcxx     do not build libstdc++-v3 directory
+   --disable-staticlib	  disable static linking of libstdc++ and libgcc
    --enable-liboffloadmic=ARG
                            build liboffloadmic [ARG={no,host,target}]
    --enable-static-libjava[=ARG]
@@ -3106,6 +3108,14 @@
    ENABLE_LIBSTDCXX=default
  fi
  
+ # Check whether --disable-staticlib was given.
+ if test "${enable_staticlib+set}" = set; then 
+   enableval=$enable_staticlib; 
+   ENABLE_STATICLIB=$enableval;
+ else
+   ENABLE_STATICLIB=yes;
+ fi
+ 
  if test "${ENABLE_LIBSTDCXX}" = "no" ; then
    noconfigdirs="$noconfigdirs target-libstdc++-v3"
  fi
@@ -5109,9 +5119,11 @@
    fi
  fi
  
- # Check whether -static-libstdc++ -static-libgcc is supported.
+ 
  have_static_libs=no
- if test "$GCC" = yes; then
+ # If enable_staticlib is set for configuration, check whether -static-libstdc++ -static-libgcc is supported.
+ if test "$ENABLE_STATICLIB" = yes; then 
+  if test "$GCC" = yes; then
    saved_LDFLAGS="$LDFLAGS"
  
    LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
@@ -5150,10 +5162,10 @@
  
    LDFLAGS="$saved_LDFLAGS"
  fi
+ fi
  
  
  
- 
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
  set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
@@ -5903,6 +5915,9 @@
   # trust that they are doing what they want.
   if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
     stage1_ldflags="-static-libstdc++ -static-libgcc"
+   else
+   # If static lib is disabled.
+    stage1_ldflags=""
   fi
  fi
  
@@ -5937,8 +5952,10 @@
   # In stages 2 and 3, default to linking libstdc++ and libgcc
   # statically.  But if the user explicitly specified the libraries to
   # use, trust that they are doing what they want.
-  if test "$poststage1_libs" = ""; then
+  if test "$poststage1_libs" = "" -a $ENABLE_STATICLIB = yes; then
     poststage1_ldflags="-static-libstdc++ -static-libgcc"
+   else
+    poststage1_ldflags=""
   fi
  fi
  

  reply	other threads:[~2017-02-20 11:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-28 23:56 David Edelsohn
2017-01-29  1:11 ` David Edelsohn
2017-01-31 13:09   ` Pedro Alves
2017-02-07  8:05     ` Nitish Kumar Mishra
2017-02-07 10:30       ` Pedro Alves
2017-02-07 13:44         ` David Edelsohn
2017-02-07 13:57           ` Pedro Alves
2017-02-07 14:16             ` David Edelsohn
2017-02-08  6:16               ` Nitish Kumar Mishra
2017-02-08  7:04                 ` Nitish Kumar Mishra
2017-02-08 12:06                 ` Pedro Alves
2017-02-08 13:32                   ` David Edelsohn
2017-02-09  4:51                     ` Nitish Kumar Mishra
2017-02-09 12:05                       ` Nitish Kumar Mishra
2017-02-09 12:15                         ` Nitish Kumar Mishra
2017-02-09 15:50                           ` David Edelsohn
2017-02-10  7:22                             ` Nitish Kumar Mishra
2017-02-10 15:52                               ` David Edelsohn
2017-02-12 21:05                                 ` David Edelsohn
2017-02-12 23:52                                   ` Pedro Alves
2017-02-13 15:02                                     ` David Edelsohn
2017-02-13 15:19                                       ` Eli Zaretskii
2017-02-13 15:38                                         ` Nitish Kumar Mishra
2017-02-20 11:22                                           ` Nitish Kumar Mishra
2017-02-20 11:25                                             ` Nitish Kumar Mishra [this message]
2017-02-20 11:37                                               ` Nitish Kumar Mishra
2017-02-21  8:01                                                 ` Nitish Kumar Mishra
2017-02-21 14:47                                                   ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2017-01-25 10:54 Nitish Kumar Mishra
2017-01-25 11:12 ` Pedro Alves
2017-01-25 13:52   ` Pedro Alves
2017-01-25 14:01     ` Pedro Alves
2017-01-25 14:38     ` Yao Qi
2017-01-25 14:44       ` Pedro Alves

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=CACC+hkiy6EjY5dAdKDfuBLOmfOLhf1CY6tcUpf7GmP1cx7_w6A@mail.gmail.com \
    --to=mishra.nitish.88@gmail.com \
    --cc=dje.gcc@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=pedro@palves.net \
    --cc=qiyaoltc@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