Merge branch 'gcc_syslibs'

* From now on, the gcc-specific system libraries (libgcc, libsupc++ and
  libstdc++) are provided by separate packages built along with gcc:
  - gcc_syslibs contains the shared libraries (libgcc_s.so, libsupc++.so and
    libstdc++.so)
  - gcc_syslibs_devel contains the static libraries and both c++ and gcc
    headers
  The shared libraries now make proper use of symbol versioning and there
  are version-specific symlinks
* The buildsystem has been adjusted to no longer use the libraries and
  headers from the cross-compiler, but use the ones provided by the
  above-mentioned packages. The only exception is that the 32-bit libraries
  required for the bootloader of the x86_64 architecture are still taken
  from the cross-compiler.
This commit is contained in:
Oliver Tappe 2014-08-13 13:37:15 +02:00
commit 87e8603d9f
492 changed files with 7119 additions and 996 deletions

40
Jamfile
View File

@ -8,6 +8,15 @@ local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ;
# Let the target platform depend on the external header directories such
# that those will be unpacked before anything is built for the target
# platform.
Depends $(TARGET_PLATFORM) : [
BuildFeatureAttribute gcc_syslibs_devel : c++-headers
] [
BuildFeatureAttribute gcc_syslibs_devel : gcc-headers
] ;
}
}
@ -21,18 +30,27 @@ AddHaikuImagePackages [ FFilterByBuildFeatures
mesa mesa_devel mesa_swrast sed sharutils tar tiff wget which
}@
] ;
# secondary architectures
local architectureObject ;
for architectureObject
in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
on $(architectureObject) {
AddHaikuImagePackages [ FFilterByBuildFeatures
curl freetype icu libsolv zlib
if $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 {
AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
}
regular_image @{
ffmpeg glu jpeg libpng mesa
}@
] ;
if $(HAIKU_PACKAGING_ARCHS[2]) {
# secondary architectures
local architectureObject ;
for architectureObject
in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
on $(architectureObject) {
AddHaikuImagePackages [ FFilterByBuildFeatures
curl freetype icu libsolv zlib
regular_image @{
ffmpeg glu jpeg libpng mesa
}@
] ;
if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
}
}
}
}

View File

@ -62,6 +62,7 @@ include [ FDirName $(HAIKU_BUILD_RULES_DIR) MiscRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OverriddenJamRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) PackageRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) RepositoryRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) SystemLibraryRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) TestsRules ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildSetup ] ;
include [ FDirName $(HAIKU_BUILD_RULES_DIR) DefaultBuildProfiles ] ;

View File

@ -54,20 +54,11 @@ rule ArchitectureSetup architecture
}
HAIKU_GCC_BASE_FLAGS_$(architecture) = $(gccBaseFlags) ;
# override gcc 2.95.3's header directory -- strictly necessary only when
# using the BeOS native compiler (since its headers are incompatible), but
# it doesn't harm for the cross-compiler either.
if $(gccVersion[1]) = 2 {
HAIKU_GCC_HEADERS_DIR_$(architecture)
= [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ;
}
# initial state for flags etc.
HAIKU_C++_$(architecture) ?= $(HAIKU_CC_$(architecture)) ;
HAIKU_LINK_$(architecture) = $(HAIKU_CC_$(architecture)) ;
HAIKU_LINKFLAGS_$(architecture) = $(gccBaseFlags) ;
HAIKU_HDRS_$(architecture) = [ FStandardHeaders $(architecture) ] ;
HAIKU_CCFLAGS_$(architecture) += $(gccBaseFlags) -nostdinc ;
HAIKU_C++FLAGS_$(architecture) += $(gccBaseFlags) -nostdinc ;
@ -163,61 +154,7 @@ rule ArchitectureSetup architecture
HAIKU_PRIVATE_SYSTEM_HEADERS_$(architecture)
= [ PrivateHeaders $(DOT) system system/arch/$(cpu) ] ;
# Add some grist to the libgcc objects
HAIKU_GCC_LIBGCC_OBJECTS_$(architecture)
= $(HAIKU_GCC_LIBGCC_OBJECTS_$(architecture):G=libgcc!$(architecture)) ;
# List of libgcc objects we don't want to keep
HAIKU_GCC_LIBGCC_OBJECTS_EXCLUDES_$(architecture)
= eabi.o ;
# the C++ standard library
HAIKU_BUILD_SHARED_LIBSTDC++_$(architecture) = ;
if $(HAIKU_SHARED_LIBSTDC++_$(architecture)) {
HAIKU_LIBSTDC++_$(architecture)
= $(HAIKU_SHARED_LIBSTDC++_$(architecture)) ;
} else {
# no shared library available with the compiler -- build it
if $(gccVersion[1]) = 2 {
HAIKU_LIBSTDC++_$(architecture) = libstdc++.r4.so ;
} else {
HAIKU_LIBSTDC++_$(architecture) = <$(architecture)>libstdc++.so ;
}
HAIKU_SHARED_LIBSTDC++_$(architecture)
= $(HAIKU_LIBSTDC++_$(architecture)) ;
HAIKU_BUILD_SHARED_LIBSTDC++_$(architecture) = 1 ;
}
# the C++ support (runtime) library
HAIKU_BUILD_SHARED_LIBSUPC++_$(architecture) = ;
if $(HAIKU_SHARED_LIBSUPC++_$(architecture)) {
HAIKU_LIBSUPC++_$(architecture)
= $(HAIKU_SHARED_LIBSUPC++_$(architecture)) ;
} else {
# no shared library available with the compiler -- build it for gcc 4
if $(gccVersion[1]) != 2 {
HAIKU_SHARED_LIBSUPC++_$(architecture)
= <$(architecture)>libsupc++.so ;
HAIKU_BUILD_SHARED_LIBSUPC++_$(architecture) = 1 ;
}
HAIKU_LIBSUPC++_$(architecture)
= $(HAIKU_SHARED_LIBSUPC++_$(architecture)) ;
}
# library and executable glue code
local crtBegin ;
local crtEnd ;
# TODO: use crtbeginS.o and crtendS.o unconditionally once we have
# switched to new compiler packages
if [ Glob $(HAIKU_GCC_LIB_DIR_$(architecture)) : crtbeginS.o ] {
crtBegin = <$(architecture)>crtbeginS.o ;
crtEnd = <$(architecture)>crtendS.o ;
} else {
crtBegin = <$(architecture)>crtbegin.o ;
crtEnd = <$(architecture)>crtend.o ;
}
local commonGlueCode =
<src!system!glue!$(architecture)>init_term_dyn.o
<src!system!glue!arch!$(HAIKU_ARCH)!$(architecture)>crti.o
@ -225,23 +162,24 @@ rule ArchitectureSetup architecture
;
HAIKU_LIBRARY_BEGIN_GLUE_CODE_$(architecture) =
<src!system!glue!arch!$(HAIKU_ARCH)!$(architecture)>crti.o
$(crtBegin)
<$(architecture)>crtbeginS.o
<src!system!glue!$(architecture)>init_term_dyn.o
;
HAIKU_LIBRARY_END_GLUE_CODE_$(architecture) =
$(crtEnd)
<$(architecture)>crtendS.o
<src!system!glue!arch!$(HAIKU_ARCH)!$(architecture)>crtn.o
;
HAIKU_EXECUTABLE_BEGIN_GLUE_CODE_$(architecture) =
<src!system!glue!arch!$(HAIKU_ARCH)!$(architecture)>crti.o
$(crtBegin)
<$(architecture)>crtbeginS.o
<src!system!glue!$(architecture)>start_dyn.o
<src!system!glue!$(architecture)>init_term_dyn.o
;
HAIKU_EXECUTABLE_END_GLUE_CODE_$(architecture)
= $(HAIKU_LIBRARY_END_GLUE_CODE_$(architecture)) ;
SEARCH on $(crtBegin) $(crtEnd) = $(HAIKU_GCC_LIB_DIR_$(architecture)) ;
SEARCH on <$(architecture)>crtbeginS.o <$(architecture)>crtendS.o
= $(HAIKU_GCC_LIB_DIR_$(architecture)) ;
# init library name map
local libraryGrist = "" ;
@ -256,10 +194,6 @@ rule ArchitectureSetup architecture
HAIKU_LIBRARY_NAME_MAP_$(architecture)_$(i)
= $(library:G=$(libraryGrist)) ;
}
HAIKU_LIBRARY_NAME_MAP_$(architecture)_libstdc++
= $(HAIKU_LIBSTDC++_$(architecture)) ;
HAIKU_LIBRARY_NAME_MAP_$(architecture)_libsupc++
= $(HAIKU_LIBSUPC++_$(architecture)) ;
HAIKU_LIBRARY_NAME_MAP_$(architecture)_localestub
= <$(architecture)>liblocalestub.a ;
if $(architecture) = $(HAIKU_PACKAGING_ARCHS[1]) {
@ -483,21 +417,9 @@ rule KernelArchitectureSetup architecture
# compiling (part of) the boot loader.
# kernel add-on glue code
local crtBegin ;
local crtEnd ;
# TODO: use crtbeginS.o and crtendS.o unconditionally once we have
# switched to new compiler packages
if [ Glob $(HAIKU_GCC_LIB_DIR_$(architecture)) : crtbeginS.o ] {
crtBegin = <$(architecture)>crtbeginS.o ;
crtEnd = <$(architecture)>crtendS.o ;
} else {
crtBegin = <$(architecture)>crtbegin.o ;
crtEnd = <$(architecture)>crtend.o ;
}
HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE = $(crtBegin)
HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE = <$(architecture)>crtbeginS.o
<src!system!glue!$(architecture)>haiku_version_glue.o ;
HAIKU_KERNEL_ADDON_END_GLUE_CODE
= $(HAIKU_GCC_LIBGCC_$(architecture)) $(crtEnd) ;
HAIKU_KERNEL_ADDON_END_GLUE_CODE = <$(architecture)>crtendS.o ;
}
@ -783,11 +705,11 @@ rule MultiArchSubDirSetup architectures
# packaging architectures, if <architectures> is empty) an object is
# prepared that can be used for an "on ... { ... }" block to set up subdir
# variables for the respective packaging architecture. Most notably
# TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++, and TARGET_LIBSTDC++
# are set to the values for the respective packaging architecture. The
# per-subdir variables SOURCE_GRIST, LOCATE_TARGET, LOCATE_SOURCE,
# SEARCH_SOURCE, *_LOCATE_TARGET, are reset. All SUBDIR* and config
# variables are set to the values they had when this rule was invoked.
# TARGET_PACKAGING_ARCH, TARGET_ARCH are set to the values for the
# respective packaging architecture. The per-subdir variables SOURCE_GRIST,
# LOCATE_TARGET, LOCATE_SOURCE, SEARCH_SOURCE, *_LOCATE_TARGET, are reset.
# All SUBDIR* and config variables are set to the values they had when this
# rule was invoked.
local result ;
architectures ?= $(TARGET_PACKAGING_ARCHS) ;
@ -805,7 +727,7 @@ rule MultiArchSubDirSetup architectures
TARGET_PACKAGING_ARCH on $(architectureObject) = $(architecture) ;
local var ;
for var in TARGET_ARCH TARGET_LIBSUPC++ TARGET_LIBSTDC++ {
for var in TARGET_ARCH {
$(var) on $(architectureObject) = $($(var)_$(architecture)) ;
}

View File

@ -53,10 +53,12 @@ rule BootLd
# Remove any preset LINKLIBS, but link against libgcc.a. Linking against
# libsupc++ is opt-out.
local libs ;
if ! [ on $(1) return HAIKU_NO_LIBSUPC++ ] {
libs += $(TARGET_BOOT_LIBSUPC++) ;
if ! [ on $(1) return $(HAIKU_NO_LIBSUPC++) ] {
libs += [ TargetBootLibsupc++ true ] ;
Depends $(1) : [ TargetBootLibsupc++ ] ;
}
LINKLIBS on $(1) = $(libs) $(TARGET_BOOT_LIBGCC) ;
LINKLIBS on $(1) = $(libs) [ TargetBootLibgcc true ] ;
Depends $(1) : [ TargetBootLibgcc ] ;
# TODO: Do we really want to invoke SetupBoot here? The objects should
# have been compiled with BootObjects anyway, so we're doing that twice.

View File

@ -5,6 +5,7 @@
local architecture = $(TARGET_PACKAGING_ARCH) ;
local secondaryArchSubDir = [ MultiArchIfPrimary "" : /$(architecture) ] ;
local libDir = lib$(secondaryArchSubDir) ;
local developLibDir = develop/lib$(secondaryArchSubDir) ;
local developHeadersDir = develop/headers$(secondaryArchSubDir) ;
@ -36,9 +37,61 @@ if $(HAIKU_BUILD_FEATURE_SSL) {
}
# gcc_syslibs
if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
if [ IsPackageAvailable gcc_syslibs ] {
ExtractBuildFeatureArchives gcc_syslibs :
file: base gcc_syslibs
libgcc_s.so: $(libDir)/libgcc_s.so
libstdc++.so: $(libDir)/libstdc++.so
libsupc++.so: $(libDir)/libsupc++.so
;
EnableBuildFeatures gcc_syslibs ;
} else {
Echo "gcc_syslibs not available for $(TARGET_PACKAGING_ARCH)" ;
}
}
# gcc_syslibs_devel
if [ IsPackageAvailable gcc_syslibs_devel ] {
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
ExtractBuildFeatureArchives gcc_syslibs_devel :
file: base gcc_syslibs_devel
libgcc.a: $(developLibDir)/libgcc.a
libgcc_eh.a:
libgcc-kernel.a: $(developLibDir)/libgcc.a
libgcc_eh-kernel.a:
libstdc++.a:
libsupc++.a:
libsupc++-kernel.a:
;
} else {
ExtractBuildFeatureArchives gcc_syslibs_devel :
file: base gcc_syslibs_devel
libgcc.a: $(developLibDir)/libgcc.a
libgcc_eh.a: $(developLibDir)/libgcc_eh.a
libgcc-kernel.a: $(developLibDir)/libgcc-kernel.a
libgcc_eh-kernel.a: $(developLibDir)/libgcc_eh.a
libstdc++.a: $(developLibDir)/libstdc++.a
libsupc++.a: $(developLibDir)/libsupc++.a
libsupc++-kernel.a: $(developLibDir)/libsupc++-kernel.a
c++-headers: $(developHeadersDir)/c++
gcc-headers: $(developHeadersDir)/gcc
;
}
EnableBuildFeatures gcc_syslibs_devel ;
} else {
Echo "gcc_syslibs_devel not available for $(TARGET_PACKAGING_ARCH)" ;
}
# ICU
# Note ICU isn't actually optional, but is still an external package
if [ IsPackageAvailable icu_devel ] {
ExtractBuildFeatureArchives icu :
file: base icu

View File

@ -132,9 +132,6 @@ if $(HAIKU_PACKAGING_ARCH) {
# define primary packaging architecture macro
HAIKU_DEFINES = __HAIKU_PRIMARY_PACKAGING_ARCH=\\\"$(HAIKU_PACKAGING_ARCH)\\\" ;
HAIKU_LIBSUPC++ = $(HAIKU_LIBSUPC++_$(HAIKU_PACKAGING_ARCH)) ;
HAIKU_LIBSTDC++ = $(HAIKU_LIBSTDC++_$(HAIKU_PACKAGING_ARCH)) ;
# distro compatibility level defines
HAIKU_DISTRO_COMPATIBILITY ?= "default" ;
@ -655,8 +652,6 @@ local buildVars =
PRIVATE_KERNEL_HEADERS
LIBSTDC++ LIBSUPC++
NETWORK_LIBS NETAPI_LIB SELECT_UNAME_ETC_LIB
EXECUTABLE_MIME_TYPE
@ -680,8 +675,6 @@ local archDependentBuildVars =
PRIVATE_SYSTEM_HEADERS
LIBSTDC++ LIBSUPC++
ARCH_OBJECT_DIR COMMON_DEBUG_OBJECT_DIR
DEBUG_$(HAIKU_DEBUG_LEVELS)_OBJECT_DIR
;
@ -696,17 +689,11 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_$(var) = $(HAIKU_$(var)) ;
}
TARGET_KERNEL_LIBGCC
= $(HAIKU_KERNEL_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
TARGET_KERNEL_LIBSUPC++
= $(HAIKU_KERNEL_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
TARGET_BOOT_LIBGCC
= $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
TARGET_BOOT_LIBSUPC++
= $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
local architecture ;
for architecture in $(TARGET_PACKAGING_ARCHS) {
@ -724,8 +711,6 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_$(var)_$(TARGET_PACKAGING_ARCH) = $(HOST_$(var)) ;
}
TARGET_KERNEL_LIBGCC = ;
TARGET_KERNEL_LIBSUPC++ = ;
TARGET_BOOT_LIBGCC = ;
TARGET_BOOT_LIBSUPC++ = ;
@ -854,6 +839,10 @@ OPTIM ?= -O2 ;
DEBUG ?= 0 ;
# Set a sane default for whether this is a CI build.
HAIKU_CONTINUOUS_INTEGRATION_BUILD ?= 0 ;
# Set the defaults for PLATFORM and SUPPORTED_PLATFORMS. PLATFORM is only
# overridden for targets to be built for the host platform. SUPPORTED_PLATFORMS
# can be overridden by the author of a component.
@ -861,6 +850,18 @@ PLATFORM = $(TARGET_PLATFORM) ;
SUPPORTED_PLATFORMS = haiku ;
# Define two pseudo targets for the target and buildhost platform. The main
# build rules (Cc, C++, As, ...) depend on these pseude targets such that global
# initializations that are required before anything is built for a specific
# platform can be forced by depending the pseudo target for the platform on the
# initializations.
# This is currently used to unpack the external headers from the
# gcc_syslibs_devel build feature before anything is built for the target
# platform.
NotFile $(TARGET_PLATFORM) ;
NotFile host ;
# Instructs the Library rule to not make its object files temporary.
# This is needed as some objects are used in a static library and for an
# executable.

View File

@ -128,6 +128,7 @@ rule PrepareSubDirConfigVariables
: __inherited_config__ ] ;
on [ ConfigObject $(parentDir) : __inherited_config__ ] {
local var ;
for var in $(AUTO_SET_UP_CONFIG_VARIABLES) {
$(var) on $(config) ?= $($(var)) ;
$(var) on $(inheritedConfig) ?= $($(var)) ;
@ -147,6 +148,7 @@ rule PrepareConfigVariables
local rootConfig = [ ConfigObject ] ; # the root config object
local inheritedRootConfig = [ ConfigObject : __inherited_config__ ] ;
local var ;
for var in $(AUTO_SET_UP_CONFIG_VARIABLES) {
$(var) on $(rootConfig) = $($(var)) ;
$(var) on $(inheritedRootConfig) = $($(var)) ;

View File

@ -4,6 +4,10 @@ switch $(HAIKU_BUILD_PROFILE) {
HAIKU_BUILD_TYPE = bootstrap ;
EnableBuildFeatures bootstrap_image ;
# Add a third pseudo target for the platform used when building anything
# for stage0 of the bootstrap process.
NotFile bootstrap_stage0 ;
HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
}

View File

@ -137,7 +137,7 @@ rule PublicHeaders
local list = $(1) ;
local dirs ;
local i ;
for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers os $(i) ] ;
}
@ -154,6 +154,7 @@ rule PrivateHeaders
local list = $(1) ;
local dirs ;
local i ;
for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers private $(i) ] ;
}
@ -170,6 +171,7 @@ rule PrivateBuildHeaders
local list = $(1) ;
local dirs ;
local i ;
for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers build private $(i) ] ;
}
@ -186,6 +188,7 @@ rule LibraryHeaders
local list = $(1) ;
local dirs ;
local i ;
for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers libs $(i) ] ;
}
@ -453,16 +456,11 @@ rule FStandardHeaders architecture
local headers = ;
# The C++ headers. If specified, we use the compiler headers, otherwise
# the ones that come with our libstdc++.
if $(HAIKU_C++_HEADERS_DIR_$(architecture)) {
headers += $(HAIKU_C++_HEADERS_DIR_$(architecture)) ;
} else {
headers += [ FDirName $(HAIKU_TOP) headers cpp ] ;
}
# The c++ headers.
headers += [ C++HeaderDirectories $(architecture) ] ;
# GCC headers
headers += $(HAIKU_GCC_HEADERS_DIR_$(architecture)) ;
# The gcc headers.
headers += [ GccHeaderDirectories $(architecture) ] ;
# Use headers directory, to allow to do things like include <posix/string.h>
headers += [ FDirName $(HAIKU_TOP) headers ] ;

View File

@ -488,6 +488,7 @@ rule AddDriversToContainer container : relativeDirectoryTokens : targets
# get the relative symlink path prefix
local linkPrefix = ;
local i ;
for i in $(relativeDirectoryTokens) {
linkPrefix += .. ;
}

View File

@ -47,10 +47,12 @@ rule KernelLd
# Remove any preset LINKLIBS, but link against libgcc.a. Linking against
# libsupc++ is opt-out.
local libs ;
if ! [ on $(1) return HAIKU_NO_LIBSUPC++ ] {
libs += $(TARGET_KERNEL_LIBSUPC++) ;
if ! [ on $(1) return $(HAIKU_NO_LIBSUPC++) ] {
libs += [ TargetKernelLibsupc++ true ] ;
Depends $(1) : [ TargetKernelLibsupc++ ] ;
}
LINKLIBS on $(1) = $(libs) $(TARGET_KERNEL_LIBGCC) ;
LINKLIBS on $(1) = $(libs) [ TargetKernelLibgcc true ] ;
Depends $(1) : [ TargetKernelLibgcc ] ;
HAIKU_TARGET_IS_EXECUTABLE on $(1) = 1 ;
@ -119,7 +121,8 @@ rule KernelAddon
if $(PLATFORM) = haiku {
kernel = <nogrist>kernel.so ;
beginGlue = $(HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE) ;
endGlue = $(HAIKU_KERNEL_ADDON_END_GLUE_CODE) ;
endGlue
= [ TargetKernelLibgcc ] $(HAIKU_KERNEL_ADDON_END_GLUE_CODE) ;
} else if $(PLATFORM) = haiku_host {
kernel = /boot/develop/lib/x86/kernel.so ;
beginGlue = $(HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE) ;

View File

@ -32,7 +32,8 @@ rule ExtractCatalogEntries target : sources : signature : regexp
localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ;
systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ;
} else {
sysHeaders += $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
$(TARGET_DEFINES) ;
cc = $(TARGET_CC_$(TARGET_PACKAGING_ARCH)) ;

View File

@ -8,7 +8,8 @@ rule AddSharedObjectGlueCode
on $(1) {
platform = $(PLATFORM) ;
if $(platform) = haiku {
local stdLibs = [ MultiArchDefaultGristFiles libroot.so ] ;
local stdLibs = [ MultiArchDefaultGristFiles libroot.so ]
[ TargetLibgcc ] ;
local type = EXECUTABLE ;
if $(2) != true {
type = LIBRARY ;
@ -168,7 +169,7 @@ rule StaticLibraryFromObjects
rule AssembleNasm
{
Depends $(<) : $(>) ;
Depends $(<) : $(>) [ on $(<) return $(PLATFORM) ] ;
}
actions AssembleNasm
@ -274,7 +275,8 @@ rule CreateAsmStructOffsetsHeader header : source
}
} else {
sysHeaders += $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
$(TARGET_DEFINES) ;
}
@ -343,7 +345,7 @@ rule CreateAsmStructOffsetsHeader header : source
# locate object, search for source, and set on target variables
Depends $(header) : $(source) ;
Depends $(header) : $(source) $(PLATFORM) ;
SEARCH on $(source) += $(SEARCH_SOURCE) ;
MakeLocateArch $(header) ;
LocalClean clean : $(header) ;
@ -491,6 +493,8 @@ rule LinkAgainst
local mapLibs = $(3:E=true) ;
on $(target) {
local i ;
# map libraries, if desired and target platform is Haiku
local map = $(TARGET_LIBRARY_NAME_MAP_$(TARGET_PACKAGING_ARCH)) ;
if $(PLATFORM) != host && $(mapLibs) = true && $(map) {
@ -756,3 +760,31 @@ rule BuildPlatformStaticLibraryPIC target : sources : otherObjects
BuildPlatformStaticLibrary $(target) : $(sources) : $(otherObjects) ;
}
rule BootstrapStage0PlatformObjects sources : separateFromStandardSiblings
{
# BootstrapStage0PlatformObjects <sources> : <separateFromStandardSiblings>
# Builds objects from the given sources for stage0 of the bootstrap process.
# <sources> The sources from which objects should be created.
# <separateFromStandardSiblings> Pass 'true' if the same objects are built
# in a different context, too, so that a separate grist and target location
# is required. This defaults to ''.
local source ;
for source in $(sources) {
local objectGrist ;
if $(separateFromStandardSiblings) = true {
objectGrist = "bootstrap!$(SOURCE_GRIST)" ;
} else {
objectGrist = $(SOURCE_GRIST) ;
}
local object = $(source:S=$(SUFOBJ):G=$(objectGrist)) ;
PLATFORM on $(object) = bootstrap_stage0 ;
SUPPORTED_PLATFORMS on $(object) = bootstrap_stage0 ;
if $(separateFromStandardSiblings) = true {
MakeLocate $(object) : [
FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) bootstrap
] ;
}
Object $(object) : $(source) ;
}
}

View File

@ -584,6 +584,7 @@ rule Expr expression
# tokenize the expression
local tokens ;
local string ;
for string in $(expression) {
while $(string) {
local split = [ Match "[ \t]*(-|[()+*]|[0-9]*)(.*)" : $(string) ] ;

View File

@ -108,7 +108,8 @@ rule Object
}
} else {
sysHeaders += $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
$(TARGET_DEFINES) ;
}
@ -210,7 +211,7 @@ rule As
= $(TARGET_SYSTEM_INCLUDES_OPTION_$(TARGET_PACKAGING_ARCH)) ;
}
Depends $(<) : $(>) ;
Depends $(<) : $(>) [ on $(1) return $(PLATFORM) ] ;
ASFLAGS on $(<) += $(flags) $(SUBDIRASFLAGS) ;
ASHDRS on $(<) = [ on $(<) FIncludes $(HDRS) : $(localIncludesOption) ]
$(includesSeparator)
@ -227,7 +228,7 @@ actions As
rule Lex
{
Depends $(1) : $(2) ;
Depends $(1) : $(2) [ on $(1) return $(PLATFORM) ] ;
MakeLocateArch $(1) ;
LocalClean clean : $(1) ;
}
@ -245,7 +246,8 @@ rule Yacc
MakeLocateArch $(source) $(header) ;
Depends $(source) $(header) : $(yaccSource) ;
Depends $(source) $(header)
: $(yaccSource) [ on $(source) return $(PLATFORM) ] ;
Yacc1 $(source) $(header) : $(yaccSource) ;
LocalClean clean : $(source) $(header) ;
@ -263,7 +265,7 @@ actions Yacc1
rule Cc
{
Depends $(<) : $(>) ;
Depends $(<) : $(>) [ on $(1) return $(PLATFORM) ] ;
on $(1) {
local flags ;
@ -341,7 +343,7 @@ actions Cc
rule C++
{
Depends $(<) : $(>) ;
Depends $(<) : $(>) [ on $(1) return $(PLATFORM) ] ;
on $(1) {
local flags ;

View File

@ -184,6 +184,7 @@ rule RemotePackageRepository repository : architecture : repositoryUrl
on $(packageListFile) return $(HAIKU_REPOSITORY_PACKAGE_FILE_NAMES)
] ;
local packageFiles ;
local packageFile ;
for packageFile in $(packageFileNames) {
MakeLocate $(packageFile) : $(HAIKU_DOWNLOAD_DIR) ;
packageFiles += $(packageFile) ;
@ -354,16 +355,8 @@ actions BootstrapRepositoryFetchPackage1
done
fi
# determine the portName
portName=`basename "$package" | sed 's@-.*@@'`
case $portName in
*_devel|*_doc|*_source|*_debuginfo)
portName=`echo $portName | sed 's@_[^_]*$@@'`
;;
*_source_rigged)
portName=`echo $portName | sed 's@_source_rigged$@@'`
;;
esac
# determine the port-specification from the package name
portSpec=`basename "$package" | sed 's@-.*@@'`
cd $(HAIKU_REPOSITORY_BUILD_DIRECTORY)
@ -372,11 +365,11 @@ actions BootstrapRepositoryFetchPackage1
$(HOST_HAIKU_PORTER) -j$(HAIKU_PORTER_CONCURRENT_JOBS) \
$(HAIKU_PORTER_EXTRA_OPTIONS) \
--cross-devel-package "$haikuCrossDevelPackage" \
"$secondaryCrossDevelPackages" $portName
"$secondaryCrossDevelPackages" $portSpec
else
$(HOST_HAIKU_PORTER) -j$(HAIKU_PORTER_CONCURRENT_JOBS) \
$(HAIKU_PORTER_EXTRA_OPTIONS) \
--cross-devel-package "$haikuCrossDevelPackage" $portName
--cross-devel-package "$haikuCrossDevelPackage" $portSpec
fi
}
@ -428,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) ] ;
@ -442,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)
@ -449,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 ;
@ -510,18 +514,31 @@ rule FSplitPackageName packageName
}
rule IsPackageAvailable package : flags
rule IsPackageAvailable packageName : flags
{
# for a secondary architecture adjust the package name
if $(TARGET_PACKAGING_ARCH) != $(TARGET_PACKAGING_ARCHS[1])
&& ! nameResolved in $(flags) {
local splitName = [ FSplitPackageName $(package) ] ;
splitName = $(splitName[1]) $(TARGET_PACKAGING_ARCH) $(splitName[2-]) ;
package = $(splitName:J=_) ;
# The position of the secondary architecture within the package name
# is not well defined, so we scan for it starting from the back.
local packageNameHead = $(packageName) ;
local packageNameTail = ;
while $(packageNameHead) {
local splitName = [ FSplitPackageName $(packageNameHead) ] ;
splitName = $(splitName[1]) $(TARGET_PACKAGING_ARCH) $(splitName[2])
$(packageNameTail) ;
packageName = $(splitName:J=_) ;
if $(packageName) in $(HAIKU_AVAILABLE_PACKAGES) {
return $(packageName) ;
}
local splitHead = [ Match "(.*)_([^_]*)" : $(packageNameHead) ] ;
packageNameHead = $(splitHead[1]) ;
packageNameTail = $(splitHead[2]) $(packageNameTail) ;
}
}
if $(package) in $(HAIKU_AVAILABLE_PACKAGES) {
return $(package) ;
if $(packageName) in $(HAIKU_AVAILABLE_PACKAGES) {
return $(packageName) ;
}
return ;

View File

@ -0,0 +1,359 @@
rule Libstdc++ForImage
{
# Libstdc++ForImage
#
# Returns the c++-standard-library to be put onto the image.
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
# the libstdc++.so for our legacy compiler (needs to be built)
return libstdc++.r4.so ;
}
# libstdc++.so for other architectures comes with the gcc_syslibs
# package, so there's no library to put onto the image directly.
return ;
}
rule TargetLibstdc++ asPath
{
# TargetLibstdc++ [ <asPath> ]
#
# Returns the c++-standard-library for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
# the libstdc++.so for our legacy compiler (needs to be built)
return libstdc++.r4.so ;
}
# return libstdc++.so from the gcc_syslibs build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs : libstdc++.so : $(flags)
] ;
} else {
# TODO: return libstdc++.so for non-Haiku target platform if needed
}
}
rule TargetLibsupc++ asPath
{
# TargetLibsupc++ [ <asPath> ]
#
# Returns the c++-support-library for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
# there is no libsupc++.so for the legacy compiler
return ;
}
# return libsupc++.so from the gcc_syslibs build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs : libsupc++.so : $(flags)
] ;
} else {
# TODO: return libsupc++.so for non-Haiku target platform if needed
}
}
rule TargetStaticLibsupc++ asPath
{
# TargetStaticLibsupc++ [ <asPath> ]
#
# Returns the static c++-support-library for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
# return libsupc++.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel : libsupc++.a : $(flags)
] ;
} else {
# TODO: return libsupc++.a for non-Haiku target platform if needed
}
}
rule TargetKernelLibsupc++ asPath
{
# TargetKernelLibsupc++ [ <asPath> ]
#
# Returns the static kernel c++-support-library for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
# return libsupc++-kernel.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel
: libsupc++-kernel.a : $(flags)
] ;
} else {
# There is no libsupc++-kernel.a for non-Haiku target platform
}
}
rule TargetBootLibsupc++ asPath
{
# TargetBootLibsupc++ [ <asPath> ]
#
# Returns the static bootloader c++-support-library for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
if $(TARGET_PACKAGING_ARCH) = x86_64 {
# we need to use the 32-bit libsupc++.a built by the cross-compiler
return $(TARGET_BOOT_LIBSUPC++) ;
# TODO: ideally, we would build this as part of gcc_syslibs_devel,
# but that isn't currently possible, as that would require
# 32-bit support (libraries and glue-code) on x86_64-Haiku.
}
# no special boot version of libsupc++.a needed, so we return
# libsupc++-kernel.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel
: libsupc++-kernel.a : $(flags)
] ;
} else {
# There is no libsupc++-boot.a for non-Haiku target platform
}
}
rule TargetLibgcc asPath
{
# TargetLibgcc [ <asPath> ]
#
# Returns the default libgcc(s) for the target. On x86_gcc2, this is the
# static libgcc, on everything else this will return the shared libgcc_s
# followed by the static libgcc (both are needed as they do not contain
# the same set of symbols).
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
local flags ;
if $(asPath) = true {
flags += path ;
}
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
# return libgcc.a from the gcc_syslibs_devel build feature.
return [
BuildFeatureAttribute gcc_syslibs_devel : libgcc.a : $(flags)
] ;
} else {
# return libgcc_s.so from the gcc_syslibs build feature and libgcc.a
# from the gcc_syslibs_devel build feature.
return [
BuildFeatureAttribute gcc_syslibs : libgcc_s.so : $(flags)
] [
BuildFeatureAttribute gcc_syslibs_devel : libgcc.a : $(flags)
] ;
}
} else {
# TODO: return libgcc for non-Haiku target platform if needed
}
}
rule TargetStaticLibgcc asPath
{
# TargetStaticLibgcc [ <asPath> ]
#
# Returns the static libgcc for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
# return libgcc.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel : libgcc.a : $(flags)
] ;
} else {
# TODO: return libgcc.a for non-Haiku target platform if needed
}
}
rule TargetKernelLibgcc asPath
{
# TargetKernelLibgcc [ <asPath> ]
#
# Returns the static kernel libgcc for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
# return libgcc-kernel.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel
: libgcc-kernel.a : $(flags)
] ;
} else {
# there is no libgcc-kernel.a for non-Haiku target platform
}
}
rule TargetBootLibgcc asPath
{
# TargetBootLibgcc [ <asPath> ]
#
# Returns the static bootloader libgcc for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
if $(TARGET_PACKAGING_ARCH) = x86_64 {
# we need to use the 32-bit libgcc.a built by the cross-compiler
return $(TARGET_BOOT_LIBGCC) ;
# TODO: ideally, we would build this as part of gcc_syslibs_devel,
# but that isn't currently possible, as that would require
# 32-bit support (libraries and glue-code) on x86_64-Haiku.
}
# no special boot version of libgcc needed, so we return
# libgcc-kernel.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel
: libgcc-kernel.a : $(flags)
] ;
} else {
# there is no libgcc-boot.a for non-Haiku target platform
}
}
rule TargetStaticLibgcceh asPath
{
# TargetStaticLibgcceh [ <asPath> ]
#
# Returns the static libgcc_eh for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
# return libgcc.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel : libgcc_eh.a : $(flags)
] ;
} else {
# TODO: return libgcc_eh.a for non-Haiku target platform if needed
}
}
rule TargetKernelLibgcceh asPath
{
# TargetKernelLibgcceh [ <asPath> ]
#
# Returns the static kernel libgcc_eh for the target.
# Invoking with <asPath> = true will return the full library path.
if $(TARGET_PLATFORM) = haiku {
# return libgcc_eh-kernel.a from the gcc_syslibs_devel build feature.
local flags ;
if $(asPath) = true {
flags += path ;
}
return [
BuildFeatureAttribute gcc_syslibs_devel
: libgcc_eh-kernel.a : $(flags)
] ;
} else {
# there is no libgcc_eh-kernel.a for non-Haiku target platform
}
}
rule C++HeaderDirectories architecture
{
# C++HeaderDirectories
#
# Returns the c++ header directories to use for the given 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
] ;
if $(baseDir) {
c++HeaderDirs =
$(baseDir)
[ FDirName $(baseDir) $(HAIKU_GCC_MACHINE_$(architecture)) ]
[ FDirName $(baseDir) backward ]
[ FDirName $(baseDir) ext ]
;
}
}
return $(c++HeaderDirs) ;
}
rule GccHeaderDirectories architecture
{
# GccHeaderDirectories
#
# Returns the gcc header directories to use for the given 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
] ;
if $(baseDir) {
gccHeaderDirs =
[ FDirName $(baseDir) include ]
[ FDirName $(baseDir) include-fixed ]
;
}
}
return $(gccHeaderDirs) ;
}

View File

@ -89,8 +89,7 @@ rule HaikuImageGetSystemLibs
return
# libs with special grist
[ MultiArchDefaultGristFiles libroot.so : revisioned ]
$(HAIKU_SHARED_LIBSTDC++_$(TARGET_PACKAGING_ARCH))
$(HAIKU_SHARED_LIBSUPC++_$(TARGET_PACKAGING_ARCH))
[ Libstdc++ForImage ]
# libs with standard grist
[ MultiArchDefaultGristFiles [ FFilterByBuildFeatures
libbe.so libbsd.so libbnetapi.so

View File

@ -62,8 +62,7 @@ rule HaikuImageGetSystemLibs
return
# libs with special grist
[ MultiArchDefaultGristFiles libroot.so : revisioned ]
$(HAIKU_SHARED_LIBSTDC++_$(TARGET_PACKAGING_ARCH))
$(HAIKU_SHARED_LIBSUPC++_$(TARGET_PACKAGING_ARCH))
[ Libstdc++ForImage ]
# libs with standard grist
[ MultiArchDefaultGristFiles [ FFilterByBuildFeatures
libalm.so

View File

@ -6,6 +6,7 @@ HaikuPackage $(haikuPackage) ;
# wifi firmware
local driver ;
for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) {
local package = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGE) ] ;
local archive = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVE) ] ;
@ -16,6 +17,7 @@ for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) {
}
local packages = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGES) ] ;
local archives = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVES) ] ;
local archive ;
for archive in $(archives) {
AddWifiFirmwareToPackage $(driver) : $(packages[1]) : $(archive)
: $(extract) ;

View File

@ -6,6 +6,7 @@ HaikuPackage $(haikuPackage) ;
# wifi firmware
local driver ;
for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) {
local package = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGE) ] ;
local archive = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVE) ] ;
@ -16,6 +17,7 @@ for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) {
}
local packages = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGES) ] ;
local archives = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVES) ] ;
local archive ;
for archive in $(archives) {
AddWifiFirmwareToPackage $(driver) : $(packages[1]) : $(archive)
: $(extract) ;

View File

@ -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 ]
$(HAIKU_SHARED_LIBSTDC++_$(architecture))
$(HAIKU_SHARED_LIBSUPC++_$(architecture))
$(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)

View File

@ -20,8 +20,10 @@ local packages =
haiku_$(secondaryArchs)_devel
;
if $(TARGET_PACKAGING_ARCH) != x86_gcc2 || $(secondaryArchs) {
packages += webpositive ;
if [ FIsBuildFeatureEnabled webpositive ] {
if $(TARGET_PACKAGING_ARCH) != x86_gcc2 || $(secondaryArchs) {
packages += webpositive ;
}
}
HaikuRepository $(haikuRepository) : $(repoInfo) : $(packages:S=.hpkg) ;

View File

@ -44,7 +44,9 @@ RemotePackageRepository HaikuPorts
freetype-2.5.2-3
freetype_devel-2.5.2-3
gawk-4.1.0-2
gcc-4.8.3_2014_05_28-2
gcc-4.8.3_2014_07_26-1
gcc_syslibs-4.8.3_2014_07_26-1
gcc_syslibs_devel-4.8.3_2014_07_26-1
gettext-0.18.1.1-5
gettext_libintl-0.18.1.1-5
git-1.8.3.4-2
@ -177,6 +179,7 @@ RemotePackageRepository HaikuPorts
freetype_x86_gcc2-2.5.2-3
freetype_x86_gcc2_devel-2.5.2-3
gcc_x86_gcc2-2.95.3_2014_07_26-1
gcc_x86_gcc2_syslibs_devel-2.95.3_2014_07_26-1
gettext_x86_gcc2-0.18.1.1-5
gettext_x86_gcc2_libintl-0.18.1.1-5
glu_x86_gcc2-9.0.0-2
@ -244,7 +247,7 @@ RemotePackageRepository HaikuPorts
fossil
freetype
gawk
# gcc
gcc
gcc_x86_gcc2
gettext
git

View File

@ -40,7 +40,9 @@ RemotePackageRepository HaikuPorts
freetype-2.5.2-3
freetype_devel-2.5.2-3
gawk-4.1.0-2
gcc-4.8.3_2014_05_28-3
gcc-4.8.3_2014_07_26-1
gcc_syslibs-4.8.3_2014_07_26-1
gcc_syslibs_devel-4.8.3_2014_07_26-1
gettext-0.18.1.1-5
gettext_libintl-0.18.1.1-5
git-1.8.3.4-3
@ -182,7 +184,7 @@ RemotePackageRepository HaikuPorts
fossil
freetype
gawk
# gcc
gcc
gettext
git
glu

View File

@ -73,6 +73,7 @@ RemotePackageRepository HaikuPorts
friss-0.8beta-1
gawk-4.1.0-2
gcc-2.95.3_2014_07_26-1
gcc_syslibs_devel-2.95.3_2014_07_26-1
getconf-r260000-1
getopt-1.1.5-1
gettext-0.18.1.1-6
@ -339,7 +340,9 @@ RemotePackageRepository HaikuPorts
ffmpeg_x86_devel-0.10.14-1
freetype_x86-2.5.2-2
freetype_x86_devel-2.5.2-2
gcc_x86-4.8.3_2014_05_28-3
gcc_x86-4.8.3_2014_07_26-1
gcc_x86_syslibs-4.8.3_2014_07_26-1
gcc_x86_syslibs_devel-4.8.3_2014_07_26-1
gettext_x86-0.18.1.1-6
gettext_x86_libintl-0.18.1.1-6
giflib_x86-5.1.0-1
@ -560,7 +563,7 @@ RemotePackageRepository HaikuPorts
friss
gawk
gcc
# gcc_x86
gcc_x86
getconf
getopt
gettext

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -16,7 +16,6 @@ installDir=$4
shift 4
additionalMakeArgs=$*
kernelCcFlags="-D_KERNEL_MODE"
ccFlags="-O2"
cxxFlags="-O2"
case $haikuMachine in
@ -25,7 +24,6 @@ x86_64-*)
# explicitly using --enable-multilib that causes a build
# failure
binutilsConfigureArgs=""
kernelCcFlags="$kernelCcFlags -mno-red-zone"
;;
m68k-*)
binutilsConfigureArgs="--enable-multilib"
@ -212,7 +210,7 @@ CFLAGS="$ccFlags" CXXFLAGS="$cxxFlags" "$gccSourceDir/configure" \
--prefix="$installDir" $buildHostSpec --target=$haikuMachine \
--disable-nls --disable-shared --with-system-zlib \
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
--with-sysroot="$sysrootDir" --enable-threads=posix --enable-tls \
--with-sysroot="$sysrootDir" --disable-threads --disable-tls \
$gccConfigureArgs \
|| exit 1
@ -228,46 +226,15 @@ $MAKE $additionalMakeArgs install || {
exit 1
}
# build libraries for the kernel if the target arch requires it
if [ -n "$kernelCcFlags" ]; then
# switch threads config to single for libgcc
ln -sf "$gccSourceDir/libgcc/gthr-single.h" "$haikuMachine/libgcc/gthr-default.h"
$MAKE -C "$haikuMachine/libgcc" clean
$MAKE -C "$haikuMachine/libgcc" CFLAGS="-g -O2 $kernelCcFlags" || {
echo "Error: Building kernel libgcc failed." >&2
exit 1
}
cp "$haikuMachine/libgcc/libgcc.a" \
"$installDir/$haikuMachine/lib/libgcc-kernel.a" || exit 1
$MAKE -C "$haikuMachine/libstdc++-v3/libsupc++" clean
# switch threads config to single for libsupc++
[ -f "$haikuMachine/32/libstdc++-v3/include/$haikuMachine/bits/gthr-default.h" ] \
&& cp -f "$haikuMachine/32/libstdc++-v3/include/$haikuMachine/bits/gthr-single.h" \
"$haikuMachine/32/libstdc++-v3/include/$haikuMachine/bits/gthr-default.h"
cp -f "$haikuMachine/libstdc++-v3/include/$haikuMachine/bits/gthr-single.h" \
"$haikuMachine/libstdc++-v3/include/$haikuMachine/bits/gthr-default.h"
[ -f "$haikuMachine/32/libstdc++-v3/config.h" ] \
&& sed -i '/.*_GLIBCXX_HAS_GTHREADS.*/c\#undef _GLIBCXX_HAS_GTHREADS' \
"$haikuMachine/32/libstdc++-v3/config.h"
[ -f "$haikuMachine/32/libstdc++-v3/include/$haikuMachine/bits/c++config.h" ] \
&& sed -i '/.*_GLIBCXX_HAS_TLS.*/c\#undef _GLIBCXX_HAS_TLS' \
"$haikuMachine/32/libstdc++-v3/include/$haikuMachine/bits/c++config.h"
sed -i '/.*_GLIBCXX_HAS_GTHREADS.*/c\#undef _GLIBCXX_HAS_GTHREADS' \
"$haikuMachine/libstdc++-v3/config.h"
sed -i '/.*_GLIBCXX_HAVE_TLS.*/c\#undef _GLIBCXX_HAVE_TLS' \
"$haikuMachine/libstdc++-v3/include/$haikuMachine/bits/c++config.h"
$MAKE -C "$haikuMachine/libstdc++-v3/libsupc++" CFLAGS="-g -O2 $kernelCcFlags" \
CXXFLAGS="-g -O2 $kernelCcFlags" || {
echo "Error: Building kernel libsupc++ failed." >&2
exit 1
}
cp "$haikuMachine/libstdc++-v3/libsupc++/.libs/libsupc++.a" \
"$installDir/$haikuMachine/lib/libsupc++-kernel.a" || exit 1
fi
case $haikuMachine in
x86_64-*)
# pick up the 32-bit libraries for the bootloader
bootLibgcc=`$installDir/bin/$haikuMachine-gcc -m32 -print-file-name=libgcc.a`
$installDir/bin/$haikuMachine-strip --strip-debug $bootLibgcc
bootLibsupcxx=`$installDir/bin/$haikuMachine-gcc -m32 -print-file-name=libsupc++.a`
$installDir/bin/$haikuMachine-strip --strip-debug $bootLibsupcxx
;;
esac
# cleanup

110
configure vendored
View File

@ -248,8 +248,6 @@ standard_gcc_settings()
local gccRawVersion=`$gcc -dumpversion`
local gccMachine=`$gcc -dumpmachine`
local libgcc=${gccdir}/libgcc.a
# determine architecture from machine triple
case $gccMachine in
arm-*) targetCpu=arm;;
@ -264,75 +262,8 @@ standard_gcc_settings()
esac
local targetArch=$targetCpu
local staticLibStdCxx
local sharedLibStdCxx
local staticLibSupCxx
local sharedLibSupCxx
local kernelLibgcc
local cxxHeaders
case $gccRawVersion in
4.*)
# for gcc 4 we use the libstdc++ and libsupc++ that come with the
# compiler
staticLibStdCxx=`$gcc -print-file-name=libstdc++.a`
sharedLibStdCxx=`$gcc -print-file-name=libstdc++.so`
staticLibSupCxx=`$gcc -print-file-name=libsupc++.a`
sharedLibSupCxx=`$gcc -print-file-name=libsupc++.so`
# If the architecture has separate runtime libraries for the
# kernel, use them.
kernelLibgcc=`$gcc -print-file-name=libgcc-kernel.a`
if [ $kernelLibgcc = libgcc-kernel.a ]; then
kernelLibgcc=$libgcc
fi
kernelLibSupCxx=`$gcc -print-file-name=libsupc++-kernel.a`
if [ $kernelLibSupCxx = libsupc++-kernel.a ]; then
kernelLibSupCxx=$staticLibSupCxx
fi
local headersBase=$gccdir/../../../..
local headers=$headersBase/$gccMachine/include/c++/$gccRawVersion
if [ ! -d $headers ]; then
headers=$headersBase/include/c++/$gccRawVersion
fi
cxxHeaders=$headers
for d in $gccMachine backward ext; do
# Note: We need the line break, otherwise the line might become
# too long for jam (512 bytes max).
cxxHeaders="$cxxHeaders $headers/$d"
done
# Unset the HAIKU_{SHARED,STATIC}_LIB{STD,SUP}CXX variables, if the
# compiler didn't give us actual file names. Otherwise resolve
# symlinks to avoid problems when copying the libraries to the
# image.
if [ $staticLibStdCxx = libstdc++.a ]; then
staticLibStdCxx=
else
staticLibStdCxx=`$readlink $staticLibStdCxx`
fi
if [ $sharedLibStdCxx = libstdc++.so ]; then
sharedLibStdCxx=
else
sharedLibStdCxx=`$readlink $sharedLibStdCxx`
fi
if [ $staticLibSupCxx = libsupc++.a ]; then
staticLibSupCxx=
else
staticLibSupCxx=`$readlink $staticLibSupCxx`
fi
if [ $sharedLibSupCxx = libsupc++.so ]; then
sharedLibSupCxx=
else
sharedLibSupCxx=`$readlink $sharedLibSupCxx`
fi
;;
2.9*)
# check for correct (most up-to-date) legacy compiler and complain
# if an older one is installed
@ -342,8 +273,6 @@ standard_gcc_settings()
exit 1;
fi
kernelLibgcc=$libgcc
kernelLibSupCxx=
targetArch=x86_gcc2
;;
esac
@ -354,7 +283,7 @@ standard_gcc_settings()
case $gccMachine in
x86_64-*)
# Boot loader is 32-bit, need the 32-bit libs and c++ config
bootLibgcc=`$gcc -m32 -print-libgcc-file-name`
bootLibgcc=`$gcc -m32 -print-file-name=libgcc.a`
bootLibSupCxx=`$gcc -m32 -print-file-name=libsupc++.a`
local headersBase=$gccdir/../../../..
@ -364,10 +293,6 @@ standard_gcc_settings()
fi
bootCxxHeaders="$headers/$gccMachine/32"
;;
*)
bootLibgcc=$libgcc
bootLibSupCxx=$staticLibSupCxx
;;
esac
# determine whether graphite loop optimization should/can be used
@ -400,19 +325,9 @@ standard_gcc_settings()
set_variable HAIKU_GCC_RAW_VERSION_$targetArch $gccRawVersion
set_variable HAIKU_GCC_MACHINE_$targetArch $gccMachine
set_variable HAIKU_GCC_LIB_DIR_$targetArch $gccdir
set_variable HAIKU_GCC_LIBGCC_$targetArch $libgcc
set_variable HAIKU_GCC_HEADERS_DIR_$targetArch \
"${gccdir}/include ${gccdir}/include-fixed"
set_variable HAIKU_STATIC_LIBSTDCXX_$targetArch "$staticLibStdCxx"
set_variable HAIKU_SHARED_LIBSTDCXX_$targetArch "$sharedLibStdCxx"
set_variable HAIKU_STATIC_LIBSUPCXX_$targetArch "$staticLibSupCxx"
set_variable HAIKU_SHARED_LIBSUPCXX_$targetArch "$sharedLibSupCxx"
set_variable HAIKU_KERNEL_LIBSUPCXX_$targetArch "$kernelLibSupCxx"
set_variable HAIKU_BOOT_LIBSUPCXX_$targetArch "$bootLibSupCxx"
set_variable HAIKU_KERNEL_LIBGCC_$targetArch $kernelLibgcc
set_variable HAIKU_CXX_HEADERS_DIR_$targetArch "$cxxHeaders"
set_variable HAIKU_BOOT_LIBGCC_$targetArch $bootLibgcc
set_variable HAIKU_BOOT_CXX_HEADERS_DIR_$targetArch "$bootCxxHeaders"
set_variable HAIKU_BOOT_LIBSUPCXX_$targetArch "$bootLibSupCxx"
set_variable HAIKU_BOOT_LIBGCC_$targetArch $bootLibgcc
set_variable HAIKU_USE_GCC_GRAPHITE_$targetArch $useGraphite
standard_gcc_settings_targetArch=$targetArch
@ -918,15 +833,6 @@ else
esac
fi
# Get the libgcc objects. We couldn't do that in standard_gcc_settings,
# since we need "ar", which may be set later.
ar=`get_variable HAIKU_AR_$targetArch`
libgcc=`get_variable HAIKU_GCC_LIBGCC_$targetArch`
set_variable HAIKU_GCC_LIBGCC_OBJECTS_$targetArch \
"`$ar t $libgcc | grep -v eabi.o`"
# Note: We filter out eabi.o. It's present in gcc's libgcc for PPC
# and neither needed nor wanted.
# check whether the Haiku compiler really targets Haiku
targetMachine=`get_variable HAIKU_GCC_MACHINE_$targetArch`
case "$targetMachine" in
@ -994,14 +900,7 @@ for targetArch in $HAIKU_PACKAGING_ARCHS; do
HAIKU_GCC_RAW_VERSION HAIKU_GCC_RAW_VERSION
HAIKU_GCC_MACHINE HAIKU_GCC_MACHINE
HAIKU_GCC_LIB_DIR HAIKU_GCC_LIB_DIR
HAIKU_GCC_LIBGCC HAIKU_GCC_LIBGCC
HAIKU_CPU HAIKU_CPU
HAIKU_STATIC_LIBSTDC++ HAIKU_STATIC_LIBSTDCXX
HAIKU_SHARED_LIBSTDC++ HAIKU_SHARED_LIBSTDCXX
HAIKU_STATIC_LIBSUPC++ HAIKU_STATIC_LIBSUPCXX
HAIKU_SHARED_LIBSUPC++ HAIKU_SHARED_LIBSUPCXX
HAIKU_KERNEL_LIBGCC HAIKU_KERNEL_LIBGCC
HAIKU_KERNEL_LIBSUPC++ HAIKU_KERNEL_LIBSUPCXX
HAIKU_BOOT_LIBGCC HAIKU_BOOT_LIBGCC
HAIKU_BOOT_LIBSUPC++ HAIKU_BOOT_LIBSUPCXX
HAIKU_AR HAIKU_AR
@ -1030,10 +929,7 @@ for targetArch in $HAIKU_PACKAGING_ARCHS; do
# For variables that may have long values, distribute them over multiple
# lines so that jam doesn't hit the maximum line length.
variables="
HAIKU_GCC_HEADERS_DIR HAIKU_GCC_HEADERS_DIR
HAIKU_C++_HEADERS_DIR HAIKU_CXX_HEADERS_DIR
HAIKU_BOOT_C++_HEADERS_DIR HAIKU_BOOT_CXX_HEADERS_DIR
HAIKU_GCC_LIBGCC_OBJECTS HAIKU_GCC_LIBGCC_OBJECTS
"
set -- $variables
while [ $# -ge 2 ]; do

View File

@ -141,6 +141,7 @@
#define PT_PHDR 6
#define PT_TLS 7
#define PT_STACK 0x6474e551
#define PT_RELRO 0x6474e552
#define PT_LOPROC 0x70000000
#define PT_HIPROC 0x7fffffff

View File

@ -24,5 +24,5 @@ Addon radeon_hd.accelerant :
mode.cpp
pll.cpp
ringqueue.cpp
: be libaccelerantscommon.a $(TARGET_LIBSUPC++)
: be libaccelerantscommon.a [ TargetLibsupc++ ]
;

View File

@ -17,5 +17,5 @@ Includes [ FGristFiles BeDecorator.cpp ]
Addon BeDecorator :
BeDecorator.cpp
: be <nogrist>app_server $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++)
: be <nogrist>app_server [ TargetLibstdc++ ] [ TargetLibsupc++ ]
;

