All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 15231] New: gcc --help -v doesn't work correctly with gcc>=10 and BR2_RELRO_PARTIAL or BR2_RELRO_FULL
Date: Sat, 07 Jan 2023 17:16:25 +0000	[thread overview]
Message-ID: <bug-15231-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=15231

            Bug ID: 15231
           Summary: gcc --help -v doesn't work correctly with gcc>=10 and
                    BR2_RELRO_PARTIAL or BR2_RELRO_FULL
           Product: buildroot
           Version: 2020.11.2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: sagimor6@gmail.com
                CC: buildroot@uclibc.org
  Target Milestone: ---

Created attachment 9451
  --> https://bugs.busybox.net/attachment.cgi?id=9451&action=edit
quick fix

gcc --help -v 2>&1 | grep ffunction-sections

This should display the option with description.
But with buildroot gcc>=10 with RELRO protection configured to Partial or Full,
this doesn't work (doesn't display anything).
So affected buildroots are with versions >=2020.11.2
You can check this with bootlin compilers with buildroot>=2021.11

The cause of this is:

1) from gcc 10, the following doesn't work:
gcc -Wl,--some-flag --help -v 2>&1 | grep ffunction-section

I created a bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108328

2) toolchain-wrapper with BR2_RELRO_PARTIAL or BR2_RELRO_FULL adds -Wl,-z,relro
linker flags which trigger this

now, BR2_RELRO_PARTIAL or BR2_RELRO_FULL are the default since 2021.05.

Moreover, this causes the python and python3 package to compile without the
-fwrapv option, because python detects it using the: gcc --help -v 2>&1 | grep
fwrapv

This is just one example that I stumbled upon, I think this can cause problems
in general, and in other packages that do these kinds of checks.

I attached a quick fix patch (should I send it to the mailing list too?), but
feel free to comment on the gcc bug report I created.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2023-01-07 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 17:16 bugzilla [this message]
2023-01-07 17:23 ` [Buildroot] [Bug 15231] gcc --help -v doesn't work correctly with gcc>=10 and BR2_RELRO_PARTIAL or BR2_RELRO_FULL bugzilla
2023-01-07 19:02 ` bugzilla
2024-06-15 15:04 ` bugzilla

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=bug-15231-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.