bagel99 / esl

Compiler for a new programming language: Embedded Systems Language (ESL).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't bootstrap on OS X

John-Titor opened this issue · comments

Applies to 7bfc758 using llvm 3.7.0 built from SVN.

A couple of problems; first is the header in main-start-x86-64.ll, for OS X the first couple of lines should be:

target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"

Unfortunately even after fixing this up, eslc0 segfaults:

./eslc0 -L3.7.0 -m x86-64 main.esl >main1.ll
/bin/sh: line 1: 63609 Segmentation fault: 11 ./eslc0 -L3.7.0 -m x86-64 main.esl > main1.ll

I'm not sure how to debug this further, but I'd be glad to help if I can.

(Sorry this took so long, I assumed issues would be emailed to me.)
I don't have access to an OS X machine, so I can't be of much help. Maybe run eslc0 under gdb/lldb and get a backtrace. It won't yield much, but might give me a hint were to look. I have fixed some segfault bugs since your attempt so it won't hurt to try again with something newer.

Happy to report that bootstrapping on macOS is now trivial; just needs pointed at the right llvm.