Removed useless assigning of the default values and use a switch for the

architectures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35015 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-01-11 20:36:24 +00:00
parent c8eb5b0bdf
commit 4eb548a8ae
+18 -22
View File
@@ -304,28 +304,24 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
HAIKU_KERNEL_PIC_LINKFLAGS = ;
if $(HAIKU_ARCH) = ppc {
# Build a position independent PPC kernel. We need to be able to relocate
# the kernel, since the virtual address space layout at boot time is not
# fixed.
HAIKU_KERNEL_PIC_CCFLAGS = -fPIE ;
HAIKU_KERNEL_PIC_LINKFLAGS = -shared -fPIE ;
}
if $(HAIKU_ARCH) = m68k {
# We don't need a PIC kernel as it's always at the same place.
# it's actually needed to not use pic, else linking fails due to too large
# pc refs.
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
HAIKU_KERNEL_PIC_LINKFLAGS = ;
# we don't want to have to handle emulating missing FPU opcodes for 040 and
# 060 in the kernel
HAIKU_KERNEL_CCFLAGS += -m68020-60 ;
HAIKU_KERNEL_C++FLAGS += -m68020-60 ;
}
if $(HAIKU_ARCH) = mipsel {
# TODO: verify correctness of this
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
HAIKU_KERNEL_PIC_LINKFLAGS = ;
switch $(HAIKU_ARCH) {
case ppc :
{
# Build a position independent PPC kernel. We need to be able to
# relocate the kernel, since the virtual address space layout at boot
# time is not fixed.
HAIKU_KERNEL_PIC_CCFLAGS = -fPIE ;
HAIKU_KERNEL_PIC_LINKFLAGS = -shared -fPIE ;
}
case m68k :
{
# We don't want to have to handle emulating missing FPU opcodes for 040
# and 060 in the kernel.
HAIKU_KERNEL_CCFLAGS += -m68020-60 ;
HAIKU_KERNEL_C++FLAGS += -m68020-60 ;
}
}
# If the environment variable HAIKU_INCLUDE_PATENTED_CODE is defined, we