-
-
Notifications
You must be signed in to change notification settings - Fork 469
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 search order in INPUT and GROUP of script #1217
Conversation
CI failed because of "No space left on device" |
The scenario is from incremental cross compiling gcc. libgcc_s.so is a ld script in my OS. GROUP ( libgcc_s.so.1 -lgcc ) The path of libgcc_s.so.1 is not absolute. When current directory contains libgcc_s.so.1 of other ISA, We will get target of other ISA and report "skipping incompatible file". As ld manual shows: If a sysroot prefix is not used then the linker will try to open the file in the directory containing the linker script. If it is not found the linker will then search the current directory. If it is still not found the linker will search through the archive library search path.
@rui314 which is the best way to solve this?
|
Does the above commit fix the problem for you? |
No, the commit not fix the problem. get_script_output_type still uses "open" function and open the library existed in current directory.
|
Can you write a test to demonstrate the issue? |
My OS is Manjaro. The minimal requirements as following:
The call trace : |
Can you reproduce the problem with the minimal requirement? |
I think I understood the issue. I'm preparing a fix. |
Can you try again with the above change? |
It's OK now. |
Cool, thank you for confirming! |
The scenario is from incremental cross compiling gcc. libgcc_s.so is a ld script in my OS.
GROUP ( libgcc_s.so.1 -lgcc )
The path of libgcc_s.so.1 is not absolute.
When current directory contains libgcc_s.so.1 of other ISA, We will get target of other ISA and report "skipping incompatible file".
As ld manual shows:
If a sysroot prefix is not used then the linker will try to open the file in the directory containing the linker script. If it is not found the linker will then search the current directory. If it is still not found the linker will search through the archive library search path.