public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/111610] New: Cannot build cross compiler to darwin targets after r14-4108-g47346acb72b50d
Date: Wed, 27 Sep 2023 09:25:55 +0000	[thread overview]
Message-ID: <bug-111610-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111610

            Bug ID: 111610
           Summary: Cannot build cross compiler to darwin targets after
                    r14-4108-g47346acb72b50d
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: iains at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux
            Target: x86_64-apple-darwin

We periodically try building cross-compilers (from x86_64-linux) to
most available targets in order to detect early when they don't build.
Recently we have detected failures building cross-compiler to
i686-apple-darwin, i686-apple-darwin9, i686-apple-darwin10, powerpc-darwin8,
powerpc-darwin7, powerpc64-darwin and x86_64-apple-darwin.

On x86_64-apple-darwin, we I have bisected the problem to
r14-4108-g47346acb72b50d (Darwin,debug : Switch to DWARF 3 or 4 when
dsymutil supports it):

    Darwin,debug : Switch to DWARF 3 or 4 when dsymutil supports it.

    The main reason that Darwin has been using DWARF2 only as debug is that
    earlier debug linkers (dsymutil) did not support any extensions to this
    so that the default "non-strict" mode used in GCC would cause tool errors.

    There are two sources for dsymutil, those based off a closed source base
    "dwarfutils" and those based off LLVM.

    For dsymutil versions based off LLVM-7+ we can use up to DWARF-4, and for
    versions based on dwarfutils 121+ we can use DWARF-3.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

    gcc/ChangeLog:

            * config/darwin-protos.h (enum darwin_external_toolchain): New.
            * config/darwin.cc (DSYMUTIL_VERSION): New.
            (darwin_override_options): Choose the default debug DWARF version
            depending on the configured dsymutil version.


We configure GCC with:

    ../src/configure --prefix=/tmp/some/prefix --enable-languages=c,c++
--enable-checking=yes --disable-bootstrap --disable-multilib --enable-obsolete
--target=x86_64-apple-darwin

and then check by running:  make -j64 all-host

The failure is:

g++  -fno-PIE -c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-fno-PIE -I. -I. -I/home/mjambor/gcc/mine/src/gcc
-I/home/mjambor/gcc/mine/src/gcc/. -I/home/mjambor/gcc/mine/src/gcc/../include 
-I/home/mjambor/gcc/mine/src/gcc/../libcpp/include
-I/home/mjambor/gcc/mine/src/gcc/../libcody 
-I/home/mjambor/gcc/mine/src/gcc/../libdecnumber
-I/home/mjambor/gcc/mine/src/gcc/../libdecnumber/dpd -I../libdecnumber
-I/home/mjambor/gcc/mine/src/gcc/../libbacktrace   -o darwin.o -MT darwin.o
-MMD -MP -MF ./.deps/darwin.TPo /home/mjambor/gcc/mine/src/gcc/config/darwin.cc
In file included from ./config.h:6,
                 from /home/mjambor/gcc/mine/src/gcc/config/darwin.cc:21:
./auto-host.h:106:26: error: cannot convert ‘rtx_code’ to
‘darwin_external_toolchain’ in initialization
  106 | #define DSYMUTIL_VERSION UNKNOWN,0,0,0
      |                          ^~~~~~~
      |                          |
      |                          rtx_code
/home/mjambor/gcc/mine/src/gcc/config/darwin.cc:128:23: note: in expansion of
macro ‘DSYMUTIL_VERSION’
  128 | } dsymutil_version = {DSYMUTIL_VERSION};
      |                       ^~~~~~~~~~~~~~~~

             reply	other threads:[~2023-09-27  9:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27  9:25 jamborm at gcc dot gnu.org [this message]
2023-09-27  9:43 ` [Bug target/111610] " iains at gcc dot gnu.org
2023-09-27 11:35 ` jamborm at gcc dot gnu.org
2023-09-27 13:35 ` iains at gcc dot gnu.org
2023-09-27 13:42 ` cvs-commit at gcc dot gnu.org
2023-09-27 13:49 ` iains at gcc dot gnu.org
2024-03-31  9:00 ` cvs-commit at gcc dot gnu.org
2024-04-25 19:24 ` cvs-commit at gcc dot gnu.org

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-111610-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).