Hey!

It seems like the RSB patch for crt[i/n] was mistakenly taken out
along with other stuff:
https://git.rtems.org/rtems-source-builder/commit/?id=258129e140a2f0c7f579492bda2a86c6c1b93080

I'm on a new computer where I'll have to compile git from source to
use `send-email` to send the patch, so I've just attached it here -
hope that's okay! (I can send it properly tomorrow if we want the
community to review it.)

I've tested that with this patch, the RTEMS kernel does successfully build.


On Thu, Mar 14, 2019 at 8:52 PM Joel Sherrill <j...@rtems.org> wrote:
>
> Hi
>
> Sebastian mentioned that x86_64 gcc is missing crti/n. I looked on the
> GCC master and the code is in libgcc/config.host. This is in
> libgcc/config.host on the master. I am assuming it  isn't in gcc 7.4.0
> and the RSB is missing a patch.
>
> x86_64-*-elf* | x86_64-*-rtems*)
>         tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
>         case ${host} in
>           x86_64-*-rtems*)
>             extra_parts="$extra_parts crti.o crtn.o"
>             ;;
>         esac
>         ;;
>
> Thanks to git blame, the code is from Amaan and the github URL
> for the patch is:
>
> https://github.com/gcc-mirror/gcc/commit/ab55f7db3694293e4799d58f7e1a556c0eae863a
>
> Amaan.. care to prepare an RSB patch so crti/n is included in the tools from 
> the
> RSB. Please and thank you.
>
> --joel
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
From edd8d1090eaf35a56346af8130b1d1a73fcb2d56 Mon Sep 17 00:00:00 2001
From: Amaan Cheval <amaan.che...@gmail.com>
Date: Thu, 14 Mar 2019 22:26:48 +0530
Subject: [PATCH] 5: Fix x86_64 GCC build to include crt[in].o

This was mistakenly removed in commit 258129e, but is still required.
---
 rtems/config/5/rtems-x86_64.bset | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rtems/config/5/rtems-x86_64.bset b/rtems/config/5/rtems-x86_64.bset
index 2d6ff5f..fef043d 100644
--- a/rtems/config/5/rtems-x86_64.bset
+++ b/rtems/config/5/rtems-x86_64.bset
@@ -3,3 +3,7 @@
 %define with_libgomp
 
 %include 5/rtems-default.bset
+
+# Have gcc build crti.o and crtn.o
+%patch add gcc --rsb-file=gcc-f8fd78279d353f6959e75ac25571c1b7b2dec110.patch https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=libgcc/config.host;h=f8fd78279d353f6959e75ac25571c1b7b2dec110;hp=11b4acaff55e00ee6bd3c182e9da5dc597ac57c4;hb=ab55f7db3694293e4799d58f7e1a556c0eae863a;hpb=344c180cca810c50f38fd545bb9a102fb39306b7
+%hash sha512 gcc-f8fd78279d353f6959e75ac25571c1b7b2dec110.patch aef76f9d45a53096a021521375fc302a907f78545cc57683a7a00ec61608b8818115720f605a6b1746f479c8568963b380138520e259cbb9e8951882c2f1567f
-- 
2.21.0

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to