From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D3B9B385CCA4; Wed, 27 Sep 2023 09:25:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3B9B385CCA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695806755; bh=K2QqV/4JmuOUePYC0tYb8ZtICPi8Kls0gBfQE9Z9iKc=; h=From:To:Subject:Date:From; b=Ui2jvBXAc0IfpanKxkVIIDnEyAADPs3kqBtkCVfaEOvFT2gyp+gX2GWcr2f6lsIoN 5Y8q4/+641qXfEdp/E36wKAQBImN7rtip04K73zYruOQq+1RMDOlu5U0akgfRwHJsL hsVh1d+5/hs6Ppo2JTgma+Eo5ofcXEm1NawCh6g4= From: "jamborm at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111610 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 erro= rs. 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 f= or versions based on dwarfutils 121+ we can use DWARF-3. Signed-off-by: Iain Sandoe 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 versi= on depending on the configured dsymutil version. We configure GCC with: ../src/configure --prefix=3D/tmp/some/prefix --enable-languages=3Dc,c++ --enable-checking=3Dyes --disable-bootstrap --disable-multilib --enable-obs= olete --target=3Dx86_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=20=20 -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrow= ing -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/../incl= ude=20 -I/home/mjambor/gcc/mine/src/gcc/../libcpp/include -I/home/mjambor/gcc/mine/src/gcc/../libcody=20 -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/darwi= n.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 =E2=80=98rtx_code=E2=80=99 to =E2=80=98darwin_external_toolchain=E2=80=99 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 =E2=80=98DSYMUTIL_VERSION=E2=80=99 128 | } dsymutil_version =3D {DSYMUTIL_VERSION}; | ^~~~~~~~~~~~~~~~=