https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68808
Bug ID: 68808 Summary: "--sysroot" not propagated to linker when "--specs" is used Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: cinoltyuklair at gmail dot com Target Milestone: --- Platform: x86-64 VMware Player OS: CRUX (GNU/Linux) GCC 5.3.0 binutils 2.25.1 The gcc driver program fails to propagate the "--sysroot" option to the linker when "--specs" is supplied as well. $ cat a.c int main(){} $ gcc a.c --sysroot=/myos -v 2>log0 $ gcc -dumpspecs >specs $ gcc a.c --sysroot=/myos --specs=specs -v 2>log1 Comparing log0 and log1, the last line which is the invocation to collect2 is different only in that in log0 "--sysroot" is propagated while in log1 it is not. I believe that this difference should not exist, given that both invocations are using the same specs. Apparently I can't attach multiple files so I will post logs to pastebin: build-time config.log: http://pastebin.com/83sDq8Pv log0: http://pastebin.com/gxYaYr94 log1: http://pastebin.com/DesvfaFu specs: http://pastebin.com/TwVM1BVc