From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.schemamania.org (rrcs-50-75-19-234.nys.biz.rr.com [50.75.19.234]) by sourceware.org (Postfix) with ESMTP id 34BE83858D20 for ; Wed, 16 Mar 2022 00:36:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 34BE83858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=schemamania.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=schemamania.org Received: from oak.schemamania.org (localhost [IPv6:::1]) by mail.schemamania.org (Postfix) with ESMTP id 7C956256FB00 for ; Tue, 15 Mar 2022 20:36:20 -0400 (EDT) Date: Tue, 15 Mar 2022 20:36:20 -0400 From: "James K. Lowden" To: gcc-help@gcc.gnu.org Subject: passing command-line arguments Message-Id: <20220315203620.283ae402ed80a5a8d072b2c6@schemamania.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64--netbsd) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RDNS_DYNAMIC, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2022 00:36:24 -0000 https://git.symas.net:443/cobolworx/gcc-cobol/ My first question regards command-line options. I've had no trouble defining switches (-f-foo), but no luck defining an option that takes an argument. The latter are accepted by gcobol and not passed to cobol1. In cobol/lang.opt, I have: indicator-column Cobol Joined Separate UInteger Var(indicator_column) Init(0) IntegerRange(0, 8) -indicator-column= Column after which Region B begins strace(1) shows the problem: [pid 683008] execve("../../../build/gcc/gcobol", ["../../../build/gcc/gcobol", "-main", "-o", "obj/SG105A", "-B", "../../../build/gcc/", "-f-flex-debug", "-f-yacc-debug", "-indicator-column", "1", "cbl/SG105A.cbl", "-lgcobol", "-lm", "-ldl"], 0x55a19b487940 /* 36 vars */ gcobol is being invoked with 3 options used by cobol1: "-f-flex-debug", "-f-yacc-debug", "-indicator-column", "1" where -indicator-column takes an argument, "1". But it's not passed to cobol1: [pid 683008] <... execve resumed>) = 0 [pid 683009] execve("../../../build/gcc/cobol1", ["../../../build/gcc/cobol1", "cbl/SG105A.cbl", "-quiet", "-dumpbase", "SG105A.cbl", "-main", "-mtune=generic", "-march=x86-64", "-auxbase", "SG105A", "-f-flex-debug", "-f-yacc-debug", "-o", "/tmp/ccIBQZv1.s"], 0x1578290 /* 40 vars */ The stanza in cobol/lang.opt looks similar to others in fortran/lang.opt. The gcc internals don't mention anything else that I could find that needs to be done. I've done a complete rebuild after "make distclean". And still no joy. We are working with a gcc fork of 10.2. Our log message says (in part): The "tiny" branch was started with the 10.2.1 origin/releases/gcc-10 branch> c806314b32987096d79de21e72dc0cf783e51d57) What am I missing, please? --jkl