From: Maxim Uvarov <muvarov@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org,
uvarov@dev.rtsoft.ru
Cc: lists@nerdbynature.de, horms@verge.net.au
Subject: [PATCH 2/2] powerpc new toolchains fix (crt.S)
Date: Tue, 11 May 2010 21:47:57 +0400 [thread overview]
Message-ID: <20100511174757.19309.30827.stgit@muvarov> (raw)
In-Reply-To: <20100511174749.19309.44615.stgit@muvarov>
This patch is required in case if you are using new toolchains.
Best regards,
Maxim Uvarov.
From: Maxim Uvarov <muvarov@gmail.com>
Linker does not provide some vital functions when building freestanding
applications with a new toolchain, so we have to provide our own CRT.
p.s.
Without the CRT we won't see any build errors (since the purgatory is
linked with --no-undefined), but the purgatory code won't work,
'kexec -e' will just hang the board.
I added option to configure to keep code buildable for old toolchais.
But there should be way to do this automatically.
Author: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
---
configure.ac | 9 +++++++++
purgatory/arch/ppc/Makefile | 3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index fcf50e4..63606bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,6 +159,15 @@ if test "$with_xen" = yes ; then
AC_MSG_NOTICE([Xen support disabled])))
fi
+dnl new toolchains
+if test "$ARCH" = ppc; then
+AC_ARG_WITH([oldtoolchain],
+ AC_HELP_STRING([--with-oldtoolchain],[compile without crt.S
+ required for new toolchains]),
+ AC_DEFINE(PPC_OLDTOOLCHAIN, 1,
+ [Define to compile with old toolchains]))
+fi
+
dnl ---Sanity checks
if test "$CC" = "no"; then AC_MSG_ERROR([cc not found]); fi
if test "$CPP" = "no"; then AC_MSG_ERROR([cpp not found]); fi
diff --git a/purgatory/arch/ppc/Makefile b/purgatory/arch/ppc/Makefile
index 72289a0..d11ec3e 100644
--- a/purgatory/arch/ppc/Makefile
+++ b/purgatory/arch/ppc/Makefile
@@ -6,6 +6,9 @@ ppc_PURGATORY_SRCS += purgatory/arch/ppc/v2wrap_32.S
ppc_PURGATORY_SRCS += purgatory/arch/ppc/misc.S
ppc_PURGATORY_SRCS += purgatory/arch/ppc/purgatory-ppc.c
ppc_PURGATORY_SRCS += purgatory/arch/ppc/console-ppc.c
+ifndef PPC_OLDTOOLCHAIN
+ ppc_PURGATORY_SRCS += purgatory/arch/ppc/crt.S
+endif
dist += purgatory/arch/ppc/Makefile $(ppc_PURGATORY_SRCS) \
purgatory/arch/ppc/purgatory-ppc.h purgatory/arch/ppc/ppc_asm.h
next prev parent reply other threads:[~2010-05-11 17:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 17:47 [PATCH 1/2] Fix kexec on powerpc32 Maxim Uvarov
2010-05-11 17:47 ` Maxim Uvarov [this message]
2010-05-11 17:57 ` Christian Kujau
2010-05-12 3:44 ` Christian Kujau
2010-05-12 6:31 ` Maxim Uvarov
2010-05-12 6:56 ` Christian Kujau
2010-05-12 13:19 ` Simon Horman
2010-05-12 7:22 ` Christian Kujau
2010-05-12 12:12 ` Maxim Uvarov
2010-05-13 11:19 ` Christian Kujau
2010-05-13 11:50 ` Maxim Uvarov
2010-05-14 0:43 ` Christian Kujau
2010-05-13 11:50 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100511174757.19309.30827.stgit@muvarov \
--to=muvarov@gmail.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lists@nerdbynature.de \
--cc=uvarov@dev.rtsoft.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).