diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-06-12 17:20:58 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-16 01:00:54 -0400 |
commit | da3de6df33f5f42ff9dc40093fbc884f524c9a49 (patch) | |
tree | b0c5d209cde49e55bdd41b6125ae58918bd31ed5 /arch/powerpc/kernel | |
parent | 143580ecfb7999147e546cc3814023e233e95fa5 (diff) |
[POWERPC] Fix -Os kernel builds with newer gcc versions
GCC 4.4.x looks to be adding support for generating out-of-line register
saves/restores based on:
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01678.html
This breaks the kernel if we enable CONFIG_CC_OPTIMIZE_FOR_SIZE. To fix
this we add the use the save/restore code from gcc and simplified it down
for our needs (integer only).
Additionally, we have to link this code into each module. The other
solution was to add EXPORT_SYMBOL() which meant going through the
trampoline which seemed nonsensical for these out-of-line routines.
Finally, we add some checks to prom_init_check.sh to ignore the
out-of-line save/restore functions.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/prom_init_check.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh index 31729a9387df..2c7e8e87f770 100644 --- a/arch/powerpc/kernel/prom_init_check.sh +++ b/arch/powerpc/kernel/prom_init_check.sh | |||
@@ -48,6 +48,20 @@ do | |||
48 | fi | 48 | fi |
49 | done | 49 | done |
50 | 50 | ||
51 | # ignore register save/restore funcitons | ||
52 | if [ "${UNDEF:0:9}" = "_restgpr_" ]; then | ||
53 | OK=1 | ||
54 | fi | ||
55 | if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then | ||
56 | OK=1 | ||
57 | fi | ||
58 | if [ "${UNDEF:0:9}" = "_savegpr_" ]; then | ||
59 | OK=1 | ||
60 | fi | ||
61 | if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then | ||
62 | OK=1 | ||
63 | fi | ||
64 | |||
51 | if [ $OK -eq 0 ]; then | 65 | if [ $OK -eq 0 ]; then |
52 | ERROR=1 | 66 | ERROR=1 |
53 | echo "Error: External symbol '$UNDEF' referenced" \ | 67 | echo "Error: External symbol '$UNDEF' referenced" \ |