X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FE453858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1635278683; bh=gIBkDs3vD9CkX3ObuYVTU+bkYoGEvmtTEEbQFx8ug+k=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CwKFBnei4UKP/xXZZ3U28Wnkzxl+OwX4DedEeuzx99er0HGtC0i5/8oUu3/zp4al4 rRGEVw1BFC2SEcNZpPEB7pxNBHHZ/Zz3UwjQiLp5zyLgHIlaLOpqw8AsrFSWqAksSN NhOFci2yRWJ8T7uHFStFc8opCiarU+3MEgirBnBk= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D14E3858D39 Date: Tue, 26 Oct 2021 22:03:27 +0200 To: Claudius =?utf-8?Q?Schn=C3=B6rr?= Subject: Re: Problem/Bug with binutils-gdb and strsignal ? Message-ID: Mail-Followup-To: Claudius =?utf-8?Q?Schn=C3=B6rr?= , cygwin AT cygwin DOT com References: <672ed09c-7452-0e12-fea1-4e7aadfc48aa AT mailzone DOT com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <672ed09c-7452-0e12-fea1-4e7aadfc48aa@mailzone.com> X-Provags-ID: V03:K1:nIDMKWKgLptcyaZByT/xneNk7vQ9cYVFwKuGuYNFg8xN8HO34EC mAa39WbCScLz6Qr2dzfhR/HergqPEX8pgr/29qDN1n5pd02g/2YIjavTt1KtS0CgqK5tONJ qEyWVrLqgdhHlSi9FauSx/One05DZ4Lw0qTITkJeYRlSfjm4A1oO1XKNOYPnKhj+/qW7XE8 Fv5FjkDndf8ZCi063mgtw== X-UI-Out-Filterresults: notjunk:1;V03:K0:MsOvduIDhF8=:5uopxQpQciX5S+M19nSp42 Q/VaNTaUc+Toe8+VyyjQUhohyaGxh4c/Ol2o66Czvzo6pdk6n8JkIW/ys2IssTJXUDeWjwhd5 jOyKhJ5UQeIDSauym5hqLOwB4gJSWmdgHpS+tg/2bVWCCtTEzr7ethHc6BN+Fk9vJCSUJxptn lCCqa1WcrO5qd0EOtERXC5v9cMsflI2s4S8JFqTl4rmpSvGDvcYUDWomYMLx9dGTeUUrC3SOI GeOWZxKVLJSoYJhkMOld9qgsztHpgYmwgFvpGpf7q5C+FTEgf4QTKw2q2otFXph1arZ3wLGS8 A1NpZnz4He6U4X75RLZm7tnG69TKaStk4FabVSFYff6WiQQ1C4eK4onNbj97sZaq0GJaP/UW6 m3iEagygqo9Q7uoeyk0l8nou90tdl/Fr9Hu7heH8Jym6t67NwxJuMwXmXEh9vpTHXLfvSlvUp t2ugN8jJiiiIIbYwAr/38Gd6McN52KJh2vfqwR2lFkKw/u4O5GvKWGj2SYSBSf+VPyPrL61Pf c6H9PUN446MQwkLDs5snhnRvUvka3MWc1H2+RIWrDEpvPMaGAxoS1eEsplfLZW99CME5M5fqy BlGSi/TkRcZcrfBjejy9+5zw+ghDerDlbUsly9Vu4fSXiehgQqothPs/hQweaFNyaGdoUHeOy qQoCvKM/urYjH1FJyxCm3qCYlffaPazOnSyqU9mk4AgalzpScw+Y8K4QdR1EfV0w87pNt+S7F a0zTMXBPaa+P+a+p X-Spam-Status: No, score=-97.9 required=5.0 tests=BAYES_00, BODY_8BITS, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 19QK4jrw010162 On Oct 24 08:26, Claudius Schnörr via Cygwin wrote: > o suggestion: undefining DEFS_H might be risky -> to be added at > line 55: > + #ifndef DEFS_H > #    include              /* for strsignal on > cygwin */ > #else > char *strsignal (int __signo);      /* see > /usr/include/string.h on cygwin */ > #endif > o then it compiles, however a library is missed now: > + x86_64-pc-cygwin/bin/ld: > event-top.o:.../insight/bundle/gdb/event-top.c:899: > undefined reference to `strsignal(int)' > collect2: error: ld returned 1 exit status Makes sense. The GDB build uses a c++ compiler. If you define strsignal as above, c++ assumes it's a C++ symbol, so its name gets mangled per the C++ mangling rules. Given the symbol is a plain C symbol, you'd have to specify this explicitely, i. e. extern "C" char *strsignal (int __signo); Anyway, this needs fixing in the system header. There's a matching thread on the newlib mailing list addressing this problem. Thanks, Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple