configure & build: make use of 64-bit libgcc and libsupc++ for EFI/x86_64
Change-Id: I7636530d927843d155b9d7dada2db4f67c875290 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5139 Reviewed-by: Adrien Destugues <[email protected]> Reviewed-by: waddlesplash <[email protected]> Reviewed-by: Jérôme Duval <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -626,6 +626,8 @@ for var in $(archDependentBuildVars)_$(TARGET_PACKAGING_ARCHS) {
|
|||||||
|
|
||||||
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
|
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
|
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
|
TARGET_BOOT_32_LIBGCC = $(HAIKU_BOOT_32_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
|
TARGET_BOOT_32_LIBSUPC++ = $(HAIKU_BOOT_32_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
|
|
||||||
TARGET_KERNEL_PLATFORM ?= $(HAIKU_KERNEL_PLATFORM) ;
|
TARGET_KERNEL_PLATFORM ?= $(HAIKU_KERNEL_PLATFORM) ;
|
||||||
|
|
||||||
|
|||||||
@@ -121,9 +121,13 @@ rule TargetBootLibsupc++ asPath
|
|||||||
|
|
||||||
if $(TARGET_PLATFORM) = haiku {
|
if $(TARGET_PLATFORM) = haiku {
|
||||||
if $(TARGET_PACKAGING_ARCH) = x86_64 {
|
if $(TARGET_PACKAGING_ARCH) = x86_64 {
|
||||||
# we need to use the 32-bit libsupc++.a built by the cross-compiler
|
if $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
return $(TARGET_BOOT_LIBSUPC++) ;
|
# we need to use the 64-bit libsupc++.a built by the cross-compiler
|
||||||
|
return $(TARGET_BOOT_LIBSUPC++) ;
|
||||||
|
} else {
|
||||||
|
# we need to use the 32-bit libsupc++.a built by the cross-compiler
|
||||||
|
return $(TARGET_BOOT_32_LIBSUPC++) ;
|
||||||
|
}
|
||||||
# TODO: ideally, we would build this as part of gcc_syslibs_devel,
|
# TODO: ideally, we would build this as part of gcc_syslibs_devel,
|
||||||
# but that isn't currently possible, as that would require
|
# but that isn't currently possible, as that would require
|
||||||
# 32-bit support (libraries and glue-code) on x86_64-Haiku.
|
# 32-bit support (libraries and glue-code) on x86_64-Haiku.
|
||||||
@@ -239,9 +243,13 @@ rule TargetBootLibgcc architecture : asPath
|
|||||||
|
|
||||||
if $(TARGET_PLATFORM) = haiku {
|
if $(TARGET_PLATFORM) = haiku {
|
||||||
if $(architecture) = x86_64 {
|
if $(architecture) = x86_64 {
|
||||||
# we need to use the 32-bit libgcc.a built by the cross-compiler
|
if $(TARGET_BOOT_PLATFORM) = efi {
|
||||||
return $(TARGET_BOOT_LIBGCC) ;
|
# we need to use the 64-bit libgcc.a built by the cross-compiler
|
||||||
|
return $(TARGET_BOOT_LIBGCC) ;
|
||||||
|
} else {
|
||||||
|
# we need to use the 32-bit libgcc.a built by the cross-compiler
|
||||||
|
return $(TARGET_BOOT_32_LIBGCC) ;
|
||||||
|
}
|
||||||
# TODO: ideally, we would build this as part of gcc_syslibs_devel,
|
# TODO: ideally, we would build this as part of gcc_syslibs_devel,
|
||||||
# but that isn't currently possible, as that would require
|
# but that isn't currently possible, as that would require
|
||||||
# 32-bit support (libraries and glue-code) on x86_64-Haiku.
|
# 32-bit support (libraries and glue-code) on x86_64-Haiku.
|
||||||
|
|||||||
@@ -314,18 +314,24 @@ standard_gcc_settings()
|
|||||||
local bootLibgcc
|
local bootLibgcc
|
||||||
local bootLibSupCxx
|
local bootLibSupCxx
|
||||||
local bootCxxHeaders
|
local bootCxxHeaders
|
||||||
|
local boot32Libgcc
|
||||||
|
local boot32LibSupCxx
|
||||||
|
local boot32CxxHeaders
|
||||||
case $gccMachine in
|
case $gccMachine in
|
||||||
x86_64-*)
|
x86_64-*)
|
||||||
# Boot loader is 32-bit, need the 32-bit libs and c++ config
|
# Boot loader is 32-bit, need the 32-bit libs and c++ config
|
||||||
bootLibgcc=`$gcc -m32 -print-file-name=libgcc.a`
|
boot32Libgcc=`$gcc -m32 -print-file-name=libgcc.a`
|
||||||
bootLibSupCxx=`$gcc -m32 -print-file-name=libsupc++.a`
|
boot32LibSupCxx=`$gcc -m32 -print-file-name=libsupc++.a`
|
||||||
|
bootLibgcc=`$gcc -print-file-name=libgcc.a`
|
||||||
|
bootLibSupCxx=`$gcc -print-file-name=libsupc++.a`
|
||||||
|
|
||||||
local headersBase=$gccdir/../../../..
|
local headersBase=$gccdir/../../../..
|
||||||
local headers=$headersBase/$gccMachine/include/c++/$gccRawVersion
|
local headers=$headersBase/$gccMachine/include/c++/$gccRawVersion
|
||||||
if [ ! -d $headers ]; then
|
if [ ! -d $headers ]; then
|
||||||
headers=$headersBase/include/c++/$gccRawVersion
|
headers=$headersBase/include/c++/$gccRawVersion
|
||||||
fi
|
fi
|
||||||
bootCxxHeaders="$headers/$gccMachine/32"
|
boot32CxxHeaders="$headers/$gccMachine/32"
|
||||||
|
bootCxxHeaders="$headers/$gccMachine"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -355,6 +361,9 @@ standard_gcc_settings()
|
|||||||
set_variable HAIKU_BOOT_CXX_HEADERS_DIR_$targetArch "$bootCxxHeaders"
|
set_variable HAIKU_BOOT_CXX_HEADERS_DIR_$targetArch "$bootCxxHeaders"
|
||||||
set_variable HAIKU_BOOT_LIBSUPCXX_$targetArch "$bootLibSupCxx"
|
set_variable HAIKU_BOOT_LIBSUPCXX_$targetArch "$bootLibSupCxx"
|
||||||
set_variable HAIKU_BOOT_LIBGCC_$targetArch $bootLibgcc
|
set_variable HAIKU_BOOT_LIBGCC_$targetArch $bootLibgcc
|
||||||
|
set_variable HAIKU_BOOT_32_CXX_HEADERS_DIR_$targetArch "$boot32CxxHeaders"
|
||||||
|
set_variable HAIKU_BOOT_32_LIBSUPCXX_$targetArch "$boot32LibSupCxx"
|
||||||
|
set_variable HAIKU_BOOT_32_LIBGCC_$targetArch $boot32Libgcc
|
||||||
set_variable HAIKU_USE_GCC_GRAPHITE_$targetArch $useGraphite
|
set_variable HAIKU_USE_GCC_GRAPHITE_$targetArch $useGraphite
|
||||||
|
|
||||||
standard_gcc_settings_targetArch=$targetArch
|
standard_gcc_settings_targetArch=$targetArch
|
||||||
@@ -1132,6 +1141,8 @@ for targetArch in $HAIKU_PACKAGING_ARCHS; do
|
|||||||
HAIKU_GCC_LIB_DIR HAIKU_GCC_LIB_DIR
|
HAIKU_GCC_LIB_DIR HAIKU_GCC_LIB_DIR
|
||||||
HAIKU_BOOT_LIBGCC HAIKU_BOOT_LIBGCC
|
HAIKU_BOOT_LIBGCC HAIKU_BOOT_LIBGCC
|
||||||
HAIKU_BOOT_LIBSUPC++ HAIKU_BOOT_LIBSUPCXX
|
HAIKU_BOOT_LIBSUPC++ HAIKU_BOOT_LIBSUPCXX
|
||||||
|
HAIKU_BOOT_32_LIBGCC HAIKU_BOOT_32_LIBGCC
|
||||||
|
HAIKU_BOOT_32_LIBSUPC++ HAIKU_BOOT_32_LIBSUPCXX
|
||||||
HAIKU_AR HAIKU_AR
|
HAIKU_AR HAIKU_AR
|
||||||
HAIKU_LD HAIKU_LD
|
HAIKU_LD HAIKU_LD
|
||||||
HAIKU_OBJCOPY HAIKU_OBJCOPY
|
HAIKU_OBJCOPY HAIKU_OBJCOPY
|
||||||
@@ -1157,6 +1168,7 @@ for targetArch in $HAIKU_PACKAGING_ARCHS; do
|
|||||||
# lines so that jam doesn't hit the maximum line length.
|
# lines so that jam doesn't hit the maximum line length.
|
||||||
variables="
|
variables="
|
||||||
HAIKU_BOOT_C++_HEADERS_DIR HAIKU_BOOT_CXX_HEADERS_DIR
|
HAIKU_BOOT_C++_HEADERS_DIR HAIKU_BOOT_CXX_HEADERS_DIR
|
||||||
|
HAIKU_BOOT_32_C++_HEADERS_DIR HAIKU_BOOT_32_CXX_HEADERS_DIR
|
||||||
"
|
"
|
||||||
set -- $variables
|
set -- $variables
|
||||||
while [ $# -ge 2 ]; do
|
while [ $# -ge 2 ]; do
|
||||||
|
|||||||
Reference in New Issue
Block a user