public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
* [Bug debugedit/27890] New: tests using CFLAGS/LDFLAGS causes testsuite failures
@ 2021-05-20 12:10 mark at klomp dot org
  2021-05-20 13:34 ` [Bug debugedit/27890] " doko at debian dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mark at klomp dot org @ 2021-05-20 12:10 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=27890

            Bug ID: 27890
           Summary: tests using CFLAGS/LDFLAGS causes testsuite failures
           Product: debugedit
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: debugedit
          Assignee: unassigned at sourceware dot org
          Reporter: mark at klomp dot org
                CC: debugedit at sourceware dot org
  Target Milestone: ---

Package builds pass their own build flags which breaks the tests that rely on
specific flags themselves.

Fedora has the following in the .spec file:

# The testsuite should be zero fail.
# It uses its own CFLAGS and LDFLAGS settings.
sed -i 's/^\(C\|LD\)FLAGS=.*/\1FLAGS=""/' tests/atlocal

The Debian build sees a lot of testsuite failures when passing lto flags:

<doko> 4. debugedit.at:90: testing debugedit .debug_str objects DWARF4 ...
<doko> `.gnu.debuglto_.debug_macro' referenced in section
`.gnu.debuglto_.debug_macro' of /tmp/ccAYhu9F.debug.temp.o: defined in
discarded section
`.gnu.debuglto_.debug_macro[wm4.0.81fbea40ac96d056116360667986e330]' of
/tmp/ccAYhu9F.debug.temp.o
<doko> `.gnu.debuglto_.debug_macro' referenced in section
`.gnu.debuglto_.debug_macro' of /tmp/ccAYhu9F.debug.temp.o: defined in
discarded section
`.gnu.debuglto_.debug_macro[wm4.stdcpredef.h.19.8dc41bed5d9037ff9622e015fb5f0ce3]'
of /tmp/ccAYhu9F.debug.temp.o
<doko> `.gnu.debuglto_.debug_macro' referenced in section
`.gnu.debuglto_.debug_macro' of /tmp/ccb77ltm.debug.temp.o: defined in
discarded section
`.gnu.debuglto_.debug_macro[wm4.0.81fbea40ac96d056116360667986e330]' of
/tmp/ccb77ltm.debug.temp.o
<doko> `.gnu.debuglto_.debug_macro' referenced in section
`.gnu.debuglto_.debug_macro' of /tmp/ccb77ltm.debug.temp.o: defined in
discarded section
`.gnu.debuglto_.debug_macro[wm4.stdcpredef.h.19.8dc41bed5d9037ff9622e015fb5f0ce3]'
of /tmp/ccb77ltm.debug.temp.o

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug debugedit/27890] tests using CFLAGS/LDFLAGS causes testsuite failures
  2021-05-20 12:10 [Bug debugedit/27890] New: tests using CFLAGS/LDFLAGS causes testsuite failures mark at klomp dot org
@ 2021-05-20 13:34 ` doko at debian dot org
  2021-05-20 13:47 ` ldv at sourceware dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: doko at debian dot org @ 2021-05-20 13:34 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=27890

Matthias Klose <doko at debian dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at debian dot org

--- Comment #1 from Matthias Klose <doko at debian dot org> ---
The package build induces some flags, and Mark confirmed that these are also
cleared for the rpm build, when running the tests:

sed -i 's/^\(C\|LD\)FLAGS=.*/\1FLAGS=""/' tests/atlocal

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug debugedit/27890] tests using CFLAGS/LDFLAGS causes testsuite failures
  2021-05-20 12:10 [Bug debugedit/27890] New: tests using CFLAGS/LDFLAGS causes testsuite failures mark at klomp dot org
  2021-05-20 13:34 ` [Bug debugedit/27890] " doko at debian dot org
@ 2021-05-20 13:47 ` ldv at sourceware dot org
  2021-07-05 15:11 ` mark at klomp dot org
  2021-07-12 20:21 ` mark at klomp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ldv at sourceware dot org @ 2021-05-20 13:47 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=27890

Dmitry V. Levin <ldv at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ldv at sourceware dot org

--- Comment #2 from Dmitry V. Levin <ldv at sourceware dot org> ---
By the way, this issue was predicted not so long ago, see
https://sourceware.org/pipermail/debugedit/2021-March/000023.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug debugedit/27890] tests using CFLAGS/LDFLAGS causes testsuite failures
  2021-05-20 12:10 [Bug debugedit/27890] New: tests using CFLAGS/LDFLAGS causes testsuite failures mark at klomp dot org
  2021-05-20 13:34 ` [Bug debugedit/27890] " doko at debian dot org
  2021-05-20 13:47 ` ldv at sourceware dot org
@ 2021-07-05 15:11 ` mark at klomp dot org
  2021-07-12 20:21 ` mark at klomp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2021-07-05 15:11 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=27890

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |mark at klomp dot org
             Status|NEW                         |ASSIGNED

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
To fix this I intend to push something like the following:

diff --git a/tests/atlocal.in b/tests/atlocal.in
index a45edac..0eec351 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -3,10 +3,12 @@

 PATH=@abs_builddir@:@abs_top_builddir@:$top_srcdir:$srcdir:$PATH

+# We do use the CC and LD found by configure, but explicitly keep
+# CFLAGS and LDFLAGS empty because the tests use specific flags.
 CC="@CC@"
-CFLAGS="@CFLAGS@"
+CFLAGS=""
 LD="@LD@"
-LDFLAGS="@LDFLAGS@"
+LDFLAGS=""

 GDWARF_5_FLAG=@GDWARF_5_FLAG@
 GZ_NONE_FLAG=@GZ_NONE_FLAG@

It would still allow using different compilers/linkers, but not to override the
CFLAGS/LDFLAGS for the tests themselves (unless you edit atlocal by hand.

Does the above seem reasonable?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug debugedit/27890] tests using CFLAGS/LDFLAGS causes testsuite failures
  2021-05-20 12:10 [Bug debugedit/27890] New: tests using CFLAGS/LDFLAGS causes testsuite failures mark at klomp dot org
                   ` (2 preceding siblings ...)
  2021-07-05 15:11 ` mark at klomp dot org
@ 2021-07-12 20:21 ` mark at klomp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2021-07-12 20:21 UTC (permalink / raw)
  To: debugedit

https://sourceware.org/bugzilla/show_bug.cgi?id=27890

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
Since nobody complained I pushed this as

commit 9210e0a9e910f64541025314dd03892374207492
Author: Mark Wielaard <mark@klomp.org>
Date:   Mon Jul 12 22:19:02 2021 +0200

    tests: Disable CFLAGS and LDFLAGS overrides

    We do use the CC and LD found by configure, but explicitly keep
    CFLAGS and LDFLAGS empty because the tests use specific flags.

    https://sourceware.org/bugzilla/show_bug.cgi?id=27890

    Signed-off-by: Mark Wielaard <mark@klomp.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-12 20:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 12:10 [Bug debugedit/27890] New: tests using CFLAGS/LDFLAGS causes testsuite failures mark at klomp dot org
2021-05-20 13:34 ` [Bug debugedit/27890] " doko at debian dot org
2021-05-20 13:47 ` ldv at sourceware dot org
2021-07-05 15:11 ` mark at klomp dot org
2021-07-12 20:21 ` mark at klomp dot org

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).