Setup -fno-pic or -fpic in Architecture Rules.
EFI boot needs -fpic but all boot code was built with -fno-pic. This is now set accordingly in HAIKU_BOOT_CCFLAGS and HAIKU_BOOT_C++FLAGS. Also setup compile flags for EFI platform.
This commit is contained in:
committed by
Jessica Hamilton
parent
211483cb51
commit
bd0604764e
@@ -420,6 +420,9 @@ rule KernelArchitectureSetup architecture
|
|||||||
HAIKU_BOOT_C++FLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar -mno-red-zone
|
HAIKU_BOOT_C++FLAGS += -fpic -fno-stack-protector -fPIC -fshort-wchar -mno-red-zone
|
||||||
-maccumulate-outgoing-args -Wno-error=unused-variable ;
|
-maccumulate-outgoing-args -Wno-error=unused-variable ;
|
||||||
HAIKU_BOOT_LDFLAGS = -Bstatic -Bsymbolic -shared -nostdlib -znocombreloc -nostartfiles ;
|
HAIKU_BOOT_LDFLAGS = -Bstatic -Bsymbolic -shared -nostdlib -znocombreloc -nostartfiles ;
|
||||||
|
} else {
|
||||||
|
HAIKU_BOOT_CCFLAGS += -fno-pic ;
|
||||||
|
HAIKU_BOOT_C++FLAGS += -fno-pic ;
|
||||||
}
|
}
|
||||||
|
|
||||||
# warning flags
|
# warning flags
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ BootMergeObject boot_libroot.o :
|
|||||||
strrchr.c
|
strrchr.c
|
||||||
strtol.c
|
strtol.c
|
||||||
$(extraSources)
|
$(extraSources)
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
AddResources haiku_loader : boot_loader.rdef ;
|
AddResources haiku_loader : boot_loader.rdef ;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ BootMergeObject boot_arch_$(TARGET_KERNEL_ARCH).o :
|
|||||||
$(kernelDebugSources)
|
$(kernelDebugSources)
|
||||||
|
|
||||||
$(librootArchObjects)
|
$(librootArchObjects)
|
||||||
: -fno-pic
|
:
|
||||||
:
|
:
|
||||||
$(kernelLibArchObjects)
|
$(kernelLibArchObjects)
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -16,24 +16,24 @@ local kernelLibArchObjects =
|
|||||||
BootMergeObject boot_arch_$(TARGET_KERNEL_ARCH).o :
|
BootMergeObject boot_arch_$(TARGET_KERNEL_ARCH).o :
|
||||||
arch_elf.cpp
|
arch_elf.cpp
|
||||||
$(librootArchObjects)
|
$(librootArchObjects)
|
||||||
: -fno-pic
|
:
|
||||||
:
|
:
|
||||||
$(kernelLibArchObjects)
|
$(kernelLibArchObjects)
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_arch_m68k_030.o :
|
BootMergeObject boot_arch_m68k_030.o :
|
||||||
mmu_030.cpp
|
mmu_030.cpp
|
||||||
: -fno-pic -Wno-unused -mcpu=68030
|
: -Wno-unused -mcpu=68030
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_arch_m68k_040.o :
|
BootMergeObject boot_arch_m68k_040.o :
|
||||||
mmu_040.cpp
|
mmu_040.cpp
|
||||||
: -fno-pic -Wno-unused -mcpu=68040 -Wa,-m68040
|
: -Wno-unused -mcpu=68040 -Wa,-m68040
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_arch_m68k_060.o :
|
BootMergeObject boot_arch_m68k_060.o :
|
||||||
mmu_060.cpp
|
mmu_060.cpp
|
||||||
: -fno-pic -Wno-unused -mcpu=68060
|
: -Wno-unused -mcpu=68060
|
||||||
;
|
;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles arch_elf.cpp ]
|
SEARCH on [ FGristFiles arch_elf.cpp ]
|
||||||
|
|||||||
@@ -90,8 +90,6 @@ BootStaticLibrary boot_loader :
|
|||||||
|
|
||||||
DataIO.cpp
|
DataIO.cpp
|
||||||
Referenceable.cpp
|
Referenceable.cpp
|
||||||
|
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
# The partition support is built in an extra static library
|
# The partition support is built in an extra static library
|
||||||
@@ -110,7 +108,6 @@ BootStaticLibrary boot_partitions :
|
|||||||
intel.cpp
|
intel.cpp
|
||||||
PartitionMap.cpp
|
PartitionMap.cpp
|
||||||
PartitionMapParser.cpp
|
PartitionMapParser.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
# Tell Jam where to find the utility sources
|
# Tell Jam where to find the utility sources
|
||||||
|
|||||||
@@ -13,5 +13,4 @@ BootStaticLibrary boot_amiga_ffs :
|
|||||||
Volume.cpp
|
Volume.cpp
|
||||||
Directory.cpp
|
Directory.cpp
|
||||||
File.cpp
|
File.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ BootStaticLibrary boot_bfs :
|
|||||||
Stream.cpp
|
Stream.cpp
|
||||||
BPlusTree.cpp
|
BPlusTree.cpp
|
||||||
QueryParserUtils.cpp
|
QueryParserUtils.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles BPlusTree.cpp ]
|
SEARCH on [ FGristFiles BPlusTree.cpp ]
|
||||||
|
|||||||
@@ -20,5 +20,4 @@ BootStaticLibrary boot_fatfs :
|
|||||||
Directory.cpp
|
Directory.cpp
|
||||||
File.cpp
|
File.cpp
|
||||||
Stream.cpp
|
Stream.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -8,5 +8,4 @@ SubDirC++Flags -fno-rtti ;
|
|||||||
|
|
||||||
BootStaticLibrary boot_hfs_plus :
|
BootStaticLibrary boot_hfs_plus :
|
||||||
hfs_plus.cpp
|
hfs_plus.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ BootStaticLibrary boot_packagefs :
|
|||||||
# support kit
|
# support kit
|
||||||
CompressionAlgorithm.cpp
|
CompressionAlgorithm.cpp
|
||||||
ZlibCompressionAlgorithm.cpp
|
ZlibCompressionAlgorithm.cpp
|
||||||
|
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
Includes [ FGristFiles ZlibCompressionAlgorithm.cpp ]
|
Includes [ FGristFiles ZlibCompressionAlgorithm.cpp ]
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ Depends [ FGristFiles $(zlibSources) ]
|
|||||||
|
|
||||||
BootStaticLibrary boot_zlib :
|
BootStaticLibrary boot_zlib :
|
||||||
$(zlibSources)
|
$(zlibSources)
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
@@ -41,5 +40,4 @@ Includes [ FGristFiles tarfs.cpp ] : [ BuildFeatureAttribute zlib : sources ] ;
|
|||||||
|
|
||||||
BootStaticLibrary boot_tarfs :
|
BootStaticLibrary boot_tarfs :
|
||||||
tarfs.cpp
|
tarfs.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -23,6 +23,4 @@ BootStaticLibrary boot_net :
|
|||||||
UDP.cpp
|
UDP.cpp
|
||||||
$(tcp)
|
$(tcp)
|
||||||
$(iscsi)
|
$(iscsi)
|
||||||
|
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ BootMergeObject boot_platform_amiga_m68k_other.o :
|
|||||||
#decode_edid.c
|
#decode_edid.c
|
||||||
#dump_edid.c
|
#dump_edid.c
|
||||||
|
|
||||||
: -fno-pic #-Wa,--pcrel
|
: #-Wa,--pcrel
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ BootMergeObject boot_platform_atari_m68k_other.o :
|
|||||||
#decode_edid.c
|
#decode_edid.c
|
||||||
#dump_edid.c
|
#dump_edid.c
|
||||||
|
|
||||||
: -fno-pic #-Wa,--pcrel
|
: #-Wa,--pcrel
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ BootMergeObject boot_platform_bios_ia32.o :
|
|||||||
decode_edid.c
|
decode_edid.c
|
||||||
dump_edid.c
|
dump_edid.c
|
||||||
|
|
||||||
: -fno-pic
|
:
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ BootStaticLibrary boot_platform_generic :
|
|||||||
text_menu.cpp
|
text_menu.cpp
|
||||||
video_blit.cpp
|
video_blit.cpp
|
||||||
video_splash.cpp
|
video_splash.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
Includes [ FGristFiles video_splash.cpp ]
|
Includes [ FGristFiles video_splash.cpp ]
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ BootMergeObject boot_platform_pxe_ia32.o :
|
|||||||
$(bios_ia32_src)
|
$(bios_ia32_src)
|
||||||
$(bios_ia32_edid_src)
|
$(bios_ia32_edid_src)
|
||||||
|
|
||||||
: -fno-pic
|
:
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ BootMergeObject boot_platform_raspberrypi_arm.o :
|
|||||||
arch_framebuffer_bcm2835.cpp
|
arch_framebuffer_bcm2835.cpp
|
||||||
|
|
||||||
$(genericPlatformSources)
|
$(genericPlatformSources)
|
||||||
: -fno-pic
|
:
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ BootMergeObject boot_platform_u-boot_common.o :
|
|||||||
$(libFDTSources)
|
$(libFDTSources)
|
||||||
|
|
||||||
|
|
||||||
: -fno-pic
|
:
|
||||||
: boot_platform_generic.a
|
: boot_platform_generic.a
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ BootMergeObject boot_platform_u-boot_arm.o :
|
|||||||
shell.S
|
shell.S
|
||||||
|
|
||||||
arch_mailbox.cpp
|
arch_mailbox.cpp
|
||||||
: -fno-pic
|
|
||||||
;
|
;
|
||||||
|
|
||||||
#SEARCH on [ FGristFiles arch_cpu_asm.S ]
|
#SEARCH on [ FGristFiles arch_cpu_asm.S ]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ SubDirC++Flags -fno-rtti ;
|
|||||||
|
|
||||||
BootMergeObject boot_platform_u-boot_ppc_amcc440.o :
|
BootMergeObject boot_platform_u-boot_ppc_amcc440.o :
|
||||||
arch_mmu_amcc440.cpp
|
arch_mmu_amcc440.cpp
|
||||||
: -fno-pic -mcpu=440
|
: -mcpu=440
|
||||||
;
|
;
|
||||||
|
|
||||||
BootMergeObject boot_platform_u-boot_ppc.o :
|
BootMergeObject boot_platform_u-boot_ppc.o :
|
||||||
@@ -24,7 +24,7 @@ BootMergeObject boot_platform_u-boot_ppc.o :
|
|||||||
arch_start_kernel.S
|
arch_start_kernel.S
|
||||||
arch_cpu.cpp
|
arch_cpu.cpp
|
||||||
#mmu.cpp
|
#mmu.cpp
|
||||||
: -fno-pic
|
:
|
||||||
: boot_platform_u-boot_ppc_amcc440.o
|
: boot_platform_u-boot_ppc_amcc440.o
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user