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

target_ld_options will apply flags that should be skipped #5488

Closed
SebastianBoe opened this issue Dec 27, 2017 · 0 comments · Fixed by #5490
Closed

target_ld_options will apply flags that should be skipped #5488

SebastianBoe opened this issue Dec 27, 2017 · 0 comments · Fixed by #5490
Assignees
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug

Comments

@SebastianBoe
Copy link
Collaborator

target_ld_options should be testing whether the linker accepts a flag, but in reality it is only testing whether the compiler accepts the flag.

This was discovered in #5458 and partially fixed in #5459. The fix developed for #5459 should be applied to target_ld_options as well.

@SebastianBoe SebastianBoe added area: Build System bug The issue is a bug, or the PR is fixing a bug labels Dec 27, 2017
@SebastianBoe SebastianBoe self-assigned this Dec 27, 2017
SebastianBoe added a commit to SebastianBoe/zephyr that referenced this issue Dec 27, 2017
target_ld_options() was only testing whether a flag could be passed to
the compiler driver when it was compiling an object file. Not whether
a flag could be passed to the compiler driver when it was linking an
elf file.

For most flags, these tests would have the same result, but it does
not for flags like -Wl,--print-memory-usage or -Wl,notaflag.

This patch fixes zephyrproject-rtos#5488 by re-using the method from zephyrproject-rtos#5459.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
nashif pushed a commit that referenced this issue Dec 28, 2017
target_ld_options() was only testing whether a flag could be passed to
the compiler driver when it was compiling an object file. Not whether
a flag could be passed to the compiler driver when it was linking an
elf file.

For most flags, these tests would have the same result, but it does
not for flags like -Wl,--print-memory-usage or -Wl,notaflag.

This patch fixes #5488 by re-using the method from #5459.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant