From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 15E293948824 for ; Wed, 16 Mar 2022 18:45:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 15E293948824 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-611-8EGiGyCzOsW6WmdCafTl9A-1; Wed, 16 Mar 2022 14:45:36 -0400 X-MC-Unique: 8EGiGyCzOsW6WmdCafTl9A-1 Received: by mail-qk1-f199.google.com with SMTP id h68-20020a376c47000000b0067e05dade89so2000186qkc.2 for ; Wed, 16 Mar 2022 11:45:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RUtcDeY6tqjcVnuS07lLuuc/2mAg6sur+A2aSdvMbpQ=; b=P6RmteJyC15PEVgQXNpJ7tcwQU3KKFlpwMUIsR7xlkGCOmiCv56MPdM1N88PUHlz+u rnolJGLyv1oX6Qwm7VVTixNBA1Upwhggvgvc+2vrdI5NNo7KRg5xMHcyw5yd/5yRN5Oz bje/TJxJD3KA/bBhgW/FiuXaCAVEl5Oq/eqHU58uV8cz9/hcytWUbx21RCYM/vUDMpTl V5ldbln923NAm11NkVaWWN2BsRhfV0skWdCdWS6SlbCE4GTPV6OjZJM2pqX4neC03sR+ +Lj9CUiqlZxREjRtopA0ogOxNhNFlr+aHJ6IcbktDhibTG87sER0U+QLgt7X1m/VVWMC r8NA== X-Gm-Message-State: AOAM531hTt/SJzEiKxny5DaR8U2LDco9cD/n01PI+uaprzW0mP+vgF+C sGtm89e62wDSsNU6WqlBdeTgSbCV2hEMlAtktwXsgSzfvCYd0FxKg+45xnREYKXz1Rm5urjcnNR bqCjVBUY= X-Received: by 2002:a05:622a:553:b0:2e1:d474:4459 with SMTP id m19-20020a05622a055300b002e1d4744459mr1046046qtx.169.1647456335901; Wed, 16 Mar 2022 11:45:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjHgtSXyPPzMiScJtD6Sn6IgsT17wXVpOm20xddXrnd8rN4bpQe1bGI2EOwOQhrDEgrHsaxA== X-Received: by 2002:a05:622a:553:b0:2e1:d474:4459 with SMTP id m19-20020a05622a055300b002e1d4744459mr1046029qtx.169.1647456335618; Wed, 16 Mar 2022 11:45:35 -0700 (PDT) Received: from redhat.com ([2601:184:4780:4310::3f37]) by smtp.gmail.com with ESMTPSA id b13-20020ac85bcd000000b002e06856b04fsm1904597qtb.51.2022.03.16.11.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 11:45:34 -0700 (PDT) Date: Wed, 16 Mar 2022 14:45:33 -0400 From: Marek Polacek To: "James K. Lowden" Cc: gcc@gcc.gnu.org Subject: Re: passing command-line arguments, still Message-ID: References: <20220316143409.24cb3e7fd17c6b73acaee586@schemamania.org> MIME-Version: 1.0 In-Reply-To: <20220316143409.24cb3e7fd17c6b73acaee586@schemamania.org> User-Agent: Mutt/2.1.5 (2021-12-30) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2022 18:45:43 -0000 On Wed, Mar 16, 2022 at 02:34:09PM -0400, James K. Lowden wrote: > [I sent this to gcc-help by mistake. I'm reposting it here in case > anyone has a suggestion. I did take dje's advice, and deleted the build > directory, except that I preserved config.status and regenerated > Makefile. The observed behavior remains unchanged. TIA.] > > 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. Let's avoid -f-foo; use -ffoo instead, like the rest of GCC. > In cobol/lang.opt, I have: > > indicator-column Make this 'findicator-column='. Does that help? > 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. doc/options.texi describes options relative well, I think. > 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 > Marek