Thiemo Seufer wrote:
>David Daney wrote:
>> *** kernel/Makefile 2 Dec 2004 19:50:05 -0000 1.2
>> --- kernel/Makefile 3 Dec 2004 03:00:44 -0000
>> *************** obj-y += branch.o cpu-probe.o irq.o pro
>> *** 18,23 ****
>> --- 18,27 ----
>> traps.o ptrace.o reset.o semaphore.o setup.o syscall.o \
>> sysmips.o ipc.o scall_o32.o time.o unaligned.o
>> + check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null >
>> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
>> + syscall.o signal.o : override CFLAGS += $(call check_gcc,
>What difference does this cause?
It causes -fno-unit-at-a-time to be added to CFLAGS when compiling
syscall.c and signal.c. All other files are compiled with the "normal" CFLAGS.
-fno-unit-at-a-time prevents GCC from rearranging things in its output thus
the save_static_function() from being separated from its companion. As far as
I could tell
only syscall.c and signal.c need this.
One small issue is that these two files now seem to get recompiled with each
make invocation. But that is better than being miscompiled.
I am not sure if check_gcc is inherited from the higher level makefile so I put
it in this one
as well. If you think it is a good approach I will try to simplify the patch a
>> --- 77,84 ----
>> * Atomically swap in the new signal mask, and wait for a signal.
>> ! __attribute_used__ static int
>> ! _sys_sigsuspend(struct pt_regs regs)
>These should also use "noinline", like 2.6.
noinline was not defined for me :( so I removed it. It seems that in 2.6 it is
just #defined to be nothing. The alternative is to add:
to compiler.h as is done in 2.6