Skip to content

Clang Does Not Supply Correct Linker Flags Under Slackware #10103

@llvmbot

Description

@llvmbot
Bugzilla Link 9731
Resolution FIXED
Resolved on Aug 14, 2011 02:58
Version trunk
OS Linux
Attachments Minimal solution diff
Reporter LLVM Bugzilla Contributor
CC @tkremenek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions