NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/56288: ./build.sh tools does not work on Apple M1 Macs (#2) due to gcc build



>Number:         56288
>Category:       toolchain
>Synopsis:       ./build.sh tools does not work on Apple M1 Macs (#2) due to gcc build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 01 09:00:01 +0000 2021
>Originator:     Chris Pinnock
>Release:        NetBSD-current as of today
>Organization:
>Environment:
Darwin 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin



>Description:
cf. PR#56269 (build.sh tools is broken due to gmp on Apple M1 Macs)

To try to see if I could get beyond the gmp problem, I used the 
latest gmp library which has better support for M1 (it builds) and 
ran ./build.sh targetting amd64. 

The next problem build.sh tools faces is this gcc error:

c++ -no-pie   -O -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o i386-c.o default-c.o \
	  cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -L/Users/chris/src/NetBSD/current/src/../objects/amd64/tooldir.Darwin-20.5.0-arm64/lib -L/Users/chris/src/NetBSD/current/src/../objects/amd64/tooldir.Darwin-20.5.0-arm64/lib -L/Users/chris/src/NetBSD/current/src/../objects/amd64/tooldir.Darwin-20.5.0-arm64/lib -lmpc -lmpfr -lgmp   -lz 
clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
Undefined symbols for architecture arm64:
  "_host_hooks", referenced from:
      c_common_no_more_pch() in c-pch.o
      general_init(char const*, bool) in libbackend.a(toplev.o)
      gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a(ggc-common.o)
ld: symbol(s) not found for architecture arm64
>How-To-Repeat:
On Apple M1 Mac with Big Sur:
- Get latest NetBSD-current sources
- Replace external/lgpl3/gmp/dist with gmp-6.2.1 distribution (cf PR#56269)
- Run ./build.sh -U -m amd64 tools

>Fix:
unknown



Home | Main Index | Thread Index | Old Index