justinethier / cyclone

:cyclone: A brand-new compiler that allows practical application development using R7RS Scheme. We provide modern features and a stable system capable of generating fast native binaries.
http://justinethier.github.io/cyclone/
MIT License
825 stars 44 forks source link

Using gcc 10.1 with cyclone results in multiple defintion linker errors #388

Closed donaldsonjw closed 4 years ago

donaldsonjw commented 4 years ago

In gcc 10, gcc now defaults to compiling with the -fno-common compiler option enabled. This causes multiple definition linker errors for a number of symbols including _argc and _argv. It can be fixed by passing -fcommon to gcc.

justinethier commented 4 years ago

Thanks for the report @donaldsonjw ! Will see about getting a fix for this ASAP.

justinethier commented 4 years ago

Looks like we can fix the root problem instead of passing/not passing the -fcommon option. This works with gcc 10.1 on Arch Linux as well as in older versions of gcc on github's CI.

@donaldsonjw If you are able, can you confirm this fix works for you as well?

donaldsonjw commented 4 years ago

I can confirm it works for me. Thanks.