Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mpy-cross build on Apple M1 machines #4835

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Conversation

djix123
Copy link

@djix123 djix123 commented May 31, 2021

Patch to fix build of mpy-cross on Apple M1 machine

(Fix is a direct copy from latest micropython/py/nlraarch64.c)

@dhalbert
Copy link
Collaborator

dhalbert commented Jun 1, 2021

@djix123 I tested #4832 on an M1 and did not get an error. I'm not doubting this is necessary, but what problem did you run into?

@djix123
Copy link
Author

djix123 commented Jun 1, 2021

Using 'gcc-arm-none-eabi-10-2020-q4-major' I get:

Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
Undefined symbols for architecture arm64:
"_nlr_push", referenced from:
_mp_iternext in runtime.o
_mp_load_method_protected in runtime.o
_mp_parse_compile_execute in runtime.o
_it_iternext in objgetitemiter.o
_mp_execute_bytecode in vm.o
main in main.o
(maybe you meant: _nlr_push_tail)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mpy-cross] Error 1

when executing: make -C mpy-cross.

Looks like some kind of function name generation difference, since all the patch does is add the leading '_'.

@dhalbert
Copy link
Collaborator

dhalbert commented Jun 1, 2021

@jepler Do you know why we did not see the problem above when you added the M1 builds?

@jepler
Copy link
Member

jepler commented Jun 1, 2021

Yes, when built by the ci it used a different makefile which forced setjmp-based nlr. That will be unnecessary after this change.

Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@jepler jepler merged commit 623b935 into adafruit:main Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants