clang fails freestanding test at `-O0` because it assumes `memcpy/memset` calls
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 91
- Forks
- 3
- Avg merge
- 13d 22h
- Merged PRs (30d)
- 1
Description
Problem
Doing:
make CC=clang test && nm -u build/freestanding
Gives:
...
cc -std=c99 -Wextra -Wall -Werror -O0 -I. -ffreestanding -c test/freestanding.c -o build/freestanding
...
U memcpy
U memset
For some reason it assumes those calls. gcc doesn't.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running make CC=clang test followed by nm -u build/freestanding, then inspect test/freestanding.c and the make test target. Compare the clang and GCC builds at -O0 with -ffreestanding; done means the clang build completes without unresolved memcpy or memset symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 48/100