[haiku-bugs] Re: [Haiku] #12430: gcc 4 won't build a non-position-independent executable

  • From: "simonsouth" <trac@xxxxxxxxxxxx>
  • Date: Thu, 29 Oct 2015 00:23:20 -0000

#12430: gcc 4 won't build a non-position-independent executable
--------------------------+----------------------------
Reporter: simonsouth | Owner: korli
Type: bug | Status: assigned
Priority: normal | Milestone: Unscheduled
Component: System | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
--------------------------+----------------------------

Comment (by simonsouth):

Yes; this latest patch should clear up these warnings.

* From looking at the code it seems kernel add-ons are really meant to be
built as shared objects (hence the lack of an apparent entry point), which
just happened to be the default behaviour before. Adding `-shared` to the
link options makes this explicit and clears up those warnings.

* The same warning was being issued by the BuildMBR rule, which was using
the `-Xlinker` option incorrectly in an attempt to specify the entry point
to the linker (the GCC manual actually
[https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Link-Options.html#index-
Xlinker-1054 warns about this misuse]). A bit of reformatting fixes this
as well.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12430#comment:7>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: