Introduce stage0 into the bootstrap process.
* This stage builds the gcc packages to get the shared syslibs, which only requires the Haiku glue code. * Add separate declaration section for stage0 packages to HaikuPortsCross repository files. * For the bootstrap_stage0 platform, fall back to the gcc headers provided by the cross-compiler.
This commit is contained in:
parent
2e477cf688
commit
e29a6c4cd4
@ -421,10 +421,11 @@ EOF
|
||||
|
||||
|
||||
rule BootstrapPackageRepository repository : architecture
|
||||
: anyPackages : packagesStage1 : packagesStage2 : sourcePackages
|
||||
: debugInfoPackages
|
||||
: anyPackages : packagesStage0 : packagesStage1 : packagesStage2
|
||||
: sourcePackages : debugInfoPackages
|
||||
{
|
||||
repository = $(repository:G=repository) ;
|
||||
packagesStage0 = [ FFilterByBuildFeatures $(packagesStage0) ] ;
|
||||
packagesStage1 = [ FFilterByBuildFeatures $(packagesStage1) ] ;
|
||||
packagesStage2 = [ FFilterByBuildFeatures $(packagesStage2) ] ;
|
||||
sourcePackages = [ FFilterByBuildFeatures $(sourcePackages) ] ;
|
||||
@ -435,6 +436,18 @@ rule BootstrapPackageRepository repository : architecture
|
||||
SetRepositoryMethod $(repository) : FetchPackage
|
||||
: BootstrapRepositoryFetchPackage ;
|
||||
|
||||
# register repository with stage 0 packages
|
||||
local stage0PackageTargets = [ PackageRepository $(repository)
|
||||
: $(architecture) : $(anyPackages) : $(packagesStage0)
|
||||
: $(sourcePackages) : $(debugInfoPackages) ] ;
|
||||
if ! $(stage0PackageTargets) {
|
||||
return ;
|
||||
}
|
||||
local crossDevelPackageSuffixes = $(architecture)
|
||||
$(architecture)_$(HAIKU_PACKAGING_ARCHS[2-]) ;
|
||||
HAIKU_REPOSITORY_HAIKU_CROSS_DEVEL_PACKAGES on $(stage0PackageTargets)
|
||||
= haiku_cross_devel_sysroot_stage0_$(crossDevelPackageSuffixes).hpkg ;
|
||||
|
||||
# register repository with stage 1 packages
|
||||
local stage1PackageTargets = [ PackageRepository $(repository)
|
||||
: $(architecture) : $(anyPackages) : $(packagesStage1)
|
||||
@ -442,8 +455,6 @@ rule BootstrapPackageRepository repository : architecture
|
||||
if ! $(stage1PackageTargets) {
|
||||
return ;
|
||||
}
|
||||
local crossDevelPackageSuffixes = $(architecture)
|
||||
$(architecture)_$(HAIKU_PACKAGING_ARCHS[2-]) ;
|
||||
HAIKU_REPOSITORY_HAIKU_CROSS_DEVEL_PACKAGES on $(stage1PackageTargets)
|
||||
= haiku_cross_devel_sysroot_stage1_$(crossDevelPackageSuffixes).hpkg ;
|
||||
|
||||
|
@ -310,6 +310,8 @@ rule C++HeaderDirectories architecture
|
||||
local c++HeaderDirs ;
|
||||
if $(architecture) = x86_gcc2 {
|
||||
c++HeaderDirs = [ FDirName $(HAIKU_TOP) headers cpp ] ;
|
||||
} else if $(PLATFORM) = bootstrap_stage0 {
|
||||
# Currently, no c++-headers are needed for stage0 of the boostrap.
|
||||
} else {
|
||||
local baseDir = [
|
||||
BuildFeatureAttribute gcc_syslibs_devel : c++-headers : path
|
||||
@ -336,6 +338,11 @@ rule GccHeaderDirectories architecture
|
||||
local gccHeaderDirs ;
|
||||
if $(architecture) = x86_gcc2 {
|
||||
gccHeaderDirs = [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ;
|
||||
} else if $(PLATFORM) = bootstrap_stage0 {
|
||||
gccHeaderDirs =
|
||||
[ FDirName $(HAIKU_GCC_LIB_DIR_$(architecture)) include ]
|
||||
[ FDirName $(HAIKU_GCC_LIB_DIR_$(architecture)) include-fixed ]
|
||||
;
|
||||
} else {
|
||||
local baseDir = [
|
||||
BuildFeatureAttribute gcc_syslibs_devel : gcc-headers : path
|
||||
|
@ -20,7 +20,7 @@ local additionalLibraries
|
||||
= [ MultiArchDefaultGristFiles libbe.so libnetwork.so libpackage.so ] ;
|
||||
|
||||
local stage ;
|
||||
for stage in _stage1 "" {
|
||||
for stage in _stage0 _stage1 "" {
|
||||
# first create the actual cross development package
|
||||
|
||||
local haikuCrossDevelSysrootPackage
|
||||
@ -29,38 +29,54 @@ for stage in _stage1 "" {
|
||||
|
||||
local developCrossLibDirTokens = develop lib $(architectureSubDir) ;
|
||||
|
||||
# glue code
|
||||
AddFilesToPackage $(developCrossLibDirTokens) :
|
||||
<src!system!glue!arch!$(TARGET_ARCH)!$(architecture)>crti.o
|
||||
<src!system!glue!arch!$(TARGET_ARCH)!$(architecture)>crtn.o
|
||||
<src!system!glue!$(architecture)>init_term_dyn.o
|
||||
<src!system!glue!$(architecture)>start_dyn.o
|
||||
<src!system!glue!$(architecture)>haiku_version_glue.o
|
||||
;
|
||||
if $(stage) = _stage0 {
|
||||
# glue code
|
||||
AddFilesToPackage $(developCrossLibDirTokens) :
|
||||
<bootstrap!src!system!glue!arch!$(TARGET_ARCH)!$(architecture)>crti.o
|
||||
<bootstrap!src!system!glue!arch!$(TARGET_ARCH)!$(architecture)>crtn.o
|
||||
<bootstrap!src!system!glue!$(architecture)>init_term_dyn.o
|
||||
<bootstrap!src!system!glue!$(architecture)>start_dyn.o
|
||||
<bootstrap!src!system!glue!$(architecture)>haiku_version_glue.o
|
||||
;
|
||||
|
||||
# kernel
|
||||
if $(isPrimaryArchitecture) {
|
||||
AddFilesToPackage $(developCrossLibDirTokens) : kernel.so : _KERNEL_ ;
|
||||
# libraries
|
||||
AddLibrariesToPackage $(developCrossLibDirTokens) :
|
||||
[ MultiArchDefaultGristFiles libroot.so : stubbed ]
|
||||
;
|
||||
} else {
|
||||
# glue code
|
||||
AddFilesToPackage $(developCrossLibDirTokens) :
|
||||
<src!system!glue!arch!$(TARGET_ARCH)!$(architecture)>crti.o
|
||||
<src!system!glue!arch!$(TARGET_ARCH)!$(architecture)>crtn.o
|
||||
<src!system!glue!$(architecture)>init_term_dyn.o
|
||||
<src!system!glue!$(architecture)>start_dyn.o
|
||||
<src!system!glue!$(architecture)>haiku_version_glue.o
|
||||
;
|
||||
|
||||
# kernel
|
||||
if $(isPrimaryArchitecture) {
|
||||
AddFilesToPackage $(developCrossLibDirTokens) : kernel.so : _KERNEL_ ;
|
||||
}
|
||||
|
||||
# libraries
|
||||
AddLibrariesToPackage $(developCrossLibDirTokens) :
|
||||
[ MultiArchDefaultGristFiles libbsd.so ]
|
||||
[ MultiArchDefaultGristFiles libroot.so : revisioned ]
|
||||
[ MultiArchDefaultGristFiles libnetwork.so ]
|
||||
[ TargetLibstdc++ ]
|
||||
[ TargetLibsupc++ ]
|
||||
$(additionalLibraries$(stage))
|
||||
;
|
||||
|
||||
# static libraries
|
||||
AddFilesToPackage $(developCrossLibDirTokens)
|
||||
: <$(architecture)>liblocalestub.a ;
|
||||
|
||||
# the POSIX error code mapper library
|
||||
AddFilesToPackage $(developCrossLibDirTokens)
|
||||
: [ MultiArchDefaultGristFiles libposix_error_mapper.a ] ;
|
||||
}
|
||||
|
||||
# libraries
|
||||
AddLibrariesToPackage $(developCrossLibDirTokens) :
|
||||
[ MultiArchDefaultGristFiles libbsd.so ]
|
||||
[ MultiArchDefaultGristFiles libroot.so : revisioned ]
|
||||
[ MultiArchDefaultGristFiles libnetwork.so ]
|
||||
[ TargetLibstdc++ ]
|
||||
[ TargetLibsupc++ ]
|
||||
$(additionalLibraries$(stage))
|
||||
;
|
||||
|
||||
# static libraries
|
||||
AddFilesToPackage $(developCrossLibDirTokens)
|
||||
: <$(architecture)>liblocalestub.a ;
|
||||
|
||||
# the POSIX error code mapper library
|
||||
AddFilesToPackage $(developCrossLibDirTokens)
|
||||
: [ MultiArchDefaultGristFiles libposix_error_mapper.a ] ;
|
||||
|
||||
# headers
|
||||
local developCrossHeadersDirTokens = develop headers ;
|
||||
local headerDir ;
|
||||
@ -75,11 +91,13 @@ for stage in _stage1 "" {
|
||||
: [ FDirName $(HAIKU_TOP) headers compatibility $(headerDir) ] ;
|
||||
}
|
||||
|
||||
# cpp headers
|
||||
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 {
|
||||
# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
|
||||
CopyDirectoryToPackage $(developCrossHeadersDirTokens) c++
|
||||
: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
|
||||
if $(stage) != _stage0 {
|
||||
# cpp headers
|
||||
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 {
|
||||
# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
|
||||
CopyDirectoryToPackage $(developCrossHeadersDirTokens) c++
|
||||
: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
|
||||
}
|
||||
}
|
||||
|
||||
BuildHaikuPackage $(haikuCrossDevelSysrootPackage)
|
||||
|
@ -4,6 +4,11 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
# architecture "any" packages
|
||||
haikuporter-0-1
|
||||
:
|
||||
# repository architecture packages (stage 0)
|
||||
gcc_bootstrap-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1
|
||||
:
|
||||
# repository architecture packages (stage 1)
|
||||
autoconf_bootstrap-2.69-2
|
||||
automake_bootstrap-1.13.1-1
|
||||
@ -17,7 +22,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
freetype_bootstrap-2.4.9-1
|
||||
freetype_bootstrap_devel-2.4.9-1
|
||||
gawk_bootstrap-3.1.8-2
|
||||
gcc_bootstrap-4.8.3_2014_05_28-2
|
||||
grep_bootstrap-2.14-1
|
||||
icu_bootstrap-4.8.1.1-1
|
||||
icu_bootstrap_devel-4.8.1.1-1
|
||||
|
@ -4,6 +4,8 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
# architecture "any" packages
|
||||
haikuporter-0-1
|
||||
:
|
||||
# repository architecture packages (stage 0)
|
||||
:
|
||||
# repository architecture packages (stage 1)
|
||||
zlib_bootstrap-1.2.8-2
|
||||
zlib_bootstrap_devel-1.2.8-2
|
||||
|
@ -4,6 +4,11 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
# architecture "any" packages
|
||||
haikuporter-0-1
|
||||
:
|
||||
# repository architecture packages (stage 0)
|
||||
gcc_bootstrap-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1
|
||||
:
|
||||
# repository architecture packages (stage 1)
|
||||
autoconf_bootstrap-2.69-2
|
||||
automake_bootstrap-1.13.1-1
|
||||
@ -12,7 +17,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
flex_bootstrap-2.5.35-1
|
||||
icu_bootstrap-4.8.1.1-1
|
||||
icu_bootstrap_devel-4.8.1.1-1
|
||||
gcc_bootstrap-4.8.3_2014_05_28-2
|
||||
grep_bootstrap-2.14-1
|
||||
freetype_bootstrap-2.4.9-1
|
||||
freetype_bootstrap_devel-2.4.9-1
|
||||
|
@ -4,6 +4,16 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
# architecture "any" packages
|
||||
haikuporter-0-1
|
||||
:
|
||||
# repository architecture packages (stage 0)
|
||||
gcc_bootstrap-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1
|
||||
|
||||
secondary_x86_gcc2 @{
|
||||
gcc_bootstrap_x86_gcc2-2.95.3_2014_08_03-1
|
||||
gcc_bootstrap_x86_gcc2_syslibs_devel-2.95.3_2014_08_03-1
|
||||
}@ # secondary_x86_gcc2
|
||||
:
|
||||
# repository architecture packages (stage 1)
|
||||
autoconf_bootstrap-2.69-2
|
||||
automake_bootstrap-1.13.1-1
|
||||
@ -14,7 +24,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
freetype_bootstrap-2.4.9-1
|
||||
freetype_bootstrap_devel-2.4.9-1
|
||||
gawk_bootstrap-3.1.8-2
|
||||
gcc_bootstrap-4.8.3_2014_05_28-2
|
||||
grep_bootstrap-2.14-1
|
||||
icu_bootstrap-4.8.1.1-1
|
||||
icu_bootstrap_devel-4.8.1.1-1
|
||||
@ -34,7 +43,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
binutils_bootstrap_x86_gcc2-2.17_2013_04_21-3
|
||||
freetype_bootstrap_x86_gcc2-2.4.9-1
|
||||
freetype_bootstrap_x86_gcc2_devel-2.4.9-1
|
||||
gcc_bootstrap_x86_gcc2-2.95.3_2013_08_15-1
|
||||
icu_bootstrap_x86_gcc2-4.8.1.1-1
|
||||
icu_bootstrap_x86_gcc2_devel-4.8.1.1-1
|
||||
ncurses_bootstrap_x86_gcc2-5.9-1
|
||||
|
@ -4,6 +4,11 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
# architecture "any" packages
|
||||
haikuporter-0-1
|
||||
:
|
||||
# repository architecture packages (stage 0)
|
||||
gcc_bootstrap-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1
|
||||
:
|
||||
# repository architecture packages (stage 1)
|
||||
autoconf_bootstrap-2.69-2
|
||||
automake_bootstrap-1.13.1-1
|
||||
@ -16,7 +21,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
freetype_bootstrap-2.4.9-1
|
||||
freetype_bootstrap_devel-2.4.9-1
|
||||
gawk_bootstrap-3.1.8-2
|
||||
gcc_bootstrap-4.8.3_2014_05_28-2
|
||||
grep_bootstrap-2.14-1
|
||||
icu_bootstrap-4.8.1.1-1
|
||||
icu_bootstrap_devel-4.8.1.1-1
|
||||
|
@ -4,6 +4,16 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
# architecture "any" packages
|
||||
haikuporter-0-1
|
||||
:
|
||||
# repository architecture packages (stage 0)
|
||||
gcc_bootstrap-2.95.3_2014_08_03-1
|
||||
gcc_bootstrap_syslibs_devel-2.95.3_2014_08_03-1
|
||||
|
||||
secondary_x86_gcc2 @{
|
||||
gcc_bootstrap_x86-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_x86_syslibs-4.8.3_2014_08_03-1
|
||||
gcc_bootstrap_x86_syslibs_devel-4.8.3_2014_08_03-1
|
||||
}@ # secondary_x86_gcc2
|
||||
:
|
||||
# repository architecture packages (stage 1)
|
||||
autoconf_bootstrap-2.69-2
|
||||
automake_bootstrap-1.13.1-1
|
||||
@ -14,7 +24,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
freetype_bootstrap-2.4.9-1
|
||||
freetype_bootstrap_devel-2.4.9-1
|
||||
gawk_bootstrap-3.1.8-2
|
||||
gcc_bootstrap-2.95.3_2013_08_15-1
|
||||
grep_bootstrap-2.14-1
|
||||
icu_bootstrap-4.8.1.1-1
|
||||
icu_bootstrap_devel-4.8.1.1-1
|
||||
@ -34,7 +43,6 @@ BootstrapPackageRepository HaikuPortsCross
|
||||
binutils_bootstrap_x86-2.23.2_2013_04_09-3
|
||||
freetype_bootstrap_x86-2.4.9-1
|
||||
freetype_bootstrap_x86_devel-2.4.9-1
|
||||
gcc_bootstrap_x86-4.7.3_2013_08_12-1
|
||||
icu_bootstrap_x86-4.8.1.1-1
|
||||
icu_bootstrap_x86_devel-4.8.1.1-1
|
||||
ncurses_bootstrap_x86-5.9-1
|
||||
|
Loading…
Reference in New Issue
Block a user