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

Object files in variant folder are not linked #14

Closed
cmaglie opened this issue Sep 23, 2015 · 2 comments
Closed

Object files in variant folder are not linked #14

cmaglie opened this issue Sep 23, 2015 · 2 comments
Assignees

Comments

@cmaglie
Copy link
Member

cmaglie commented Sep 23, 2015

The source files in the variant folder are compiled as usual but not linked in the final step.

For example the Arduino Due core has a variant.cpp file that is compiled but its not included in the link. Compiling the empty sketch gives the following error:

/tmp/build000836b13d58999ef1ebfbc27ce3b3be.tmp/core.a(main.cpp.o): In function `main':
/home/megabug/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/main.cpp:44: warning: undefined reference to `init'

because the init() function is defined inside variant.cpp.

@ffissore
Copy link
Contributor

Argh thank you! I didn't noticed because gcc was issuing a warning and was not failing. Good catch! Thank you!

@ffissore ffissore self-assigned this Sep 24, 2015
cmaglie added a commit to arduino/Arduino that referenced this issue Sep 24, 2015
Previously the linker flag:

  -Wl,--warn-unresolved-symbols

prevented the build to fail (the unresolved symbols were just
displayed as a warning).

See also: arduino/arduino-builder#14
@cmaglie
Copy link
Member Author

cmaglie commented Sep 24, 2015

Pushed a fix also to the SAM core, now it should emit an error: arduino/Arduino@7d0355c

sandeepmistry pushed a commit to sandeepmistry/Arduino that referenced this issue Sep 29, 2015
Previously the linker flag:

  -Wl,--warn-unresolved-symbols

prevented the build to fail (the unresolved symbols were just
displayed as a warning).

See also: arduino/arduino-builder#14
@ffissore ffissore added the bug label Oct 2, 2015
facchinm pushed a commit to arduino/ArduinoCore-sam that referenced this issue Jan 19, 2017
Previously the linker flag:

  -Wl,--warn-unresolved-symbols

prevented the build to fail (the unresolved symbols were just
displayed as a warning).

See also: arduino/arduino-builder#14
adamvoss pushed a commit to macchina/arduino-boards-sam that referenced this issue Jul 25, 2017
Previously the linker flag:

  -Wl,--warn-unresolved-symbols

prevented the build to fail (the unresolved symbols were just
displayed as a warning).

See also: arduino/arduino-builder#14
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

No branches or pull requests

2 participants