[haiku-bugs] [Haiku] #16763: Fix ARM bootstrap for hard + soft float binaries

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 21 Jan 2021 21:21:43 -0000

#16763: Fix ARM bootstrap for hard + soft float binaries
--------------------------+--------------------------
 Reporter:  kallisti5     |       Owner:  bonefish
     Type:  bug           |      Status:  new
 Priority:  normal        |   Milestone:  Unscheduled
Component:  Build System  |     Version:  R1/beta2
 Keywords:  arm efi       |  Blocked By:
 Blocking:                |    Platform:  All
--------------------------+--------------------------
 Our EFI arm (not arm64) bootloader requires software floating point, while
 our kernel + OS will use hardware floating point.

 Initial work has been completed, and some changes to our bootstrap gcc
 have taken place to generate bootloader-specific libgcc and friends with
 software floating point.
 
(https://github.com/haikuports/haikuports.cross/commit/b98463ad4a26f6f9a6661d60dda3cc1777ce8c92)

 The soft-fp bootstrap fails however with the following error:
 {{{
 /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-
 unknown-haiku/8.3.0/../../../../arm-unknown-haiku/bin/ld: error:
 
/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories
 /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot
 /cross-sysroot/arm/boot/system/develop/lib/init_term_dyn.o uses VFP
 register arguments, ./libgcc_s.so.1.tmp does not
 /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-
 unknown-haiku/8.3.0/../../../../arm-unknown-haiku/bin/ld: failed to merge
 target specific data of file
 
/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories
 /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot
 /cross-sysroot/arm/boot/system/develop/lib/init_term_dyn.o
 }}}


 The issue above needs resolved, then we need to unbootstrap the new arm
 gcc_bootstrap package, then ensure the EFI code on arm uses the new
 {{{libgcc_boot.a}}}

 To reproduce:
 {{{
 diff --git a/build/jam/repositories/HaikuPortsCross/arm
 b/build/jam/repositories/HaikuPortsCross/arm
 index 1cb76bb458..a9184aedca 100644
 --- a/build/jam/repositories/HaikuPortsCross/arm
 +++ b/build/jam/repositories/HaikuPortsCross/arm
 @@ -6,9 +6,9 @@ BootstrapPackageRepository HaikuPortsCross
         noto-20170202-7
         :
         # repository architecture packages (stage 0)
 -       gcc_bootstrap-8.3.0_2019_05_24-1
 -       gcc_bootstrap_syslibs-8.3.0_2019_05_24-1
 -       gcc_bootstrap_syslibs_devel-8.3.0_2019_05_24-1
 +       gcc_bootstrap-8.3.0_2019_05_24-4
 +       gcc_bootstrap_syslibs-8.3.0_2019_05_24-4
 +       gcc_bootstrap_syslibs_devel-8.3.0_2019_05_24-4
         :
         # repository architecture packages (stage 1)
         bash_bootstrap-4.4.023-1
 @@ -25,12 +25,11 @@ BootstrapPackageRepository HaikuPortsCross
         freetype_bootstrap_devel-2.6.3-1
         gawk_bootstrap-3.1.8-2
         grep_bootstrap-2.14-1
 -       icu_bootstrap-57.1-2
 -       icu_bootstrap_devel-57.1-2
 +       icu_bootstrap-57.2-2
 +       icu_bootstrap_devel-57.2-2
         less_bootstrap-451-1
         m4_bootstrap-1.4.16-1
         make_bootstrap-4.1-2
 -       mawk_bootstrap-1.3.4-1
         ncurses6_bootstrap-6.0-1
         ncurses6_bootstrap_devel-6.0-1
         python_bootstrap-2.7.6-1
 @@ -53,7 +52,6 @@ BootstrapPackageRepository HaikuPortsCross
         findutils_bootstrap
         flex_bootstrap
         freetype_bootstrap
 -       mawk_bootstrap
         gawk_bootstrap
         gcc_bootstrap
         grep_bootstrap
 }}}

 To try:
 {{{
 $ ../configure --cross-tools-source ../../buildtools/ --build-cross-tools
 arm --bootstrap ../../haikuporter/haikuporter ../../haikuports.cross/
 ../../haikuports -j16
 $ jam -q @bootstrap-raw
 }}}
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16763>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: