attila-lendvai / maru

Maru - a tiny self-hosting lisp dialect
http://piumarta.com/software/maru/
Other
189 stars 10 forks source link

make on macos fails #6

Open bentxt opened 1 year ago

bentxt commented 1 year ago

Hi, just a short report

make TARGET_CPU=x86_64 TARGET_VENDOR=apple TARGET_OS=darwin test-bootstrap-llvm
test -e [..]/maru/maru/build/eval0/eval0-llvm || /Applications/Xcode.app/Contents/Developer/usr/bin/make [...]/maru/build/eval0/eval0-llvm
/Applications/Xcode.app/Contents/Developer/usr/bin/make --directory=[...]/maru/maru/build/eval0     \
        TARGET_CPU=i686             \
        TARGET_VENDOR=apple     \
        TARGET_OS=darwin            \
        PLATFORM=linux              \
        eval0-llvm
echo Building build/maru.9/eval
Building build/maru.9/eval
test -d build/maru.9 || git worktree add --detach --force build/maru.9 maru.9
find build/maru.9/build -type f -exec touch {} \;
/Applications/Xcode.app/Contents/Developer/usr/bin/make --directory=build/maru.9  eval-llvm
clang -O3 -nostdlib -nostartfiles -Wl,-Bstatic -Qunused-arguments -m32 --target=i686-apple-darwin -o build/llvm-linux/i686-apple-darwin/eval1  build/llvm-linux/32bit-le/eval1.ll
warning: overriding the module target triple with i686-apple-macosx13.0.0 [-Woverride-module]
1 warning generated.
ld: unknown/unsupported architecture name for: -arch i686
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [build/llvm-linux/i686-apple-darwin/eval1] Error 1
make[2]: *** [build/maru.9/eval] Error 2
make[1]: *** [...]/maru/maru/build/eval0/eval0-llvm] Error 2
make: *** [build/llvm-libc/64bit-le/eval1.ll] Error 2

clang version:

clang --version
Homebrew clang version 16.0.5
Target: x86_64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
attila-lendvai commented 1 year ago

it think 32 bit support has been discontinued on LLVM, or just LLVM for macos, so there's not much we can do, other than adjusting the compiler/bootstrap to target x86_64.

attila-lendvai commented 1 year ago

or... maybe --target=i686-apple-darwin should be --target=i686-apple-macosx13.0.0? worth a try, but i don't have macos VM lying around to try this.