5

Homebrew GCC may not work properly on Apple M1 devices

 11 months ago
source link: https://codeforces.com/blog/entry/116459
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Homebrew GCC may not work properly on Apple M1 devices

These days I'm trying to compile the following c++ code:

#include<vector>

const int MAXN=1e5+5;
std::vector<int> factor[MAXN];

signed main() {return 0;}

This code works while I'm using g++ 11.3.0. However, if I use g++ 13.1.0 or 12.1.0, I'll receive a compile error:

/var/folders/v7/yk8tz4j54cl2lhp1f80nyz700000gn/T//cc2HpyzP.s:371:29: error: unexpected token in '.section' directive
        .section .data.rel.ro.local

Reinstalling the compiler doesn't works. What should I do?

Note I use Apple M1 with MacOS 13.2.1 (22D68).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK