Merge branch 'master' of ssh://git.haiku-os.org/haiku

This commit is contained in:
Alexander von Gluck IV 2011-11-12 11:42:19 -06:00
commit 207794909d
6 changed files with 56 additions and 20 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
generated*
build/jam/UserBuildConfig
build/user_config_headers

View File

@ -136,13 +136,10 @@ if $(HAIKU_USE_GCC_PIPE) = 1 {
if $(HAIKU_GCC_VERSION[1]) >= 3 {
HAIKU_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ;
}
# TODO: With Haiku as the host platform, this does not appear to be set up
# correctly, at least when compiling the libbe_test target platform. When
# enabling the lines below, these flags suddenly appear as link flags passed
# to ld as well.
#if $(HOST_GCC_VERSION[1]) >= 3 {
# HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ;
#}
if $(HOST_GCC_VERSION[1]) >= 3 {
HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ;
}
# 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
@ -545,14 +542,26 @@ HAIKU_BUILD_DESCRIPTION ?= "Unknown Build" ;
# analyze the host gcc machine spec to find out about 64-bitness
HOST_PLATFORM_IS_64_BIT = ;
switch $(HOST_GCC_MACHINE) {
case amd64-* : HOST_PLATFORM_IS_64_BIT = 1 ;
case i686-apple-darwin10 : HOST_PLATFORM_IS_64_BIT = 1 ;
case x86_64-* : HOST_PLATFORM_IS_64_BIT = 1 ;
}
# If HAIKU_HOST_USE_32BIT is set, add the required gcc base flag (the LD flag
# is set later), or, if the architecture isn't actually 64 bit, clear
# HAIKU_HOST_USE_32BIT.
# Afterwards HOST_PLATFORM_IS_64_BIT will indicate whether the architecture is
# effectively (i.e. when using the compiler/linker flags) 64 bit and
# HAIKU_HOST_USE_32BIT will be set, iff the architecture is really 64 bit and
# 32 bit mode was requested.
if $(HAIKU_HOST_USE_32BIT) = 1 {
# enable GCC -m32 option
HOST_GCC_BASE_FLAGS = -m32 ;
} else {
switch $(HOST_GCC_MACHINE) {
case amd64-* : HOST_PLATFORM_IS_64_BIT = 1 ;
case i686-apple-darwin10 : HOST_PLATFORM_IS_64_BIT = 1 ;
case x86_64-* : HOST_PLATFORM_IS_64_BIT = 1 ;
if $(HOST_PLATFORM_IS_64_BIT) {
# enable GCC -m32 option
HOST_GCC_BASE_FLAGS = -m32 ;
HOST_PLATFORM_IS_64_BIT = ;
} else {
HAIKU_HOST_USE_32BIT = 0 ;
}
}
@ -566,7 +575,7 @@ HOST_RANLIB ?= $(RANLIB) ;
HOST_CPPFLAGS ?= $(CPPFLAGS) ;
HOST_CCFLAGS ?= $(HOST_GCC_BASE_FLAGS) $(CCFLAGS) ;
HOST_C++FLAGS ?= $(HOST_GCC_BASE_FLAGS) $(C++FLAGS) ;
HOST_LDFLAGS ?= $(HOST_GCC_BASE_FLAGS) $(LDFLAGS) ;
HOST_LDFLAGS ?= $(LDFLAGS) ;
HOST_LINKFLAGS ?= $(HOST_GCC_BASE_FLAGS) $(LINKFLAGS) ;
HOST_DEFINES ?= $(DEFINES) ;
HOST_HDRS ?= $(HDRS) ;
@ -599,6 +608,11 @@ if $(HOST_PLATFORM) = cygwin {
HOST_CPU ?= $(OSPLAT:L) ;
# Jam doesn't know x86_64, so override HOST_CPU, if 64 bit.
if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) {
HOST_CPU = x86_64 ;
}
HOST_ARCH ?= $(HOST_CPU) ;
HOST_ARCH_MACRO_DEFINE = ARCH_$(HOST_CPU) ;
@ -699,7 +713,7 @@ for level in $(HAIKU_DEBUG_LEVELS[2-]) {
}
# ld flags
if $(HOST_ARCH) = x86 && $(HAIKU_HOST_USE_32BIT) = 1 {
if $(HAIKU_HOST_USE_32BIT) = 1 {
HOST_LDFLAGS += -melf_i386 ;
}
@ -784,7 +798,7 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
HOST_LIBSUPC++ = gcc_s.1 stdc++ ;
HOST_LIBSTDC++ = ;
} else if $(HOST_PLATFORM) = freebsd {
if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) = 1 {
if $(HOST_CPU) = x86_64 {
# amd64 FreeBSD 8 doesn't come without a shared libsupc++, and the
# static one prevents us from building shared libraries. So we have
# to work around by using the shared libstdc++.
@ -806,6 +820,8 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
# build platform we need to make sure, this is also defined.
if $(HOST_CPU) = x86 {
HOST_DEFINES += __INTEL__ ;
} else if $(HOST_CPU) = x86_64 {
HOST_DEFINES += __x86_64__ ;
} else if $(HOST_CPU) = ppc {
HOST_DEFINES += __POWERPC__ ;
} else if $(HOST_CPU) = m68k {

View File

@ -44,8 +44,13 @@ rule KernelLd
LINKFLAGS on $(1) = $(4) ;
if $(3) { LINKFLAGS on $(1) += --script=$(3) ; }
# Remove any preset LINKLIBS, but link against libgcc.a
LINKLIBS on $(1) = $(TARGET_STATIC_LIBSUPC++) $(TARGET_GCC_LIBGCC) ;
# 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_STATIC_LIBSUPC++) ;
}
LINKLIBS on $(1) = $(libs) $(TARGET_GCC_LIBGCC) ;
# TODO: Do we really want to invoke SetupKernel here? The objects should
# have been compiled with KernelObjects anyway, so we're doing that twice.

View File

@ -724,3 +724,12 @@ rule BuildPlatformStaticLibrary lib : sources : otherObjects
StaticLibrary $(lib) : $(sources) : $(otherObjects) ;
}
rule BuildPlatformStaticLibraryPIC target : sources : otherObjects
{
# Like BuildPlatformStaticLibrary, but producing position independent code.
ObjectCcFlags $(sources) : $(HOST_PIC_CCFLAGS) ;
ObjectC++Flags $(sources) : $(HOST_PIC_C++FLAGS) ;
BuildPlatformStaticLibrary $(target) : $(sources) : $(otherObjects) ;
}

View File

@ -414,6 +414,8 @@ extern void ktrace_vprintf(const char *format, va_list args);
#if __INTEL__
# define B_MAX_CPU_COUNT 8
#elif __x86_64__
# define B_MAX_CPU_COUNT 8
#elif __POWERPC__
# define B_MAX_CPU_COUNT 8
#elif __M68K__

View File

@ -66,7 +66,7 @@ TODO:
*defines a block in memory
*/
struct memblock {
const char name[16]; // the name will be used for debugging etc later perhapse...
const char name[16]; // the name will be used for debugging etc later perhaps...
addr_t start; // start of the block
addr_t end; // end of the block
uint32 flags; // which flags should be applied (device/normal etc..)