From: Matthias Klose <doko@debian.org>
To: Nick Clifton <nickc@redhat.com>, binutils@sourceware.org
Subject: Re: 2.41 branch approaching
Date: Wed, 28 Jun 2023 18:27:32 +0200 [thread overview]
Message-ID: <fd3c9458-8741-55d6-80f2-ee84862e1584@debian.org> (raw)
In-Reply-To: <1e2ed114-8360-1954-27e2-fc916ba0ebc1@redhat.com>
On 28.06.23 17:59, Nick Clifton via Binutils wrote:
> Hi Matthias,
>
>>> Can you supply the binutils.log file for a failing test run so
>>> that I can take a look ?
>>
>> attached, however it only points to the first fail in these two test cases.
> Hmm, OK, so if I am reading the log correctly the addr2line failures are
> happening because running:
>
> addr2line -e tmpdir/testprog <some address>
>
> returns:
>
> ./builddir-single/binutils/./binutils/testsuite/binutils-all/testprog.c:<some
> line number>
>
> whereas the regexp is expecting to match:
>
> "$srcdir/$subdir/testprog.c:\[0-9\]+"
>
> which translates to:
>
>
> /home/packages/binutils/binutils-2.40.50.20230628/binutils/testsuite/binutils-all/testprog.c:[0-9]+
>
> Looking back in the log I notice that the test program is being compiled
> with:
>
> x86_64-linux-gnu-gcc \
>
> /home/packages/binutils/binutils-2.40.50.20230628/binutils/testsuite/binutils-all/testprog.c \
> -g \
> -O2 \
> -ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=. \
> -O0 \
> -g \
> -lm \
> -o tmpdir/testprog
>
> (I added the backslash line separators).
>
> And so the culprit appears to be the -ffile-prefix-map... option. Which I think
> must be coming from your environment as it is not a normal part of the binutils
> testsuite.
>
> Does this make sense ?
yes, this is passed by the general Debian build env:
$ dpkg-buildflags
ASFLAGS=
CFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong -Wformat -Werror=format-security
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong -Wformat -Werror=format-security
DFLAGS=-frelease
FCFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong
FFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong
GCJFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong
LDFLAGS=-Wl,-z,relro
OBJCFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong -Wformat -Werror=format-security
OBJCXXFLAGS=-g -O2
-ffile-prefix-map=/home/packages/binutils/binutils-2.40.50.20230628=.
-fstack-protector-strong -Wformat -Werror=format-security
these flags are set to ensure reproducible builds, and to inject hardening
compiler flags.
> I suspect that the same problem explains why the objdump+source+listing tests
> are failing. The sources are not where the built binaries are saying that they
> should be.
these injected flags are nothing new, I just fail to understand why these tests
are failing now, and not before. I don't see any changes in the tests, and 2.40
passed these tests with the same flags.
Matthias
next prev parent reply other threads:[~2023-06-28 16:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 9:57 Nick Clifton
2023-06-21 18:29 ` Indu Bhagat
2023-06-26 5:34 ` Matthias Klose
2023-06-28 10:58 ` Nick Clifton
2023-06-28 15:21 ` Matthias Klose
2023-06-28 15:59 ` Nick Clifton
2023-06-28 16:27 ` Matthias Klose [this message]
2023-06-29 9:34 ` Matthias Klose
2023-06-29 11:44 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd3c9458-8741-55d6-80f2-ee84862e1584@debian.org \
--to=doko@debian.org \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).