Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1214506 - libtool includes compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" which break mingw builds
Summary: libtool includes compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-l...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libtool
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1192183
TreeView+ depends on / blocked
 
Reported: 2015-04-22 21:42 UTC by Sandro Mani
Modified: 2015-04-27 08:37 UTC (History)
6 users (show)

Fixed In Version: libtool-2.4.6-4.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-24 23:01:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sandro Mani 2015-04-22 21:42:21 UTC
Description of problem:
If you do an autoreconf -if of a project and then built it with the mingw toolchain, the libtool script copied into the project build dir contains

compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"

which breaks the mingw build due to the unsupported -z option when building shared libraries:

/usr/lib/gcc/i686-w64-mingw32/5.0.0/../../../../i686-w64-mingw32/bin/ld: 
unrecognized option '-z'
/usr/lib/gcc/i686-w64-mingw32/5.0.0/../../../../i686-w64-mingw32/bin/ld: 
use the --help option for usage information


Version-Release number of selected component (if applicable):
libtool-2.4.6-2.fc23.x86_64

Comment 1 Erik van Pienbroek 2015-04-24 16:03:07 UTC
mingw-libgcrypt also fails to build on rawhide due to this issue: http://koji.fedoraproject.org/koji/taskinfo?taskID=9559968

Comment 2 Pavel Raiskup 2015-04-24 21:43:59 UTC
Hi Erik, thanks for the report and sorry for the delay.

(In reply to Sandro Mani from comment #0)
> Description of problem:
> If you do an autoreconf -if of a project and then built it with the mingw
> toolchain, the libtool script copied into the project build dir contains
>
> compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"

Without big observation, this seems to be expected behavior.  Otherwise the
package hardening would not work for libtool-compiled packages.

I believe this happens to you because Fedora Rawhide started to use
_hardened_build by default.  You need to %undefine _hardened_build, but
its not unlikely that this is not definite solution yet, see
the bug 1211296 for more info.

Please reopen against libtool or redhat-rpm-config if you feel
I'm wrong, thanks.

Pavel

Comment 3 Michael Cronenworth 2015-04-24 21:52:52 UTC
This is not that bug, Pavel.

libtool *ships* with the setting inside. The RPM macro does nothing, undefined or not.

Comment 4 Pavel Raiskup 2015-04-24 22:25:41 UTC
Ouch, thanks.  Its IMO related bug, however from the different POV.  Disabling
hardened build for libtool should fix that, yes?

Comment 6 Michael Cronenworth 2015-04-25 00:58:15 UTC
That seems to have fixed it. Thanks.

Comment 7 Moez Roy 2015-04-27 02:42:18 UTC
(In reply to Michael Cronenworth from comment #3)
> This is not that bug, Pavel.
> 
> libtool *ships* with the setting inside. The RPM macro does nothing,
> undefined or not.


(In reply to Pavel Raiskup from comment #4)
> Ouch, thanks.  Its IMO related bug, however from the different POV. 
> Disabling
> hardened build for libtool should fix that, yes?


Packages that use libtool will now not be hardened as intended by the RPM OPT FLAGS?

Comment 8 Pavel Raiskup 2015-04-27 06:32:19 UTC
(In reply to Moez Roy from comment #7)
> (In reply to Pavel Raiskup from comment #4)
> Packages that use libtool will now not be hardened as intended by the RPM
> OPT FLAGS?

No, packages which use libtool should run ./configure to generate its own
script ./libtool from ltmain.sh (and the _configure_libtool_hardening_hack
will apply to them).

Comment 9 Moez Roy 2015-04-27 08:37:04 UTC
(In reply to Pavel Raiskup from comment #8)
> (In reply to Moez Roy from comment #7)
> > (In reply to Pavel Raiskup from comment #4)
> > Packages that use libtool will now not be hardened as intended by the RPM
> > OPT FLAGS?
> 
> No, packages which use libtool should run ./configure to generate its own
> script ./libtool from ltmain.sh (and the _configure_libtool_hardening_hack
> will apply to them).

Ok. Thanks for clarifying.


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