Score:0

cc1: error: unknown value ‘haswell’ for ‘-march’

uz flag

I'm trying to run but it gives an error:

gcc -Wall -Wpedantic -std=c17 -march=haswell -c array_sum.S -o array_sum.o
cc1: error: unknown value ‘haswell’ for ‘-march’
cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a native

How can I fix this? I use parallels desktop 18 for mac - ubuntu 22.04 arm 64 the version of gcc & g++ is 11.3.0

vidarlo avatar
om flag
Why are you attempting to compile it for *haswell*? Haswell is an Intel x86_64 CPU, whilst your Mac has an ARM cpu. You will not be able to run the resulting binary on your mac.
Martin Thornton avatar
cn flag
That `array_sum.S` file isn't C. It's machine specific *assembly language* and won't run on an arm64.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.