From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80622 invoked by alias); 18 Dec 2019 23:24:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 80500 invoked by uid 89); 18 Dec 2019 23:24:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.2 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=yourself, H*RU:209.85.210.65, HX-Spam-Relays-External:209.85.210.65 X-HELO: mail-ot1-f65.google.com Received: from mail-ot1-f65.google.com (HELO mail-ot1-f65.google.com) (209.85.210.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 23:24:02 +0000 Received: by mail-ot1-f65.google.com with SMTP id d7so176389otf.5 for ; Wed, 18 Dec 2019 15:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/by9KgA9gZzaP7JBfgaoTyp9CuTrjEM4MovD/cYNWm8=; b=JBuRZ7sevmpHIFeluBq4pGeZ85NRv17fN8KAiEikXi1eyfx+CoOdKR67brhq28riBU qOMXsPMaG/TXKjWlv91JxQs+JxaYtbcyuUBfAhOAYWfGMIhbALdDb16nDT2V69uQyY+/ +yTM8bw1TR/ek8oxuCsjK5mBWYnNM5s4S75ecvXL6JWD1uA9Ujy4agHdKwhdV291vErV EYFKBtmI7zDd5RS2NJCTcLYFUg669vD94YrFum0bCrjjY+fW4Zuz0vlLrsRpyDGdr+bS 2OBiKeKh8pbwtelQBbGiGsEA4hbxMddptgXYPGNWwhYwwdH69Rk49Je5WESPFZ0A4CPY L/pg== MIME-Version: 1.0 References: <20191218181413.128412-1-cbiesinger@google.com> <83h81x323k.fsf@gnu.org> <83fthh310d.fsf@gnu.org> <83eex12zj1.fsf@gnu.org> <83d0cl2yqd.fsf@gnu.org> <83bls52w6e.fsf@gnu.org> In-Reply-To: <83bls52w6e.fsf@gnu.org> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Wed, 18 Dec 2019 23:24:00 -0000 Message-ID: Subject: Re: [PATCH] Link to -lssp when available (fixes mingw build) To: Eli Zaretskii Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00800.txt.bz2 On Wed, Dec 18, 2019 at 5:12 PM Eli Zaretskii wrote: > > > From: "Christian Biesinger via gdb-patches" > > Date: Wed, 18 Dec 2019 14:40:42 -0600 > > Cc: gdb-patches a lot of > > > > BTW -- you mentioned a licensing issue with depending on DLLs. Doesn't > > libstdc++ and perhaps others have the same issue? Or does mingw.org > > link it statically? > > libstdc++ and libgcc DLLs indeed have the same problem. Which is why > I mentioned the fact that the binary of GDB 9.0.90 produced by the > MinGW build had dependencies on these two. I solved that locally by > linking with "CXX='g++ -static-libstdc++ -static-libgcc'", but I > thought Pedro once said these dependencies shouldn't happen, and I > still hope we could understand why they suddenly appeared. Hm, I wonder why Pedro said that. GDB uses good amounts of the C++ standard library, so I would totally expect libstdc++ to appear. I don't really know what libgcc is used for. > > My msys2/mingw64 gcc depends on these DLLs outside of SYSTEM32: > > libpython3.8.dll => /mingw64/bin/libpython3.8.dll (0x70840000) > > libwinpthread-1.dll => /mingw64/bin/libwinpthread-1.dll (0x64940000) > > libgcc_s_seh-1.dll => /mingw64/bin/libgcc_s_seh-1.dll (0x61440000) > > libstdc++-6.dll => /mingw64/bin/libstdc++-6.dll (0x6fc40000) > > In general, any binary that depends on some DLLs and comes with those > DLLs needs to be accompanied by the sources of all the DLLs, to be > compatible with GPL. In the above list, all the DLLs except Python > are part of GCC, so as long as the GCC sources are available, the > MinGW64 folks are okay. I don't know how they deal with the problem > of providing the Python sources, though. > > For the binaries I produce, I always try to link statically against > DLLs that come from GCC, because I don't want to distribute the > humongous GCC sources, and I don't want to provide a binary > distribution that is not self-contained (i.e. without those > problematic DLLs). Is libwinpthread-1 part of GCC? I would have thought that's part of mingw's runtime (how do you deal with that yourself?) Thanks for the explanation! Christian