Ticket #834 (closed bug: invalid)

Opened 7 years ago

Last modified 4 years ago

bogus gcc option used when compiling ghc-6.4.2

Reported by: mvanier@… Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I'm compiling ghc-6.4.2 using gcc-4.1.1 on a gentoo linux system. It's going fine, except that there are persistent warnings about the unrecognized "-nopie" option. Presumably this is meant to be the opposite of the "-pie" (position independent executable) option, but apparently it isn't a valid option (at least not on this compiler). I just wanted to bring this to your attention.

Change History

Changed 7 years ago by dcoutts@…

  • status changed from new to closed
  • resolution set to invalid

This bug is only occurs on Gentoo because of options used in older versions of Gentoo's ghc-bin ebuild.

See Gentoo bug  #129891.

It is for reasons like this that we recommend Gentoo users to report bugs in Gentoo's bugzilla before bothering upstream developers. :-)

The real cause of this bug is that supporting a wide range of versions of gcc is rather tricky. We had tried to support the 'hardened' gcc versions. 'Hardened' gcc automatically builds with -pie -fstack-protector but these options cause gcc to produce output that ghc does not understand (ie it breaks every via-C compile). So we tried using -nopie and -fno-stack-protector. This made everything work for vanilla gcc-3.x and hardened gcc-3.x. Then it turned out that gcc-4.x didn't support the same options. So we made the ebuild only add the options if they were supported. Sadly that did not work for the -nopie option since gcc doesn't reject it with an non-zero return code, it just prints a warning. This has subsequently been fixed but it explains why you get the warnings - because the version of the ghc ebuild you started with had that issue when used with gcc-4.x.

So the solution is to do just what you have done, to rebuild ghc using the latest version of the ebuild. The version you build should not have the problem when building anything else.

So I'm closing this bug as invalid, because it's not an upstream bug.

Changed 4 years ago by simonmar

  • difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.