Skip to content

Commit

Permalink
sh: Fixup __cmpxchg() compile breakage with gcc4.
Browse files Browse the repository at this point in the history
As reported by Manuel:

When I build linux with GCC-4.x and enable
CONFIG_CC_OPTIMIZE_FOR_SIZE linking fails with this error:

  LD      .tmp_vmlinux1
  kernel/built-in.o: In function '__cmpxchg_called_with_bad_pointer'
  make[1]: *** [.tmp_vmlinux1] Error 1
  make: *** [_all] Error 2

This ended up being an inlining problem, fixed by explicitly
including linux/compiler.h and grabbing the definitions from there.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Mar 28, 2007
1 parent 9c5b406 commit 310f796
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/asm-sh/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

#include <linux/irqflags.h>
#include <linux/compiler.h>
#include <asm/types.h>

/*
Expand Down

0 comments on commit 310f796

Please sign in to comment.