View File

@ -17,5 +17,5 @@ Includes [ FGristFiles MacDecorator.cpp ]
Addon MacDecorator :
MacDecorator.cpp
: be <nogrist>app_server $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++)
: be <nogrist>app_server [ TargetLibstdc++ ] [ TargetLibsupc++ ]
;

View File

@ -17,5 +17,5 @@ Includes [ FGristFiles WinDecorator.cpp ]
Addon WinDecorator :
WinDecorator.cpp
: be <nogrist>app_server $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++)
: be <nogrist>app_server [ TargetLibstdc++ ] [ TargetLibsupc++ ]
;

View File

@ -13,7 +13,7 @@ Addon <disk_system>bfs :
bfs_disk_system.cpp
: be localestub $(TARGET_LIBSUPC++) libshared.a
: be localestub [ TargetLibsupc++ ] libshared.a
;
DoCatalogs <disk_system>bfs :

View File

@ -18,5 +18,5 @@ Addon <disk_system>gpt :
crc32.cpp
utility.cpp
: be $(TARGET_LIBSUPC++)
: be [ TargetLibsupc++ ]
;

View File

@ -23,7 +23,7 @@ Addon <disk_system>intel :
# kernel sources
PartitionMap.cpp
: be libshared.a localestub $(TARGET_LIBSUPC++)
: be libshared.a localestub [ TargetLibsupc++ ]
;
DoCatalogs <disk_system>intel :

View File

@ -11,7 +11,7 @@ Addon <disk_system>ntfs :
NTFSAddOn.cpp
InitializeParameterEditor.cpp
: be localestub $(TARGET_LIBSUPC++) libshared.a
: be localestub [ TargetLibsupc++ ] libshared.a
;
DoCatalogs <disk_system>ntfs :

View File

@ -16,7 +16,7 @@ Includes [ FGristFiles $(sources) ] : $(HAIKU_TAGLIB_HEADERS_DEPENDENCY) ;
Addon AudioTagAnalyser :
$(sources)
:
be $(HAIKU_TAGLIB_LIBS) $(TARGET_LIBSTDC++)
be $(HAIKU_TAGLIB_LIBS) [ TargetLibstdc++ ]
;
SEARCH on [ FGristFiles IndexServerAddOn.cpp ]

View File

@ -17,7 +17,7 @@ Includes [ FGristFiles $(sources) ] : $(HAIKU_CLUCENE_HEADERS_DEPENDENCY) ;
Addon FullTextAnalyser :
$(sources)
:
be $(HAIKU_CLUCENE_LIBS) $(TARGET_LIBSTDC++)
be $(HAIKU_CLUCENE_LIBS) [ TargetLibstdc++ ]
;
SEARCH on [ FGristFiles IndexServerAddOn.cpp ]

View File

@ -14,7 +14,7 @@ Addon <input>keyboard :
TeamMonitorWindow.cpp
TeamListItem.cpp
: input_server be libshared.a localestub $(TARGET_LIBSUPC++) ;
: input_server be libshared.a localestub [ TargetLibsupc++ ] ;
DoCatalogs <input>keyboard :
x-vnd.Haiku-KeyboardInputServerDevice

View File

@ -6,4 +6,4 @@ UsePrivateHeaders input shared ;
Addon <input>mouse :
MouseInputDevice.cpp
: be input_server $(TARGET_LIBSUPC++) ;
: be input_server [ TargetLibsupc++ ] ;

View File

@ -6,4 +6,4 @@ UsePrivateHeaders input ;
Addon <input>tablet :
TabletInputDevice.cpp
: be input_server $(TARGET_LIBSUPC++) ;
: be input_server [ TargetLibsupc++ ] ;

View File

@ -10,4 +10,4 @@ Addon <input>wacom :
PointingDevice.cpp
PointingDeviceFactory.cpp
TabletDevice.cpp
: be input_server $(TARGET_LIBSUPC++) ;
: be input_server [ TargetLibsupc++ ] ;

View File

@ -6,4 +6,4 @@ UsePrivateHeaders screen_saver ;
Addon screen_saver :
ScreenSaverFilter.cpp
: be libscreensaver.so input_server $(TARGET_LIBSUPC++) ;
: be libscreensaver.so input_server [ TargetLibsupc++ ] ;

View File

@ -23,4 +23,4 @@ Addon shortcut_catcher :
CommandExecutor.cpp
KeyCommandMap.cpp
ShortcutsServerFilter.cpp
: be game input_server libshortcuts_shared.a $(TARGET_LIBSUPC++) ;
: be game input_server libshortcuts_shared.a [ TargetLibsupc++ ] ;

View File

@ -2,4 +2,4 @@ SubDir HAIKU_TOP src add-ons input_server filters vmware_mouse ;
SetSubDirSupportedPlatformsBeOSCompatible ;
Addon vmware_mouse : VMWareMouse.cpp : be input_server $(TARGET_LIBSUPC++) ;
Addon vmware_mouse : VMWareMouse.cpp : be input_server [ TargetLibsupc++ ] ;

View File

@ -17,7 +17,7 @@ Addon canna :
CannaMethod.cpp
KouhoWindow.cpp
PaletteWindow.cpp
: be textencoding input_server libcanna.a librk.a $(TARGET_LIBSUPC++) ;
: be textencoding input_server libcanna.a librk.a [ TargetLibsupc++ ] ;
SubInclude HAIKU_TOP src add-ons input_server methods canna lib ;
SubInclude HAIKU_TOP src add-ons input_server methods canna rk ;

View File

@ -6,6 +6,4 @@ UsePrivateHeaders kernel virtio ;
KernelAddon virtio_pci :
virtio_pci.cpp
: $(TARGET_KERNEL_LIBSUPC++)
;

View File

@ -16,7 +16,6 @@ HAIKU_BIND_FS_SOURCES =
KernelAddon bindfs
:
$(HAIKU_BIND_FS_SOURCES)
: $(TARGET_KERNEL_LIBSUPC++)
;

View File

@ -20,6 +20,6 @@ Application authentication_server
AuthenticationPanel.cpp
AuthenticationServer.cpp
Panel.cpp
: be $(TARGET_LIBSUPC++) libshared.a
: be [ TargetLibsupc++ ] libshared.a
: authentication_server.rdef
;

View File

@ -88,5 +88,5 @@ Addon netfs
VolumeManager.cpp
: be libuserlandfs_beos_kernel.so
$(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++) libshared.a
$(TARGET_NETWORK_LIBS) [ TargetLibsupc++ ] libshared.a
;

View File

@ -84,7 +84,7 @@ Application netfs_server
Volume.cpp
VolumeManager.cpp
:
be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++) libshared.a
be $(TARGET_NETWORK_LIBS) [ TargetLibsupc++ ] libshared.a
:
netfs_server.rdef
;

View File

@ -6,7 +6,7 @@ Application nfs4_idmapper_server
:
be
$(TARGET_LIBSUPC++)
[ TargetLibsupc++ ]
:
nfs4_idmapper_server.rdef

View File

@ -6,7 +6,7 @@ UsePrivateKernelHeaders ;
UsePrivateHeaders package shared storage support ;
local subDirs =
local subDirs =
indices
nodes
package
@ -129,7 +129,7 @@ KernelAddon packagefs
$(storageKitSources)
$(supportKitSources)
: $(TARGET_KERNEL_LIBSUPC++) kernel_libz.a
: kernel_libz.a
;

View File

@ -44,6 +44,4 @@ KernelAddon ramfs
SizeIndex.cpp
SymLink.cpp
Volume.cpp
: $(TARGET_KERNEL_LIBSUPC++)
;

View File

@ -27,6 +27,4 @@ KernelAddon reiserfs
Tree.cpp
VNode.cpp
Volume.cpp
: $(TARGET_KERNEL_LIBSUPC++)
;

View File

@ -40,6 +40,4 @@ KernelAddon userlandfs
Settings.cpp
UserlandFS.cpp
Volume.cpp
: $(TARGET_KERNEL_LIBSUPC++)
;

View File

@ -43,7 +43,7 @@ Application userlandfs_server
:
be
$(TARGET_LIBSUPC++)
[ TargetLibsupc++ ]
:
userlandfs_server.rdef
;

View File

@ -27,5 +27,5 @@ SharedLibrary libuserlandfs_beos_kernel.so
:
<nogrist>userlandfs_server
$(TARGET_LIBSUPC++)
[ TargetLibsupc++ ]
;

View File

@ -29,5 +29,5 @@ SharedLibrary libuserlandfs_fuse.so
FUSEVolume.cpp
:
<nogrist>userlandfs_server libshared.a be $(TARGET_LIBSUPC++)
<nogrist>userlandfs_server libshared.a be [ TargetLibsupc++ ]
;

View File

@ -52,7 +52,7 @@ SharedLibrary libuserlandfs_haiku_kernel.so
:
<nogrist>userlandfs_server
be # for BLocker only
$(TARGET_LIBSUPC++)
[ TargetLibsupc++ ]
;

View File

