tpoechtrager / cctools-port

Apple cctools port for Linux and *BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clang-10: error invalid arch name '-arch arm64e'

okanon opened this issue · comments

Attempting to define arm64e as an architecture will result in an error.
I am building using iPhoneOS13.2.sdk. Why do I get this problem?

Not supported by upstream Clang, I suppose.

Should I build and use clang for this project?

You could give it a try. I haven't tested it.

I built apple/llvm-project master and llvm/llvm-project master yesterday and tried building cctools with arm64e option.

ld: unknown/unsupported architecture name for: -arch arm64e
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)

Known issues have been resolved with clang built from both apple/llvm-project master and llvm/llvm-project master. but, a new linker error has occurred.
In this case, is it that ld64 on the cctools side does not support arm64e?

I feel that apple-libtapi does not support arm64e. Is there any relevance?

-- TAPI version: 10.0.0
-- Supported Architectures: i386;x86_64;x86_64h;armv4t;armv6;armv5;armv7;armv7s;armv7k;armv6m;armv7m;armv7em;arm64

It's not the TAPI library, it's the linker. There's something missing.

$ grep -rn "\"arm64\""
src/abstraction/MachOFileAbstraction.hpp:669:   { "arm64", CPU_TYPE_ARM64,   CPU_SUBTYPE_ARM64_ALL,  "arm64-",  "aarch64-",  true,  false },
src/ld/parsers/macho_relocatable_file.cpp:1449: return "arm64";
src/ld/parsers/macho_dylib_file.cpp:774:  return "arm64";
src/other/machochecker.cpp:353:                 return "arm64";
src/other/unwinddump.cpp:103:template <>         const char*    UnwindPrinter<arm64>::archName()        { return "arm64"; }
src/other/unwinddump.cpp:1173:                                  else if ( strcmp(arch, "arm64") == 0 )

Maybe you can get it working by adding arm64e to the array. But I can't promise anything. The code is missing in the sources Apple provided.

okay:cry:

Should be working now.