hrev51670 adds 2 changesets to branch 'master'
old head: 416460cf4a2428c78a49e09c9cc5431b99d946a4
new head: 02c9c92ae27a71f8e8d6dad25388b0f8a3292255
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=02c9c92ae27a+%5E416460cf4a24
----------------------------------------------------------------------------
82bffcc3a75c: headers/build: Reunify BeBuild.h and related cleanup.
Now that we do not target BeOS and also do not include the main headers
directory when building "build" binaries, we can drop the separate
config_build directory and thus also the separate BeBuild.h, and just
..-include the regular one.
The build BeBuild.h defined empty _IMPEXP_ROOT and _IMPEXP_BE preprocessor
macros that the regular one does not; so I also re-synchronized
headers which used these as needed.
02c9c92ae27a: BeBuild: Treat TinyCC as GCC4 ABI.
Since it's just a C compiler "technically" the ABI does not matter,
but since it also can target other ABIs from one toolchain (e.g. x64),
just treat it as GCC4 ABI unilaterally.
Fixes #13847.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
9 files changed, 12 insertions(+), 313 deletions(-)
headers/build/config/HaikuConfig.h | 1 +
headers/build/{config_build => config}/types.h | 2 +-
headers/build/config_build/HaikuConfig.h | 100 ------------------
headers/build/os/BeBuild.h | 83 +--------------
headers/build/os/app/Application.h | 4 +-
headers/build/os/kernel/image.h | 115 +--------------------
headers/build/os/support/Archivable.h | 14 +--
headers/build/os/support/SupportDefs.h | 2 +-
headers/os/BeBuild.h | 4 +-
############################################################################
Commit: 82bffcc3a75c7064cf7d031c01ad6c932a13cbce
URL: http://cgit.haiku-os.org/haiku/commit/?id=82bffcc3a75c
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Dec 12 00:15:47 2017 UTC
headers/build: Reunify BeBuild.h and related cleanup.
Now that we do not target BeOS and also do not include the main headers
directory when building "build" binaries, we can drop the separate
config_build directory and thus also the separate BeBuild.h, and just
..-include the regular one.
The build BeBuild.h defined empty _IMPEXP_ROOT and _IMPEXP_BE preprocessor
macros that the regular one does not; so I also re-synchronized
headers which used these as needed.
----------------------------------------------------------------------------
diff --git a/headers/build/config/HaikuConfig.h
b/headers/build/config/HaikuConfig.h
new file mode 100644
index 0000000..f9a1383
--- /dev/null
+++ b/headers/build/config/HaikuConfig.h
@@ -0,0 +1 @@
+#include <../config/HaikuConfig.h>
diff --git a/headers/build/config_build/types.h b/headers/build/config/types.h
similarity index 98%
rename from headers/build/config_build/types.h
rename to headers/build/config/types.h
index 960e1ce..7a05c18 100644
--- a/headers/build/config_build/types.h
+++ b/headers/build/config/types.h
@@ -6,7 +6,7 @@
#define _CONFIG_BUILD_TYPES_H
-#include <config_build/HaikuConfig.h>
+#include <config/HaikuConfig.h>
#include <inttypes.h>
diff --git a/headers/build/config_build/HaikuConfig.h
b/headers/build/config_build/HaikuConfig.h
deleted file mode 100644
index aba9b7f..0000000
--- a/headers/build/config_build/HaikuConfig.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2009-2010, Haiku, Inc. All Rights Reserved.
- * Distributed under the terms of the MIT License.
- */
-#ifndef _CONFIG_HAIKU_CONFIG_H
-#define _CONFIG_HAIKU_CONFIG_H
-
-
-/* Determine the architecture and define macros for some fundamental
- properties:
- __HAIKU_ARCH - short name of the
architecture (used in paths)
- __HAIKU_ARCH_<arch> - defined to 1 for the respective
architecture
- __HAIKU_ARCH_BITS - defined to 32/64 on 32/64 bit
architectures
- (defaults to
32)
- __HAIKU_ARCH_PHYSICAL_BITS - defined to 32/64 on architectures with 32/64
- (defaults to
__HAIKU_ARCH_BITS)
- __HAIKU_BIG_ENDIAN - defined to 1 on big endian
architectures
- (defaults to
undefined)
-*/
-#ifdef __INTEL__
-# define __HAIKU_ARCH x86
-# define __HAIKU_ARCH_X86 1
-#elif __x86_64__
-# define __HAIKU_ARCH x86_64
-# define __HAIKU_ARCH_X86_64 1
-# define __HAIKU_ARCH_BITS 64
-#elif __POWERPC__
-# define __HAIKU_ARCH ppc
-# define __HAIKU_ARCH_PPC 1
-# define __HAIKU_BIG_ENDIAN 1
-#elif __M68K__
-# define __HAIKU_ARCH m68k
-# define __HAIKU_ARCH_M68K 1
-# define __HAIKU_BIG_ENDIAN 1
-#elif __MIPSEL__
-# define __HAIKU_ARCH mipsel
-# define __HAIKU_ARCH_MIPSEL 1
-#elif __ARM__ || __ARMEL__
-# define __HAIKU_ARCH arm
-# define __HAIKU_ARCH_ARM 1
-#elif __ARMEB__
-# define __HAIKU_ARCH armeb
-# define __HAIKU_ARCH_ARM 1
-# define __HAIKU_BIG_ENDIAN 1
-#elif __AARCH64EL__
-# define __HAIKU_ARCH aarch64
-# define __HAIKU_ARCH_ARM 1
-# define __HAIKU_ARCH_BITS 64
-#else
-# error Unsupported architecture!
-#endif
-
-/* implied properties:
- __HAIKU_ARCH_{32,64}_BIT - defined to 1 on 32/64 bit
architectures, i.e.
- using 32/64
bit virtual addresses
- __HAIKU_ARCH_PHYSICAL_BITS - defined to 32/64 on architectures with 32/64
- bit physical
addresses
- __HAIKU_ARCH_PHYSICAL_{32,64}_BIT - defined to 1 on architectures using 64
- bit physical
addresses
- __HAIKU_BIG_ENDIAN - defined to 1 on big endian
architectures
-*/
-
-/* bitness */
-#ifndef __HAIKU_ARCH_BITS
-# define __HAIKU_ARCH_BITS 32
-#endif
-
-#if __HAIKU_ARCH_BITS == 32
-# define __HAIKU_ARCH_32_BIT 1
-#elif __HAIKU_ARCH_BITS == 64
-# define __HAIKU_ARCH_64_BIT 1
-#else
-# error Unsupported bitness!
-#endif
-
-/* physical bitness */
-#ifndef __HAIKU_ARCH_PHYSICAL_BITS
-# define __HAIKU_ARCH_PHYSICAL_BITS __HAIKU_ARCH_BITS
-#endif
-
-#if __HAIKU_ARCH_PHYSICAL_BITS == 32
-# define __HAIKU_ARCH_PHYSICAL_32_BIT 1
-#elif __HAIKU_ARCH_PHYSICAL_BITS == 64
-# define __HAIKU_ARCH_PHYSICAL_64_BIT 1
-#else
-# error Unsupported physical bitness!
-#endif
-
-/* endianess */
-#ifndef __HAIKU_BIG_ENDIAN
-# define __HAIKU_LITTLE_ENDIAN 1
-#endif
-
-/* architecture specific include macros */
-#define __HAIKU_ARCH_HEADER(header)
<arch/__HAIKU_ARCH/header>
-#define __HAIKU_SUBDIR_ARCH_HEADER(subdir, header) \
- <subdir/arch/__HAIKU_ARCH/header>
-
-
-#endif /* _CONFIG_HAIKU_CONFIG_H */
diff --git a/headers/build/os/BeBuild.h b/headers/build/os/BeBuild.h
index 40ed479..8fcabb1 100644
--- a/headers/build/os/BeBuild.h
+++ b/headers/build/os/BeBuild.h
@@ -1,82 +1 @@
-/*
- * Copyright 2007-2010, Haiku, Inc. All Rights Reserved.
- * Distributed under the terms of the MIT License.
- */
-#ifndef _BE_BUILD_H
-#define _BE_BUILD_H
-
-
-#include <config_build/HaikuConfig.h>
-
-
-#define B_BEOS_VERSION_4 0x0400
-#define B_BEOS_VERSION_4_5 0x0450
-#define B_BEOS_VERSION_5 0x0500
-
-#define B_BEOS_VERSION B_BEOS_VERSION_5
-#define B_BEOS_VERSION_MAUI B_BEOS_VERSION_5
-
-/* Haiku (API) version */
-#define B_HAIKU_VERSION_BEOS 0x00000001
-#define B_HAIKU_VERSION_BONE 0x00000002
-#define B_HAIKU_VERSION_DANO 0x00000003
-#define B_HAIKU_VERSION_1_ALPHA_1 0x00000100
-#define B_HAIKU_VERSION_1_PRE_ALPHA_2 0x00000101
-#define B_HAIKU_VERSION_1 0x00010000
-
-#define B_HAIKU_VERSION
B_HAIKU_VERSION_1_PRE_ALPHA_2
-
-/* Haiku ABI */
-#define B_HAIKU_ABI_MAJOR 0xffff0000
-#define B_HAIKU_ABI_GCC_2 0x00020000
-#define B_HAIKU_ABI_GCC_4 0x00040000
-
-#define B_HAIKU_ABI_GCC_2_ANCIENT 0x00020000
-#define B_HAIKU_ABI_GCC_2_BEOS 0x00020001
-#define B_HAIKU_ABI_GCC_2_HAIKU 0x00020002
-
-#if __GNUC__ == 2
-# define B_HAIKU_ABI
B_HAIKU_ABI_GCC_2_HAIKU
-#elif __GNUC__ >= 3 && __GNUC__ <= 8
-# define B_HAIKU_ABI
B_HAIKU_ABI_GCC_4
-#else
-# error Unsupported gcc version!
-#endif
-
-
-#define B_HAIKU_BITS __HAIKU_ARCH_BITS
-#define B_HAIKU_PHYSICAL_BITS __HAIKU_ARCH_PHYSICAL_BITS
-
-#ifdef __HAIKU_ARCH_64_BIT
-# define B_HAIKU_64_BIT 1
-#else
-# define B_HAIKU_32_BIT 1
-#endif
-
-#ifdef __HAIKU_ARCH_PHYSICAL_64_BIT
-# define B_HAIKU_PHYSICAL_64_BIT 1
-#else
-# define B_HAIKU_PHYSICAL_32_BIT 1
-#endif
-
-#ifdef __HAIKU_BEOS_COMPATIBLE
-# define B_HAIKU_BEOS_COMPATIBLE 1
-#endif
-
-
-#define _UNUSED(argument) argument
-#define _PACKED __attribute__((packed))
-#define _PRINTFLIKE(_format_, _args_) \
- __attribute__((format(__printf__, _format_, _args_)))
-#define _EXPORT
-#define _IMPORT
-
-#define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol) \
- __asm__(".symver " function "," versionedSymbol)
-
-
-#define _IMPEXP_ROOT
-#define _IMPEXP_BE
-
-
-#endif /* _BE_BUILD_H */
+#include <../os/BeBuild.h>
diff --git a/headers/build/os/app/Application.h
b/headers/build/os/app/Application.h
index 83ffa86..5a34246 100644
--- a/headers/build/os/app/Application.h
+++ b/headers/build/os/app/Application.h
@@ -26,7 +26,7 @@ public:
// Global Objects
-extern _IMPEXP_BE BApplication* be_app;
-extern _IMPEXP_BE BMessenger be_app_messenger;
+extern BApplication* be_app;
+extern BMessenger be_app_messenger;
#endif // _APPLICATION_H
diff --git a/headers/build/os/kernel/image.h b/headers/build/os/kernel/image.h
index 638008f..5742a80 100644
--- a/headers/build/os/kernel/image.h
+++ b/headers/build/os/kernel/image.h
@@ -1,114 +1 @@
-/******************************************************************************
-/
-/ File: image.h
-/
-/ Description: Kernel interface for managing executable images.
-/
-/ Copyright 1993-98, Be Incorporated
-/
-******************************************************************************/
-
-#ifndef _IMAGE_H
-#define _IMAGE_H
-
-#include <BeBuild.h>
-#include <OS.h>
-#include <sys/param.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*---------------------------------------------------------*/
-/*----- Image types, info, and functions ------------------*/
-
-#define B_INIT_BEFORE_FUNCTION_NAME "initialize_before"
-#define B_INIT_AFTER_FUNCTION_NAME "initialize_after"
-#define B_TERM_BEFORE_FUNCTION_NAME "terminate_before"
-#define B_TERM_AFTER_FUNCTION_NAME "terminate_after"
-
-typedef int32 image_id;
-
-typedef enum {
- B_APP_IMAGE = 1,
- B_LIBRARY_IMAGE,
- B_ADD_ON_IMAGE,
- B_SYSTEM_IMAGE
-} image_type;
-
-typedef struct {
- image_id id;
- image_type type;
- int32 sequence;
- int32 init_order;
- void (*init_routine)();
- void (*term_routine)();
- dev_t device;
- ino_t node;
- char name[MAXPATHLEN];
- void *text;
- void *data;
- int32 text_size;
- int32 data_size;
-} image_info;
-
-// flags for _kern_load_image()
-enum {
- B_WAIT_TILL_LOADED = 0x01, // Wait till the loader has loaded and
relocated
- // (but not yet
initialized) the application
- // image and
all dependencies. If not supplied,
- // the function
returns before the loader
- // started to
do anything at all, i.e. it
- // returns
success, even if the executable
- // doesn't
exist.
-};
-
-extern _IMPEXP_ROOT thread_id load_image(int32 argc, const char **argv,
- const
char **envp);
-extern _IMPEXP_ROOT image_id load_add_on(const char *path);
-extern _IMPEXP_ROOT status_t unload_add_on(image_id imageID);
-
-/* private; use the macros, below */
-extern _IMPEXP_ROOT status_t _get_image_info (image_id imageID,
-
image_info *info, size_t size);
-extern _IMPEXP_ROOT status_t _get_next_image_info (team_id team, int32
*cookie,
-
image_info *info, size_t size);
-/* use these */
-#define get_image_info(image, info) \
- _get_image_info((image), (info), sizeof(*(info)))
-#define get_next_image_info(team, cookie, info) \
- _get_next_image_info((team), (cookie), (info),
sizeof(*(info)))
-
-
-/*---------------------------------------------------------*/
-/*----- symbol types and functions ------------------------*/
-
-#define B_SYMBOL_TYPE_DATA 0x1
-#define B_SYMBOL_TYPE_TEXT 0x2
-#define B_SYMBOL_TYPE_ANY 0x5
-
-extern _IMPEXP_ROOT status_t get_image_symbol(image_id imid,
- const
char *name, int32 sclass, void **ptr);
-extern _IMPEXP_ROOT status_t get_nth_image_symbol(image_id imid, int32 index,
- char
*buf, int32 *bufsize, int32 *sclass,
- void
**ptr);
-
-
-/*---------------------------------------------------------*/
-/*----- cache manipulation --------------------------------*/
-
-#define B_FLUSH_DCACHE 0x0001 /* dcache = data cache */
-#define B_FLUSH_ICACHE 0x0004 /* icache = instruction cache */
-#define B_INVALIDATE_DCACHE 0x0002
-#define B_INVALIDATE_ICACHE 0x0008
-
-extern _IMPEXP_ROOT void clear_caches(void *addr, size_t len, uint32
flags);
-
-/*---------------------------------------------------------*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _IMAGE_H */
+#include <../os/kernel/image.h>
diff --git a/headers/build/os/support/Archivable.h
b/headers/build/os/support/Archivable.h
index ec9d9b0..aeaefd9 100644
--- a/headers/build/os/support/Archivable.h
+++ b/headers/build/os/support/Archivable.h
@@ -49,7 +49,7 @@ class BMessage;
class BArchivable {
public:
BArchivable();
- virtual ~BArchivable();
+ virtual ~BArchivable();
BArchivable(BMessage* from);
virtual status_t Archive(BMessage* into, bool deep = true) const;
@@ -70,9 +70,9 @@ private:
// Global Functions
------------------------------------------------------------
-typedef BArchivable* (*instantiation_func) (BMessage *);
+typedef BArchivable* (*instantiation_func) (BMessage *);
-_IMPEXP_BE bool
validate_instantiation(BMessage* from,
+bool validate_instantiation(BMessage* from,
const char* class_name);
@@ -80,11 +80,3 @@ _IMPEXP_BE bool
validate_instantiation(BMessage* from,
#endif // _ARCHIVABLE_H
-
-/*
- * $Log $
- *
- * $Id $
- *
- */
-
diff --git a/headers/build/os/support/SupportDefs.h
b/headers/build/os/support/SupportDefs.h
index f400fd3..13ac989 100644
--- a/headers/build/os/support/SupportDefs.h
+++ b/headers/build/os/support/SupportDefs.h
@@ -1,2 +1,2 @@
-#include <config_build/types.h>
+#include <config/types.h>
#include <../os/support/SupportDefs.h>
############################################################################
Revision: hrev51670
Commit: 02c9c92ae27a71f8e8d6dad25388b0f8a3292255
URL: http://cgit.haiku-os.org/haiku/commit/?id=02c9c92ae27a
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Dec 12 00:28:45 2017 UTC
Ticket: https://dev.haiku-os.org/ticket/13847
BeBuild: Treat TinyCC as GCC4 ABI.
Since it's just a C compiler "technically" the ABI does not matter,
but since it also can target other ABIs from one toolchain (e.g. x64),
just treat it as GCC4 ABI unilaterally.
Fixes #13847.
----------------------------------------------------------------------------
diff --git a/headers/os/BeBuild.h b/headers/os/BeBuild.h
index 3bf2acf..5a34a95 100644
--- a/headers/os/BeBuild.h
+++ b/headers/os/BeBuild.h
@@ -45,10 +45,10 @@
#if __GNUC__ == 2
# define B_HAIKU_ABI
B_HAIKU_ABI_GCC_2_HAIKU
-#elif __GNUC__ >= 4 && __GNUC__ <= 8
+#elif (__GNUC__ >= 4 && __GNUC__ <= 8) || defined(__TINYC__)
# define B_HAIKU_ABI
B_HAIKU_ABI_GCC_4
#else
-# error Unsupported gcc version!
+# error Unsupported compiler!
#endif