@ -5,5 +5,5 @@ UsePrivateHeaders locale shared ;
Addon <catalog-addon>plaintext
: Catalog.cpp
: be $(TARGET_LIBSTDC++)
: be [ TargetLibstdc++ ]
;

View File

@ -12,11 +12,11 @@ Depends LocaleKitCollatorAddons
Addon <collator-addon>GermanDIN-2
: GermanDIN-2.cpp
: be $(TARGET_LIBSUPC++)
: be [ TargetLibsupc++ ]
;
Addon <collator-addon>French
: French.cpp
: be $(TARGET_LIBSUPC++)
: be [ TargetLibsupc++ ]
;

View File

@ -13,7 +13,7 @@ Addon MatchHeader
RuleFilter.cpp
StringMatcher.cpp
:
be libmail.so $(TARGET_LIBSUPC++) localestub
be libmail.so [ TargetLibsupc++ ] localestub
;
DoCatalogs MatchHeader

View File

@ -11,7 +11,7 @@ Addon NewMailNotification :
filter.cpp
ConfigView.cpp
:
be libmail.so localestub $(TARGET_LIBSUPC++)
be libmail.so localestub [ TargetLibsupc++ ]
;
DoCatalogs NewMailNotification :

View File

@ -12,7 +12,7 @@ Addon SpamFilter :
SpamFilterConfig.cpp
SpamFilter.cpp
:
be libmail.so localestub $(TARGET_LIBSUPC++)
be libmail.so localestub [ TargetLibsupc++ ]
;
DoCatalogs SpamFilter

View File

@ -43,7 +43,7 @@ Addon IMAP
$(sources)
:
be libmail.so localestub $(TARGET_NETWORK_LIBS) libalm.so
libshared.a $(TARGET_LIBSUPC++) $(TARGET_LIBSTDC++)
libshared.a [ TargetLibsupc++ ] [ TargetLibstdc++ ]
;
SEARCH on [ FGristFiles IMAPFolders.cpp IMAPHandler.cpp IMAPMailbox.cpp

View File

@ -34,7 +34,7 @@ AddResources POP3 : POP3.rdef ;
Addon POP3
: $(sources)
: be libbnetapi.so libmail.so localestub
[ BuildFeatureAttribute openssl : libraries ] $(TARGET_LIBSUPC++)
[ BuildFeatureAttribute openssl : libraries ] [ TargetLibsupc++ ]
$(TARGET_NETWORK_LIBS)
;

View File

@ -12,7 +12,7 @@ Addon Fortune :
ConfigView.cpp
filter.cpp
:
be libmail.so localestub $(TARGET_LIBSUPC++)
be libmail.so localestub [ TargetLibsupc++ ]
;
DoCatalogs Fortune :

View File

@ -29,7 +29,7 @@ AddResources SMTP : SMTP.rdef ;
Addon SMTP
: $(sources)
: be libmail.so $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++)
: be libmail.so $(TARGET_NETWORK_LIBS) [ TargetLibstdc++ ]
localestub [ BuildFeatureAttribute openssl : libraries ]
;

View File

@ -19,7 +19,7 @@ Addon dvb.media_addon :
PacketQueue.cpp
pes.cpp
TransportStreamDemux.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;
Includes [ FGristFiles MediaFormat.cpp ]

View File

@ -6,5 +6,5 @@ Addon equalizer.media_addon :
Equalizer.cpp
EqualizerAddOn.cpp
EqualizerNode.cpp
: be media $(TARGET_LIBSTDC++)
: be media [ TargetLibstdc++ ]
;

View File

@ -10,6 +10,6 @@ Addon esound_sink.media_addon :
ESDEndpoint.cpp
ESDSinkAddOn.cpp
ESDSinkNode.cpp
: be media network $(TARGET_LIBSUPC++)
: be media network [ TargetLibsupc++ ]
;

View File

@ -10,5 +10,5 @@ Addon firewire_dv.media_addon :
FireWireCard.cpp
FireWireDVAddOn.cpp
FireWireDVNode.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -7,5 +7,5 @@ Addon legacy.media_addon :
LegacyAudioDevice.cpp
LegacyAudioProducer.cpp
LegacyMediaAddOn.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -15,7 +15,7 @@ Addon mixer.media_addon :
MixerSettings.cpp
MixerUtils.cpp
Resampler.cpp
: be media $(TARGET_LIBSUPC++) localestub
: be media [ TargetLibsupc++ ] localestub
;
DoCatalogs mixer.media_addon

View File

@ -17,7 +17,7 @@ Addon hmulti_audio.media_addon :
MultiAudioUtility.cpp
Resampler.cpp
TimeComputer.cpp
: be media $(TARGET_LIBSUPC++) localestub
: be media [ TargetLibsupc++ ] localestub
;
DoCatalogs hmulti_audio.media_addon

View File

@ -14,5 +14,5 @@ Addon opensound.media_addon :
OpenSoundDeviceEngine.cpp
OpenSoundDeviceMixer.cpp
OpenSoundNode.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -10,5 +10,5 @@ Application reader.media_addon :
MediaReader.cpp
MediaReaderAddOn.cpp
misc.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -3,5 +3,5 @@ SubDir HAIKU_TOP src add-ons media media-add-ons tone_producer_demo ;
Addon tone_producer_demo.media_addon :
ToneProducerAddOn.cpp
ToneProducer.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -8,5 +8,5 @@ Addon usb_vision.media_addon :
AddOn.cpp
Producer.cpp
TunerLocale.cpp
: be media $(TARGET_LIBSTDC++)
: be media [ TargetLibstdc++ ]
;

View File

@ -95,7 +95,7 @@ Addon usb_webcam.media_addon :
CamRoster.cpp
CamSensor.cpp
CamStreamingDeframer.cpp
: be media $(usbKitLibraryName) $(TARGET_LIBSUPC++)
: be media $(usbKitLibraryName) [ TargetLibsupc++ ]
;
# force dependancies

View File

@ -3,5 +3,5 @@ SubDir HAIKU_TOP src add-ons media media-add-ons video_producer_demo ;
Addon video_producer_demo.media_addon :
AddOn.cpp
Producer.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -5,5 +5,5 @@ Addon video_window_demo.media_addon :
VideoNode.cpp
VideoView.cpp
VideoWindow.cpp
: be media $(TARGET_LIBSUPC++)
: be media [ TargetLibsupc++ ]
;

View File

@ -6,5 +6,5 @@ Addon vst_host.media_addon :
VSTHost.cpp
VSTAddOn.cpp
VSTNode.cpp
: be media $(TARGET_LIBSTDC++)
: be media [ TargetLibstdc++ ]
;

View File

@ -4,7 +4,7 @@ UsePrivateHeaders media ;
Addon ac3_decoder :
ac3_decoder.cpp
: liba52.a be libmedia.so $(TARGET_LIBSUPC++)
: liba52.a be libmedia.so [ TargetLibsupc++ ]
;
SubIncludeGPL HAIKU_TOP src add-ons media plugins ac3_decoder liba52 ;

View File

@ -6,4 +6,4 @@ UsePrivateHeaders media ;
Addon aiff_reader :
aiff_reader.cpp
: be libmedia.so $(TARGET_LIBSUPC++) ;
: be libmedia.so [ TargetLibsupc++ ] ;

View File

@ -9,7 +9,7 @@ SubDirHdrs [ FDirName $(SUBDIR) MAClib ] ;
Addon ape_reader :
APEReader.cpp
: libMonkeysAudio.a MAClib.a be libmedia.so $(TARGET_LIBSUPC++)
: libMonkeysAudio.a MAClib.a be libmedia.so [ TargetLibsupc++ ]
;
SubInclude HAIKU_TOP src add-ons media plugins ape_reader LibMonkeysAudio ;

View File

@ -12,7 +12,7 @@ Addon asf_reader :
ASFIndex.cpp
:
libasfreader.a
be libmedia.so $(TARGET_LIBSTDC++)
be libmedia.so [ TargetLibstdc++ ]
;
SubInclude HAIKU_TOP src add-ons media plugins asf_reader libasf ;

View File

@ -6,5 +6,5 @@ UsePrivateHeaders media ;
Addon au_reader :
au_reader.cpp
: be libmedia.so $(TARGET_LIBSUPC++)
: be libmedia.so [ TargetLibsupc++ ]
;

View File

@ -10,7 +10,7 @@ Addon avi_reader :
avi_reader.cpp
:
libopendml.a
be libmedia.so $(TARGET_LIBSTDC++)
be libmedia.so [ TargetLibstdc++ ]
;
SubInclude HAIKU_TOP src add-ons media plugins avi_reader libOpenDML ;

View File

@ -57,7 +57,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
be
media
$(TARGET_LIBSUPC++)
[ TargetLibsupc++ ]
;
}
}

View File

@ -17,7 +17,7 @@ Addon matroska :
# libmatroska.a
libMatroskaParser.a
[ BuildFeatureAttribute zlib : library ]
libmedia.so be $(TARGET_LIBSTDC++)
libmedia.so be [ TargetLibstdc++ ]
;
# SubInclude HAIKU_TOP src add-ons media plugins matroska libebml ;

View File

@ -11,7 +11,7 @@ Addon mov_reader :
:
libmovreader.a
[ BuildFeatureAttribute zlib : library ]
be libmedia.so $(TARGET_LIBSTDC++)
be libmedia.so [ TargetLibstdc++ ]
;
SubInclude HAIKU_TOP src add-ons media plugins mov_reader libMOV ;

Some files were not shown because too many files have changed in this diff Show More