From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id C0BE63858C27 for ; Mon, 25 Oct 2021 08:25:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C0BE63858C27 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 89A00218EF; Mon, 25 Oct 2021 08:25:22 +0000 (UTC) Received: from murzim.suse.de (murzim.suse.de [10.160.4.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 79223A3B81; Mon, 25 Oct 2021 08:25:22 +0000 (UTC) Date: Mon, 25 Oct 2021 10:25:22 +0200 (CEST) From: Richard Biener To: Jan-Benedict Glaw cc: gcc-patches@gcc.gnu.org, ibuclaw@gdcproject.org, "Joseph S. Myers" Subject: Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS In-Reply-To: <20211024072015.gaemuuwr4z2cx2oh@lug-owl.de> Message-ID: References: <20211023200005.xknhnzfa7eyny5zf@lug-owl.de> <20211024072015.gaemuuwr4z2cx2oh@lug-owl.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2021 08:25:25 -0000 On Sun, 24 Oct 2021, Jan-Benedict Glaw wrote: > Hi Richard, > > On Sun, 2021-10-24 08:36:36 +0200, Richard Biener wrote: > > On October 23, 2021 10:00:05 PM GMT+02:00, Jan-Benedict Glaw wrote: > > >On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches wrote: > > >> I have built all targets from contrib/config-list.mk to make sure we > > >> don't run into the #error and the following makes the STABS usage > > >> explicit for pdp11 and hppa with SOM. > > > > > >I'm running build tests based on config-list.mk as well and see a good > > >number of targets failing, all about the same, ie. for moxie-elf: > > > > That's odd. I did test the patch using config-list.mk - the patch > > sat in the comit tree for quite a while since that exercise (but > > unchanged), but I doubt anything significant changed in between. > > > > >[all 2021-10-17 00:01:19] /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c > > >-DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE > > >-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall > > >-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag > > >-Wmissing-format-attribute -Woverloaded-virtual -pedantic > > >-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror > > >-fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. > > >-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include > > >-I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber > > >-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber > > >-I../../gcc/gcc/../libbacktrace -o default-d.o -MT default-d.o -MMD > > >-MP -MF ./.deps/default-d.TPo ../../gcc/gcc/config/default-d.c [all > > >2021-10-17 00:01:19] In file included from ./tm_d.h:9, [all > > >2021-10-17 00:01:19] from ../../gcc/gcc/config/default-d.c:22: [all > > >2021-10-17 00:01:19] ../../gcc/gcc/defaults.h:908:2: error: #error > > >You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported > > > > Is that building the D frontend? I remember restricting the builds to C... > > Probably. I configure as > > .../gcc/configure --target=moxie-elf --enable-werror-always > --enable-languages=all --disable-gcov --disable-shared > --disable-threads --without-headers > --prefix=/var/lib/laminar/run/gcc-moxie-elf/13/toolchain-install So it looks like tm_d.h is much more stripped down compared to regular tm_p.h but also oddly enough config/default-d.c includes tm_d.h while config/default-c.c explicitely documents itself to not do that. In particular tm_d.h includes defaults.h which now has the requirement that either PREFERRED_DEBUGGING_TYPE is defined or DWARF2_DEBUGGING_INFO but the latter is usually picked up from config/elfos.h or similar which are headers _not_ included via tm_d.h. The old defaults.h resulted in NO_DEBUG if no PREFERRED_DEBUGGING_TYPE and no DWARF2_DEBUGGING_INFO was defined. I also note that default-d.o is not built on x86_64-linux? Looks like that's built only for if [ "$target_has_targetdm" = "no" ]; then d_target_objs="$d_target_objs default-d.o" fi I note that for example config/glibc-d.c includes tm.h and tm_p.h which would end up in proper definitions. So ... for moxie-elf, did D really end up with NO_DEBUG previously? Is that "correct" for D or was that a bug? moxie-elf seems to use default-c.c as well but that does not end including defaults.h. Is it maybe a bug that tm_d.h includes defaults.h at all? Should "d defaults" be in a defaults-d.h instead? If I remove the defaults.h include from tm_d.h the build for moxie-elf succeeds. Ian? Joseph? Thanks, Richard.