Clang Does Not Supply Correct Linker Flags Under Slackware #10103
Labels
bugzilla
Issues migrated from bugzilla
clang:driver
'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Extended Description
To Reproduce:
Attempt to link together files with most recent clang version on Slackware.
Results:
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Fix:
ToolChains.cpp must have the path added for the Slackware gcc directory.
See attached diff for minimal fix for C linking under Slackware.
Note:
Based upon how the function for identifying the GccTripple, it seems as though it would be more logical and portable to find the /??/gcc/ folder and assume that the folder nested inside of it is the GccTripple.
This may be invalid in some special cases, but it appears to be much more general than the current approach.
The text was updated successfully, but these errors were encountered: