[haiku-bugs] Re: [Haiku] #15702: makefile_engine: can't build 64bit drivers

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 10 Feb 2020 08:08:59 -0000

#15702: makefile_engine: can't build 64bit drivers
----------------------------+----------------------------
   Reporter:  X512          |      Owner:  bonefish
       Type:  bug           |     Status:  new
   Priority:  normal        |  Milestone:  Unscheduled
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  0             |   Platform:  x86-64
----------------------------+----------------------------
Description changed by X512:

Old description:

This is hrev53780 x86_64.

When building test driver on x86_64, link fails:
{{{
cc -o "objects.x86_64-cc8-release/acpi_test"
objects.x86_64-cc8-release/acpi_test.o  -nostdlib
/boot/system/develop/lib/_KERNEL_
/boot/system/develop/lib/haiku_version_glue.o  -L./
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-
haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld:
objects.x86_64-cc8-release/acpi_test.o: relocation R_X86_64_32 against
`.bss' can not be used when making a shared object; recompile with -fPIC
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-
haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed:
nonrepresentable section on output
collect2: error: ld returned 1 exit status
/boot/system/develop/etc/makefile-engine:246: recipe for target
'objects.x86_64-cc8-release/acpi_test' failed
make: *** [objects.x86_64-cc8-release/acpi_test] Error 1
}}}
If add `-fPIC` to compiler options, drivers compiles, but don't load, bad
data error is written in syslog.

New description:

 This is hrev53780 x86_64.

 When building test driver on x86_64, link fails:
 {{{
 cc -o "objects.x86_64-cc8-release/acpi_test"
 objects.x86_64-cc8-release/acpi_test.o  -nostdlib
 /boot/system/develop/lib/_KERNEL_
 /boot/system/develop/lib/haiku_version_glue.o  -L./
 /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-
 haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld:
 objects.x86_64-cc8-release/acpi_test.o: relocation R_X86_64_32 against
 `.bss' can not be used when making a shared object; recompile with -fPIC
 /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-
 haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed:
 nonrepresentable section on output
 collect2: error: ld returned 1 exit status
 /boot/system/develop/etc/makefile-engine:246: recipe for target
 'objects.x86_64-cc8-release/acpi_test' failed
 make: *** [objects.x86_64-cc8-release/acpi_test] Error 1
 }}}
 If add `-fPIC` to compiler options, drivers compiles, but don't load, bad
 data error is written in syslog.

 32 bit version compile and run without problems.

--
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15702#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: