Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 15718] New: Cross-compiler called through toolchain-wrapper generates bogus error messages
Date: Fri, 11 Aug 2023 00:54:26 +0000	[thread overview]
Message-ID: <bug-15718-163@https.bugs.busybox.net/> (raw)

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

            Bug ID: 15718
           Summary: Cross-compiler called through toolchain-wrapper
                    generates bogus error messages
           Product: buildroot
           Version: 2023.02
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: jimgeorge@gmail.com
                CC: buildroot@uclibc.org
  Target Milestone: ---

Cause:
Invoking the cross-compiler from the package generated by 'make sdk' with no
arguments

Expected behavior:
Should print arm-linux-cc: fatal error: No input files

Observed behavior:
Output is:
/path/to/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/11.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld:
/path/to/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/Scrt1.o:
in function `_start':
(.text+0x40): undefined reference to `main'
collect2: error: ld returned 1 exit status

With BR2_DEBUG_WRAPPER set to 2, I get the following extra information:

Toolchain wrapper was called with:
    'buildroot-ts/buildroot/output/host/bin/arm-linux-cc'
Toolchain wrapper executing:
    '/path/to/buildroot/output/host/bin/arm-linux-cc.br_real'
    '--sysroot'
    '/path/to/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot'
    '-fstack-protector-strong'
    '-fPIE'
    '-pie'
    '-Wl,-z,now'
    '-Wl,-z,relro'

When invoking arm-linux-cc with an example program to compile, behavior is
normal. It seems like the 'Wl' options are what trigger the errors from the
underlying gcc. Adding this as a 'trivial' bug so that it could either be
documented or calling toolchain-wrapper with no arguments is special-cased so
other buildroot newbies aren't tripped up by this.

-- 
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-08-11  0:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  0:54 bugzilla [this message]
2024-06-15 15:12 ` [Buildroot] [Bug 15718] Cross-compiler called through toolchain-wrapper generates bogus error messages 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-15718-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox