From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 6DF4922217 for ; Thu, 4 Apr 2024 22:26:36 +0200 (CEST) Received: (qmail 6055 invoked by uid 550); 4 Apr 2024 20:26:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 6017 invoked from network); 4 Apr 2024 20:26:30 -0000 Date: Thu, 4 Apr 2024 16:26:41 -0400 From: Rich Felker To: Thorsten Glaser Cc: musl@lists.openwall.com, 1068350@bugs.debian.org Message-ID: <20240404202641.GS4163@brightrain.aerifal.cx> References: <171218457890.157989.17235252523998125898.reportbug@zelenka.debian.org> <20240404104428.GA3766212@port70.net> <20240404105408.GB3766212@port70.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Re: Bug#1068350: musl: miscompiles (runtime problems) on riscv64 and s390x with static-pie On Thu, Apr 04, 2024 at 07:50:40PM +0000, Thorsten Glaser wrote: > Szabolcs Nagy dixit: > > >the next culprit is gcc (each target can have their own > > gcc-13_13.2.0-23 > > >static pie specs) or the way you invoked gcc (not visible > > As I wrote earlier, though with more flags. Dropping all the -D… > and -W… and -I… and other irrelevant ones: > > musl-gcc -Os -g -fPIE -fno-lto -fno-asynchronous-unwind-tables > -fno-strict-aliasing -fstack-protector-strong -fwrapv -c … > musl-gcc -Os -g -fPIE -fno-lto -fno-asynchronous-unwind-tables > -fno-strict-aliasing -fstack-protector-strong -fwrapv > -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -static -static-pie > -fno-lto -o mksh *.o > > Same for both. You can see the full log by activating the > [64]Installed and [71]Installed links respectively on > https://buildd.debian.org/status/package.php?p=mksh and > skipping to 'compilation of mksh in static-musl' to get to > the beginning of the configure phase for that. > > >are you sure static pie works on these targets? > > No ;-) That’s why I reported this issue. I had just > enabled it for the musl builds, as the security people > like that more than normal static. I seem to recall the musl-gcc wrapper does not handle static-pie right. A real cross toolchain should. If there's an easy fix for the wrapper I'd be happy to merge it. Rich