From 713442199fbf578d3a831c766c8e2d422cb308b1 Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Thu, 22 Jan 2009 16:50:06 +0530 Subject: [PATCH] gcc: Patch libgcc_post_upgrade to build on ARM. Signed-off-by: Kedar Sovani --- gcc.spec | 4 +++- libgcc_post_upgrade.c.arm.patch | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletions(-) create mode 100644 libgcc_post_upgrade.c.arm.patch diff --git a/gcc.spec b/gcc.spec index a910182..9d5eba0 100644 --- a/gcc.spec +++ b/gcc.spec @@ -40,7 +40,7 @@ Summary: Various compilers (C, C++, Objective-C, Java, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release} +Release: %{gcc_release}.fa1 # libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions @@ -161,6 +161,7 @@ Patch30: gcc44-libstdc++-docs.patch Patch31: gcc44-pr39666.patch Patch32: gcc44-pr40035.patch Patch33: gcc44-pr39942.patch +Patch34: libgcc_post_upgrade.c.arm.patch Patch1000: fastjar-0.97-segfault.patch @@ -1118,6 +1119,7 @@ EOF chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/c?9 mkdir -p $RPM_BUILD_ROOT%{_prefix}/sbin +patch %{SOURCE1} < %{PATCH34} gcc -static -Os %{SOURCE1} -o $RPM_BUILD_ROOT%{_prefix}/sbin/libgcc_post_upgrade strip $RPM_BUILD_ROOT%{_prefix}/sbin/libgcc_post_upgrade diff --git a/libgcc_post_upgrade.c.arm.patch b/libgcc_post_upgrade.c.arm.patch new file mode 100644 index 0000000..3e1e884 --- /dev/null +++ b/libgcc_post_upgrade.c.arm.patch @@ -0,0 +1,15 @@ +--- libgcc_post_upgrade.c.orig 2007-11-30 06:35:49.000000000 -0500 ++++ libgcc_post_upgrade.c 2007-11-30 06:35:31.000000000 -0500 +@@ -439,6 +439,12 @@ + pid_t __fork (void) { return -1; } + char thr_buf[65536]; + ++#if defined __arm__ ++/* Prevent pulling in libc-start.o (which also defines ++ * __libc_start_main.) */ ++unsigned int __stack_chk_guard = ~0U; ++#endif ++ + #ifndef __powerpc__ + int __libc_start_main (int (*main) (int argc, char **argv), + int argc, char **argv, -- 1.5.5.6