From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yEMeCQ5Ot2C/dQAAWB0awg (envelope-from ) for ; Wed, 02 Jun 2021 05:23:26 -0400 Received: by simark.ca (Postfix, from userid 112) id 15EF81F163; Wed, 2 Jun 2021 05:23:26 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 67F611E939 for ; Wed, 2 Jun 2021 05:23:25 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDFDF384400A for ; Wed, 2 Jun 2021 09:23:24 +0000 (GMT) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id A24633833010 for ; Wed, 2 Jun 2021 09:22:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A24633833010 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x32c.google.com with SMTP id g204so793050wmf.5 for ; Wed, 02 Jun 2021 02:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z2S5qbZ5MXfoETs1i0Rpxpe97VpckXxmztMhZtB347U=; b=fwb1VmP806as/fvqzo/EuJ19vE3MY8jxDNxBLmhtlo142ivHuesWWbY+U9x4xbZm8d a1zforklVPJtu6WcsaDB0jx4AgBBqQ6Of0K47MkI02/MzZkMu30V6zhF6FFvOP2yYjj1 ZcCjJZOHHzgzjT3rEk/bwPYJorwA3SkQXz4efUbWriCjUJ5PtdiEiQNi1LZbkGvHikr/ qHDv9lUPkJzZLmI6h00H8k+Ui7ESa7h18ogOJgbfjPCqCJ3qANNeVFRbn625WzmZnR/q 9yFTG/Vz5ynli0lIkVFrmvYTHE9v1clIPqX1cwpm5/m7GnVH78akaFP16E+rmAcwZiBc V5JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z2S5qbZ5MXfoETs1i0Rpxpe97VpckXxmztMhZtB347U=; b=N1xguiCdkim+O3nRj7LNdZVhJLBQXIwrgg55cj7Jjtfegs7pFm8Ntq3/TpvbRTRrCK THWMzCtzsU7rn9b2TPIFZG8XzeNWDXo8AwFWxKA8DsAlPUGkXZnkQC2cXqoJCcNq2Bix wMxXRJ/3iw4Q9LMxmIwzTvbhGcQ+Lm9zG/4FJaKhD2xxxI25OdgxBk1v6OQnrIakox5A bWa0s1WFHK3rpEdfdEyCxzQFUqzt+fsCXXLG4nkUZYzBgAqZ9bIsyD7ohZMdceXXe20R S6S9A+rObgBrEPJQmqdP/GBoTtTf1uYmbNgFLMgJ3+i8/W12A6UEvhxPFbb+7bwAvJmy hF3Q== X-Gm-Message-State: AOAM531zdWY5V0CyRkaPmbwq6f1Ab2P6uZj37f8h8KCEscWKnpnMjZri WjRd2fcvNCdGDdVkbX00bqF0Z1mvhToCIg== X-Google-Smtp-Source: ABdhPJzzFIEili57JC50UfUPdu/0qKL5QRW/hu50CSk0z+bCcsPZUR7DoWRpktwQn+abmZNFfq6f4w== X-Received: by 2002:a05:600c:4f0f:: with SMTP id l15mr4137090wmq.143.1622625768640; Wed, 02 Jun 2021 02:22:48 -0700 (PDT) Received: from localhost (host109-151-46-70.range109-151.btcentralplus.com. [109.151.46.70]) by smtp.gmail.com with ESMTPSA id x11sm6215381wru.87.2021.06.02.02.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 02:22:48 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PUSHED] gdb/testsuite: only add -J option when compiling with gfortran Date: Wed, 2 Jun 2021 10:22:46 +0100 Message-Id: <20210602092246.3167565-1-andrew.burgess@embecosm.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" We currently make use of the -J option to gfortran in order that compiled modules should be placed in the correct output directory. Obviously different compilers, e.g. flang, will have different options to achieve the same result. This commit makes it so we only add the -J flag when using a gcc based (i.e. gfortran) compiler. I had a look through the flang help page and tried a few likely looking options, but couldn't find anything that seemed to do the same thing, so, for now, I'm only adding an extra option when compiling with gfortran. This does mean that any compiler other than gfortran might run into problems if running the testsuite in parallel due to modules of the same name all being written to the same directory, and so possibly overwriting each other. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_compile): Only add the -J option when using a gcc based Fortran compiler, for example, flang does not support this option. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/lib/gdb.exp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 36a5fd4feb7..f6686e19162 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4098,7 +4098,9 @@ proc gdb_compile {source dest type options} { || [lsearch -exact $options f90] != -1 } { # Fortran compile. set mod_path [standard_output_file ""] - lappend new_options "additional_flags=-J${mod_path}" + if [test_compiler_info "gcc-*"] { + lappend new_options "additional_flags=-J${mod_path}" + } } set shlib_found 0 -- 2.25.4