X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=fPAzBDCgKFt0GXuiBdj40F3hBYoK/CuX5rpR5nQSfdU=; b=YmSwscBuwG7Drx5pBV3SffF3fYyYyGE7Y49GZCsV5LygRQ2rzj+UfUdpRuNMj/G2FD 6foXA9Vd+gHXpmVxBntYLx1qvlEovMxzb0gsg8QJJCDUULtlzcFdwYWCg/s+LDYfZ+6h sE3G8tywH2HDtW+RKvgkjdhI/ZfpXAZmoG67AO+ilHlFa5Gsq3niujRGuwj/b9LLqOKr WgWMDrsby6o0lNLyWmt1mA+vEdc/hw7i8Xs0DmxDTpXJZDkDznDF6ziWVmYW/5tYFr4W 8zqs9OOQJAdCWTN+dl5lDvbE/BYSBrRPAnLsd69Wa/zz90sfp/HpCqrHMbjUJwV1K+Ci Idcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=fPAzBDCgKFt0GXuiBdj40F3hBYoK/CuX5rpR5nQSfdU=; b=FYVz5wv3mNN8/7osRChRYEQHFQmMSmlfnmesksP6kcpT/RmVkgOZNpsyO2pyNYt4R7 aLIrMuHDrrDR9dykMrgZxNd+SLWi3ETr0BpULtnckrlxT4ctkI6UfO07MMr/YmXhx9fu 0AAeiDHTRnJpLc191Qc/nzppoCsFaRCyZANyXrUpifl4r+UaSvo5pAVBDNmnZfUGbyt/ nH7ers2Iv8G/MGmvkY4o0/epjZLWcHl9l/pBxLzuN4BXBspv1qro490OJ7JRBWtP9FbB NqiMzg1cdY0g4zh5PBaMyi8TbJLDvpXUCS7A8LSJU/SkLsUPesD9Z25AiH43eqAu/Wal V6RA== X-Gm-Message-State: AOAM531mSnM2nrMaz6XEJbBRJKOsw4kYdqQjYWzTPZ9Yb7EHP8HC5bIN IdcR/cloMCoK9LQO0MLG0R7+asNAYNCTzqYH5KQsa4Z8 X-Google-Smtp-Source: ABdhPJzC+4kbdLY1em/jSeWRl0PkD6AOL0ltjoCX2iPLAaCEavPAJx5FajKJo3NXHwi2xmQzl6vLKWbwxf2cFMHZU0M= X-Received: by 2002:a05:6830:210a:: with SMTP id i10mr6608998otc.145.1607621217147; Thu, 10 Dec 2020 09:26:57 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <5FD1FEA1.7010304@gmx.de> References: <5FD1FEA1 DOT 7010304 AT gmx DOT de> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Thu, 10 Dec 2020 20:26:56 +0300 Message-ID: Subject: Re: Difficulties compiling libc from repository using gcc 10.N.0 To: djgpp AT delorie DOT com Content-Type: multipart/mixed; boundary="00000000000094fba005b61f7b4c" Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --00000000000094fba005b61f7b4c Content-Type: text/plain; charset="UTF-8" On 12/10/20, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com] wrote: > dbgcom.c: Assembler messages: > dbgcom.c:1342: Error: symbol `.Ldoes_not_has_read_right' is already defined > dbgcom.c:1346: Error: symbol `.Ldoes_not_has_write_right' is already defined On 12/10/20, Ozkan Sezer wrote: > Nevertheless, gcc-10 seems to have inlined invalid_sel_addr() > which has the asm, into read_sel_addr() hence the duplicated > labels. On 12/10/20, J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: > I ran into this also with gcc 9, I guess it depends on the optimization flags > you specify (I like to use -O3). I think local labels should start with 'L' > only (no leading '.'), that is also how gcc generates label names. > > If the asm is inlined into the same function twice, then you still have > duplicate local labels and you need to add add %= to the label name which > generates a unique ID for each asm instance. The attached patch appends "_%=" to .Ldoes_not_has_read_right and to .Ldoes_not_has_write_right labels. I tested to see that this avoids duplicated labels by marking invalid_sel_addr() as extern inline: using both gcc-2.95.3 and gcc-3.4.6, the build succeeds. OK to apply? -- O.S. --00000000000094fba005b61f7b4c Content-Type: text/x-patch; charset="US-ASCII"; name="dbgcom.patch" Content-Disposition: attachment; filename="dbgcom.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 ZGJnY29tLmMgKGludmFsaWRfc2VsX2FkZHIpOiBhdm9pZCBkdXBsaWNhdGVkIGFzbSBsYWJlbHMg aWYgcHJvYyBpcyBpbmxpbmVkCgpJbmRleDogc3JjL2RlYnVnL2NvbW1vbi9kYmdjb20uYwo9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09ClJDUyBmaWxlOiAvY3ZzL2RqZ3BwL2RqZ3BwL3NyYy9kZWJ1Zy9jb21tb24vZGJnY29t LmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMzQKZGlmZiAtdSAtcCAtcjEuMzQgZGJnY29tLmMK LS0tIHNyYy9kZWJ1Zy9jb21tb24vZGJnY29tLmMJMiBNYXkgMjAxNSAwNzozMjowMCAtMDAwMAkx LjM0CisrKyBzcmMvZGVidWcvY29tbW9uL2RiZ2NvbS5jCTEwIERlYyAyMDIwIDE3OjE0OjA4IC0w MDAwCkBAIC0xMzM4LDEzICsxMzM4LDEzIEBAIGludCBpbnZhbGlkX3NlbF9hZGRyKHNob3J0IHNl bCwgdW5zaWduZWQKICAgICAoIgkJCQkJCQkJCQlcblwKICAgICAgIG1vdncgICUyLCUlYXgJCQkJ CQkJCVxuXAogICAgICAgdmVyciAgJSVheAkJCQkJCQkJXG5cCi0gICAgICBqbnogICAuTGRvZXNf bm90X2hhc19yZWFkX3JpZ2h0CQkJCQkJXG5cCisgICAgICBqbnogICAuTGRvZXNfbm90X2hhc19y ZWFkX3JpZ2h0XyU9C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