Added haiku_version_glue.o "glue code" containing the Haiku/ABI version
symbols recently introduced. Until init_term_dyn.o is linked into kernel add-ons, too, we link with haiku_version_glue.o, so we have those symbols in kernel add-ons as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b3f709b800
commit
c154b94624
@ -389,7 +389,8 @@ HAIKU_EXECUTABLE_BEGIN_GLUE_CODE =
|
||||
<src!system!glue>init_term_dyn.o
|
||||
;
|
||||
HAIKU_EXECUTABLE_END_GLUE_CODE = $(HAIKU_LIBRARY_END_GLUE_CODE) ;
|
||||
HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE = crtbegin.o ;
|
||||
HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE = crtbegin.o
|
||||
<src!system!glue>haiku_version_glue.o ;
|
||||
HAIKU_KERNEL_ADDON_END_GLUE_CODE = $(HAIKU_GCC_LIBGCC) crtend.o ;
|
||||
|
||||
SEARCH on crtbegin.o crtend.o = $(HAIKU_GCC_LIB_DIR) ;
|
||||
|
@ -237,9 +237,11 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ]
|
||||
# DevelopmentMin
|
||||
if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
|
||||
# glue code
|
||||
AddFilesToHaikuImage develop lib x86
|
||||
: <src!system!glue!arch!x86>crti.o <src!system!glue!arch!x86>crtn.o
|
||||
<src!system!glue>init_term_dyn.o <src!system!glue>start_dyn.o ;
|
||||
AddFilesToHaikuImage develop lib x86 :
|
||||
<src!system!glue!arch!x86>crti.o <src!system!glue!arch!x86>crtn.o
|
||||
<src!system!glue>init_term_dyn.o <src!system!glue>start_dyn.o
|
||||
<src!system!glue>haiku_version_glue.o
|
||||
;
|
||||
|
||||
# kernel
|
||||
AddFilesToHaikuImage develop lib x86 : kernel.so : _KERNEL_ ;
|
||||
|
@ -19,7 +19,7 @@ endif
|
||||
ifeq ($(NAME), )
|
||||
NAME = NameThisApp
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(TYPE), )
|
||||
TYPE = APP
|
||||
endif
|
||||
@ -30,7 +30,7 @@ endif
|
||||
|
||||
# specify that the binary should be created in the object directory
|
||||
# NOTE: make doesn't find the target if its name is enclosed in
|
||||
# quotation marks
|
||||
# quotation marks
|
||||
# TARGET := "$(OBJ_DIR)/$(NAME)"
|
||||
TARGET := $(OBJ_DIR)/$(NAME)
|
||||
|
||||
@ -50,7 +50,7 @@ ifeq ($(CPU), x86)
|
||||
# set the compiler and compiler flags
|
||||
CC = gcc
|
||||
|
||||
# SETTING: set the CFLAGS for each binary type
|
||||
# SETTING: set the CFLAGS for each binary type
|
||||
ifeq ($(TYPE), DRIVER)
|
||||
CFLAGS += -D_KERNEL_MODE=1 -no-fpic
|
||||
else
|
||||
@ -72,15 +72,15 @@ ifeq ($(CPU), x86)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# SETTING: set proper debugger flags
|
||||
ifeq ($(DEBUGGER), TRUE)
|
||||
DEBUG += -g
|
||||
OPTIMIZER = -O0
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
CFLAGS += $(OPTIMIZER) $(DEBUG)
|
||||
|
||||
# SETTING: set warning level
|
||||
@ -104,19 +104,20 @@ ifeq ($(CPU), x86)
|
||||
LDFLAGS += -nostart -Xlinker -soname=$(NAME)
|
||||
else
|
||||
ifeq ($(TYPE), DRIVER)
|
||||
LDFLAGS += -nostdlib /boot/develop/lib/x86/_KERNEL_
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
LDFLAGS += -nostdlib /boot/develop/lib/x86/_KERNEL_ \
|
||||
/boot/develop/lib/x86/haiku_version_glue.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
else
|
||||
|
||||
# ppc Settings
|
||||
ifeq ($(CPU), ppc)
|
||||
# set the compiler and compiler flags
|
||||
CC = mwcc
|
||||
CFLAGS +=
|
||||
CFLAGS +=
|
||||
|
||||
# SETTING: set the proper optimization level
|
||||
ifeq ($(OPTIMIZE), FULL)
|
||||
@ -137,7 +138,7 @@ ifeq ($(CPU), ppc)
|
||||
#set the proper debugger settings
|
||||
ifeq ($(DEBUGGER), TRUE)
|
||||
DEBUG += -g
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS += $(OPTIMIZER) $(DEBUG)
|
||||
|
||||
@ -159,10 +160,10 @@ ifeq ($(CPU), ppc)
|
||||
|
||||
# SETTING: set linker flags for each binary type
|
||||
ifeq ($(TYPE), APP)
|
||||
LDFLAGS +=
|
||||
LDFLAGS +=
|
||||
else
|
||||
ifeq ($(TYPE), SHARED)
|
||||
LDFLAGS += -xms
|
||||
LDFLAGS += -xms
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -179,10 +180,10 @@ ifeq ($(CPU), ppc)
|
||||
-lroot \
|
||||
/boot/develop/lib/ppc/glue-noinit.a \
|
||||
/boot/develop/lib/ppc/init_term_dyn.o \
|
||||
/boot/develop/lib/ppc/start_dyn.o
|
||||
endif
|
||||
|
||||
|
||||
/boot/develop/lib/ppc/start_dyn.o
|
||||
endif
|
||||
|
||||
|
||||
# SETTING: output symbols in an xMAP file
|
||||
ifeq ($(SYMBOLS), TRUE)
|
||||
LDFLAGS += -map $(TARGET).xMAP
|
||||
@ -249,7 +250,7 @@ LINK_LIBS += $(filter %.so %.a _APP_ _KERNEL_, $(LIBS))
|
||||
# prepend -l to each name: be becomes -lbe
|
||||
LINK_LIBS += $(foreach lib, $(filter-out %.so %.a _APP_ _KERNEL_, $(LIBS)), $(addprefix -l, $(lib)))
|
||||
|
||||
# add to the linker flags
|
||||
# add to the linker flags
|
||||
LDFLAGS += $(LINK_PATHS) $(LINK_LIBS)
|
||||
|
||||
# SETTING: add the defines to the compiler flags
|
||||
@ -269,9 +270,9 @@ else
|
||||
BUILD_LINE = $(LD) -o $@ $(OBJS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
# pseudo-function for converting a list of resource definition files in RDEFS
|
||||
# pseudo-function for converting a list of resource definition files in RDEFS
|
||||
# variable to a corresponding list of object files in $(OBJ_DIR)/xxx.rsrc
|
||||
# The "function" strips off the rdef file suffix (.rdef) and then strips
|
||||
# The "function" strips off the rdef file suffix (.rdef) and then strips
|
||||
# of the directory name, leaving just the root file name.
|
||||
# It then appends the .rsrc suffix and prepends the $(OBJ_DIR)/ path
|
||||
define RDEFS_LIST_TO_RSRCS
|
||||
@ -294,7 +295,7 @@ endef
|
||||
endif
|
||||
|
||||
|
||||
# define the actual work to be done
|
||||
# define the actual work to be done
|
||||
default: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJ_DIR) $(OBJS) $(RSRCS)
|
||||
|
@ -5,6 +5,7 @@ UsePrivateSystemHeaders ;
|
||||
KernelObjects
|
||||
init_term_dyn.c
|
||||
start_dyn.c
|
||||
haiku_version_glue.c
|
||||
;
|
||||
|
||||
SubInclude HAIKU_TOP src system glue arch ;
|
||||
|
@ -5,17 +5,12 @@
|
||||
|
||||
#include <user_runtime.h>
|
||||
#include <image.h>
|
||||
#include <image_defs.h>
|
||||
|
||||
#include "init_term_dyn.h"
|
||||
|
||||
|
||||
// Haiku API and ABI versions -- we compile those into shared objects so that
|
||||
// the runtime loader can discriminate the versions and enable compatibility
|
||||
// work-arounds, if necessary.
|
||||
|
||||
uint32 B_SHARED_OBJECT_HAIKU_VERSION_VARIABLE = B_HAIKU_VERSION;
|
||||
uint32 B_SHARED_OBJECT_HAIKU_ABI_VARIABLE = B_HAIKU_ABI;
|
||||
// include the version glue -- it's separate for the kernel add-ons only
|
||||
#include "haiku_version_glue.c"
|
||||
|
||||
|
||||
/** These functions are called from _init()/_fini() (in crti.S, crtn.S)
|
||||
|
Loading…
Reference in New Issue
Block a user