Bug 1171434 - Detection of RHEL and variants in clang is incomplete
Summary: Detection of RHEL and variants in clang is incomplete
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: llvm
Version: epel7
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Dave Johansen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-07 00:13 UTC by Michael Lampe
Modified: 2015-02-15 20:40 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-02-15 20:40:48 UTC


Attachments (Terms of Use)
Patch (1.75 KB, patch)
2014-12-07 00:13 UTC, Michael Lampe
no flags Details | Diff
Corrected Patch (2.26 KB, patch)
2014-12-08 23:28 UTC, Michael Lampe
no flags Details | Diff

Description Michael Lampe 2014-12-07 00:13:16 UTC
Created attachment 965490 [details]
Patch

Clang's ToolChains.cpp in tools/clang/lib/Driver tries to detect the distribution it runs on. Current code detects RHEL6 nut not CentOS 6, RHEL7 isn't tested for at all. Also, Scientific Linux is never tested for. This leads to the omission of the following flags at link time on C6/SL6 and on EL7 in general:

--build-id

--hash-style=gnu

--no-add-needed

These flags are handed to the linker on said systems by both the system compiler and all devtoolset compilers. Clang wants to reproduce this bevahiour but fails because of insufficient distribution detection.

Attached patch (for both epel6 and 7) fixes this.

Comment 1 Michael Lampe 2014-12-08 23:27:26 UTC
Corrected patch:

- Take the system compiler as reference: Only el7 emmits --no-add-needed

- Don't treat /etc/lsb-release as Ubuntu only, el6 has this file too.

Comment 2 Michael Lampe 2014-12-08 23:28:15 UTC
Created attachment 966034 [details]
Corrected Patch

Comment 3 Fedora Update System 2015-01-30 13:41:33 UTC
llvm-3.4.2-6.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/llvm-3.4.2-6.el7

Comment 4 Fedora Update System 2015-01-30 16:03:33 UTC
Package llvm-3.4.2-6.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing llvm-3.4.2-6.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0561/llvm-3.4.2-6.el7
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-02-15 20:40:48 UTC
llvm-3.4.2-6.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.