From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by sourceware.org (Postfix) with ESMTPS id 1B9C3392AC3F for ; Wed, 10 Apr 2024 18:19:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B9C3392AC3F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=troutmask.apl.washington.edu Authentication-Results: sourceware.org; spf=none smtp.mailfrom=troutmask.apl.washington.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1B9C3392AC3F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=128.95.76.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712773182; cv=none; b=XtvPvuvIbflk3ptj/0MKToVX9CjsAZ/cTw88DpC8QzfZYu8hGEoB9LAr2vEcItl3ASTaMAfy/SjwLnqejr5FHGiIgBHWMxt0Niv9L6y721IYwGr0+55yYgPxIA0MurczZa6YOe8+ReM9m8jTRcn5GMRCzYCFR0qmfLezAWfnyc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712773182; c=relaxed/simple; bh=LP1oMnssC7+liLP4OzlnRTH8WguSasWKsC6PUXrVBoI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=H4c+teOQo1z7m2DPObKztTTZsKvROcIBXPcVxA4OeurnQHkVVEMK8dy4LGF+AT5+UramISuxmczyHOd6PKKHDgTAshsSoAf8BCXJIEURic5Pf+DKmmJgXUVXY0t9zMFTovnptL5Jct7Bv6RSoUPnVcDkutK3tnamkd+xs3UCpz4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTP id 43AIJTZe040598; Wed, 10 Apr 2024 11:19:29 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) DKIM-Filter: OpenDKIM Filter v2.10.3 troutmask.apl.washington.edu 43AIJTZe040598 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=troutmask.apl.washington.edu; s=troutmask; t=1712773170; bh=LP1oMnssC7+liLP4OzlnRTH8WguSasWKsC6PUXrVBoI=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rOMBNtjRuL+yUDQodwUbQRxbn6wmEXAAeiqHCPYMkR+pL2HPYdeK6HyUqT98dIcCe +o6OypNje+te9yfXgn2he/yJXEGn7u17cAPAKq/Yp39hOBRY7mxrtSLT7kZDFu0dmV 5dqzcRxsJ/21L6wkW/bi50JGa7602fa8QBZdlliXS8iPRDqfcISgJY8Vow38VAlAfZ l7n2OT6ZxWKuacFYye/EiSbR6pokvwcSwGobtjwhzVOpt9Kby/SLUGrzgeJKL1M1z8 /MLaG0pnbWHJzpCAbS1c/rippciAWZK5v25aEL6wMpL2IU5HBtNTOMS9XrCyHDeE5c LMx+VwLepGU9A== Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 43AIJTwA040597; Wed, 10 Apr 2024 11:19:29 -0700 (PDT) (envelope-from sgk) Date: Wed, 10 Apr 2024 11:19:29 -0700 From: Steve Kargl To: Neil Carlson Cc: fortran@gcc.gnu.org Subject: Re: Recommended developer options when building GCC from source Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID,DKIM_SIGNED,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, Apr 06, 2024 at 05:54:43PM -0600, Neil Carlson wrote: > What are the recommended options to use (e.g., --enable-libsanitize) when > building GCC from source for the purpose of locating gfortran bugs? I'm > trying to pin down a runtime memory corruption error, and I recall seeing > at various times in the past recommendations for creating a suitable > gfortran build and the associated gfortran command line options for dumping > internal info, but I can't seem to find that info now. Neil, Are you debugging on linux- or BSD-based OS? By default, gcc will build itself with "-g -O2" in the compiler options. -O2 can make it more challenging to debug issues in gfortran. Once can force gcc to use either "-g -O" or "-Og" by setting a few environmental variable. Looking at my build script, I use CFLAGS="-O -g" BOOT_CFLAGS="-O -g" CFLAGS_FOR_TARGET="-O -g" CXXFLAGS="-O -g" BOOT_CXXFLAGS="-O -g" CXXFLAGS_FOR_TARGET="-O -g" LDFLAGS="-O -g" -- steve