From 353d20c0c5f19d1120a8acb0f4f7f3b266da730f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 27 Nov 2005 13:31:50 +0000 Subject: [PATCH] * libroot and the runtime loader are no longer built with kernel rules. * New rule Ld, analogously to KernelLd. * Added StaticLibrary parameter for supplying additional objects. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15191 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/MainBuildRules | 93 +++-- src/system/boot/Jamfile | 10 +- src/system/kernel/lib/Jamfile | 21 +- src/system/libroot/Jamfile | 2 + src/system/libroot/os/Jamfile | 10 +- src/system/libroot/os/arch/Jamfile | 1 - src/system/libroot/os/arch/ppc/Jamfile | 24 +- src/system/libroot/os/arch/x86/Jamfile | 13 +- src/system/libroot/os/driver_settings.c | 7 +- src/system/libroot/posix/Jamfile | 8 +- src/system/libroot/posix/arch/Jamfile | 3 - src/system/libroot/posix/arch/x86/Jamfile | 5 +- src/system/libroot/posix/crypt/Jamfile | 16 +- .../libroot/posix/glibc/arch/ppc/Jamfile | 5 +- .../libroot/posix/glibc/arch/x86/Jamfile | 5 +- src/system/libroot/posix/glibc/ctype/Jamfile | 5 +- .../libroot/posix/glibc/extensions/Jamfile | 5 +- src/system/libroot/posix/glibc/libio/Jamfile | 337 +++++++++--------- src/system/libroot/posix/glibc/locale/Jamfile | 5 +- src/system/libroot/posix/glibc/regex/Jamfile | 6 +- .../libroot/posix/glibc/stdio-common/Jamfile | 74 ++-- src/system/libroot/posix/glibc/stdlib/Jamfile | 5 +- src/system/libroot/posix/glibc/wcsmbs/Jamfile | 5 +- src/system/libroot/posix/glibc/wctype/Jamfile | 5 +- src/system/libroot/posix/locale/Jamfile | 5 +- src/system/libroot/posix/malloc/Jamfile | 6 +- src/system/libroot/posix/math/Jamfile | 9 +- src/system/libroot/posix/math/arch/Jamfile | 3 - .../libroot/posix/math/arch/ppc/Jamfile | 14 +- .../libroot/posix/math/arch/x86/Jamfile | 6 +- src/system/libroot/posix/pthread/Jamfile | 5 +- src/system/libroot/posix/signal/Jamfile | 15 +- src/system/libroot/posix/stdio/Jamfile | 11 +- src/system/libroot/posix/stdlib/Jamfile | 6 +- src/system/libroot/posix/string/Jamfile | 6 +- src/system/libroot/posix/sys/Jamfile | 7 +- src/system/libroot/posix/time/Jamfile | 6 +- src/system/libroot/posix/unistd/Jamfile | 7 +- src/system/runtime_loader/Jamfile | 50 +-- 39 files changed, 407 insertions(+), 419 deletions(-) delete mode 100644 src/system/libroot/os/arch/Jamfile delete mode 100644 src/system/libroot/posix/arch/Jamfile delete mode 100644 src/system/libroot/posix/math/arch/Jamfile diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules index 7f9a85730d..53b828392e 100644 --- a/build/jam/MainBuildRules +++ b/build/jam/MainBuildRules @@ -5,30 +5,33 @@ rule AddSharedObjectGlueCode # we link with -nostdlib and add the required libs manually, when building # for Haiku - local platform = [ on $(1) return $(PLATFORM) ] ; - if $(platform) = haiku { - local stdLibs = libroot.so ; - local beginGlue ; - local endGlue ; - if $(2) = true { - beginGlue += $(HAIKU_EXECUTABLE_BEGIN_GLUE_CODE) ; - endGlue += $(HAIKU_EXECUTABLE_END_GLUE_CODE) ; - } else { - beginGlue += $(HAIKU_LIBRARY_BEGIN_GLUE_CODE) ; - endGlue += $(HAIKU_LIBRARY_END_GLUE_CODE) ; + local platform ; + on $(1) { + platform = $(PLATFORM) ; + if $(platform) = haiku { + local stdLibs = libroot.so ; + local beginGlue ; + local endGlue ; + if $(2) = true { + beginGlue += $(HAIKU_EXECUTABLE_BEGIN_GLUE_CODE) ; + endGlue += $(HAIKU_EXECUTABLE_END_GLUE_CODE) ; + } else { + beginGlue += $(HAIKU_LIBRARY_BEGIN_GLUE_CODE) ; + endGlue += $(HAIKU_LIBRARY_END_GLUE_CODE) ; - # special case for libroot: don't link it against itself - if $(1) = libroot.so { - stdLibs = ; + # special case for libroot: don't link it against itself + if $(DONT_LINK_AGAINST_LIBROOT) { + stdLibs = ; + } } - } - LINK_BEGIN_GLUE on $(1) = $(beginGlue) ; - LINK_END_GLUE on $(1) = $(endGlue) ; - - NEEDLIBS on $(1) = $(stdLibs) [ on $(1) return $(NEEDLIBS) ] ; - Depends $(1) : $(stdLibs) $(beginGlue) $(endGlue) ; - LINKFLAGS on $(1) = [ on $(1) return $(LINKFLAGS) ] -nostdlib ; + LINK_BEGIN_GLUE on $(1) = $(beginGlue) ; + LINK_END_GLUE on $(1) = $(endGlue) ; + + NEEDLIBS on $(1) = $(stdLibs) [ on $(1) return $(NEEDLIBS) ] ; + Depends $(1) : $(stdLibs) $(beginGlue) $(endGlue) ; + LINKFLAGS on $(1) = [ on $(1) return $(LINKFLAGS) ] -nostdlib ; + } } # link against the compatibility libraries needed for the target @@ -139,13 +142,15 @@ rule ScreenSaver rule StaticLibrary { - # StaticLibrary : ; + # StaticLibrary : : ; # Creates a static library from sources. # : The static library to be built. - # : List of source files. + # : List of source files. + # : List of additional object files. # local lib = $(1) ; local sources = [ FGristFiles $(2) ] ; + local otherObjects = $(3) ; local objects = $(sources:S=$(SUFOBJ)) ; if ! [ IsPlatformSupportedForTarget $(1) ] { @@ -154,7 +159,7 @@ rule StaticLibrary InheritPlatform $(objects) : $(lib) ; - StaticLibraryFromObjects $(lib) : $(objects) ; + StaticLibraryFromObjects $(lib) : $(objects) $(otherObjects) ; Objects $(2) ; } @@ -167,6 +172,46 @@ rule StaticLibraryFromObjects LibraryFromObjects $(1) : $(2) ; } +rule Ld +{ + # Ld : : : ; + # + local target = $(1) ; + local objects = $(2) ; + local linkerScript = $(3) ; + local linkerFlags = $(4) ; + + if $(linkerScript) { + linkerFlags += --script=$(linkerScript) ; + } + + on $(target) { + if $(PLATFORM) = host { + LINK on $(target) = $(HOST_LD) ; + LINKFLAGS on $(target) = $(HOST_LDFLAGS) $(LINKFLAGS) $(linkerFlags) ; + } else { + LINK on $(target) = $(TARGET_LD) ; + LINKFLAGS on $(target) = $(TARGET_LDFLAGS) $(LINKFLAGS) + $(linkerFlags) ; + } + + NEEDLIBS on $(target) = $(NEEDLIBS) ; + LINKLIBS on $(target) = $(LINKLIBS) ; + } + + LocalClean clean : $(target) ; + LocalDepends all : $(target) ; + Depends $(target) : $(objects) ; + + MakeLocateDebug $(target) ; +} + +actions Ld +{ + $(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" "$(NEEDLIBS)" $(LINKLIBS) +} + + rule MergeObjectFromObjects { # MergeObjectFromObjects : : ; diff --git a/src/system/boot/Jamfile b/src/system/boot/Jamfile index 1669c934c3..a8a5547e0e 100644 --- a/src/system/boot/Jamfile +++ b/src/system/boot/Jamfile @@ -1,11 +1,7 @@ SubDir HAIKU_TOP src system boot ; -KernelObjects byteorder.S ; - -SEARCH on [ FGristFiles byteorder.S ] - = [ FDirName $(HAIKU_TOP) src system libroot os arch $(TARGET_ARCH) ] ; - local librootFunctions = + byteorder.o ctype.o qsort.o kernel_vsprintf.o @@ -44,14 +40,12 @@ KernelLd boot_loader : # kernel) $(librootFunctions:G=src!system!kernel!lib) - [ FGristFiles byteorder.o ] - # other kernel objects cpuid.o : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader.ld : -Bstatic - ; +; rule BuildZbeos { local zbeos = $(1) ; diff --git a/src/system/kernel/lib/Jamfile b/src/system/kernel/lib/Jamfile index 67ca4d4d19..b72a0f1f36 100644 --- a/src/system/kernel/lib/Jamfile +++ b/src/system/kernel/lib/Jamfile @@ -1,17 +1,11 @@ SubDir HAIKU_TOP src system kernel lib ; -#UsePrivateHeaders libroot ; - # kernel libroot os files -# until the build system is fixed (and no longer uses kernel build rules -# for libroot.so), the KERNEL_OS_MAIN is needed to differentiate between -# kernel and userland builds here - KernelMergeObject kernel_os_main.o : driver_settings.c fs_info.c - : -fno-pic -DKERNEL_OS_MAIN + : -fno-pic ; SEARCH on [ FGristFiles driver_settings.c fs_info.c ] @@ -19,7 +13,8 @@ SEARCH on [ FGristFiles driver_settings.c fs_info.c ] # kernel libroot posix files -local posixSources = [ FDirName $(HAIKU_TOP) src system libroot posix ] ; +local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ; +local posixSources = [ FDirName $(librootSources) posix ] ; SEARCH_SOURCE += [ FDirName $(posixSources) ] ; SEARCH_SOURCE += [ FDirName $(posixSources) locale ] ; @@ -110,3 +105,13 @@ KernelMergeObject kernel_posix.o : : -fno-pic ; + +SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ; + +KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o : + atomic.S + byteorder.S + system_time.S + + : -fno-pic +; diff --git a/src/system/libroot/Jamfile b/src/system/libroot/Jamfile index 8ded7d9cc5..d7e97b072f 100644 --- a/src/system/libroot/Jamfile +++ b/src/system/libroot/Jamfile @@ -38,6 +38,8 @@ local librootObjects = posix_unistd.o ; +DONT_LINK_AGAINST_LIBROOT on libroot.so = true ; + SharedLibrary libroot.so : libroot_init.c diff --git a/src/system/libroot/os/Jamfile b/src/system/libroot/os/Jamfile index d81c1fcaf1..b0fdf59e06 100644 --- a/src/system/libroot/os/Jamfile +++ b/src/system/libroot/os/Jamfile @@ -1,6 +1,8 @@ SubDir HAIKU_TOP src system libroot os ; -KernelMergeObject os_main.o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject os_main.o : area.c atomic.c debug.c @@ -21,11 +23,9 @@ KernelMergeObject os_main.o : thread.c time.c syscalls.S - : - -fPIC -DPIC - ; +; # We need to specify the dependency on the generated syscalls file explicitly. Depends [ FGristFiles syscalls.o ] : syscalls.S.inc ; -SubInclude HAIKU_TOP src system libroot os arch ; +SubInclude HAIKU_TOP src system libroot os arch $(TARGET_ARCH) ; diff --git a/src/system/libroot/os/arch/Jamfile b/src/system/libroot/os/arch/Jamfile deleted file mode 100644 index 7f44940fe4..0000000000 --- a/src/system/libroot/os/arch/Jamfile +++ /dev/null @@ -1 +0,0 @@ -SubInclude HAIKU_TOP src system libroot os arch $(TARGET_ARCH) ; diff --git a/src/system/libroot/os/arch/ppc/Jamfile b/src/system/libroot/os/arch/ppc/Jamfile index d6d86fd672..cd3fbb3134 100644 --- a/src/system/libroot/os/arch/ppc/Jamfile +++ b/src/system/libroot/os/arch/ppc/Jamfile @@ -1,18 +1,12 @@ SubDir HAIKU_TOP src system libroot os arch ppc ; -KernelMergeObject os_arch_$(TARGET_ARCH).o : - <$(SOURCE_GRIST)>atomic.S - <$(SOURCE_GRIST)>byteorder.S -# <$(SOURCE_GRIST)>systeminfo.c - <$(SOURCE_GRIST)>system_time.S - <$(SOURCE_GRIST)>thread.c - <$(SOURCE_GRIST)>tls.c - : - -fPIC -DPIC - ; +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; -MergeObjectFromObjects kernel_os_arch_$(TARGET_ARCH).o : - <$(SOURCE_GRIST)>atomic.o - <$(SOURCE_GRIST)>byteorder.o - <$(SOURCE_GRIST)>system_time.o - ; +MergeObject os_arch_$(TARGET_ARCH).o : + atomic.S + byteorder.S +# systeminfo.c + system_time.S + thread.c + tls.c +; diff --git a/src/system/libroot/os/arch/x86/Jamfile b/src/system/libroot/os/arch/x86/Jamfile index 489cd64f47..4fb1abe019 100644 --- a/src/system/libroot/os/arch/x86/Jamfile +++ b/src/system/libroot/os/arch/x86/Jamfile @@ -1,6 +1,8 @@ SubDir HAIKU_TOP src system libroot os arch x86 ; -KernelMergeObject os_arch_$(TARGET_ARCH).o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject os_arch_$(TARGET_ARCH).o : atomic.S byteorder.S compatibility.c @@ -10,11 +12,4 @@ KernelMergeObject os_arch_$(TARGET_ARCH).o : thread.c time.c tls.c - : -fPIC -DPIC - ; - -MergeObjectFromObjects kernel_os_arch_$(TARGET_ARCH).o : - <$(SOURCE_GRIST)>atomic.o - <$(SOURCE_GRIST)>byteorder.o - <$(SOURCE_GRIST)>system_time.o - ; +; diff --git a/src/system/libroot/os/driver_settings.c b/src/system/libroot/os/driver_settings.c index ac058fc9cd..35a561ab26 100644 --- a/src/system/libroot/os/driver_settings.c +++ b/src/system/libroot/os/driver_settings.c @@ -22,10 +22,9 @@ * _BOOT_MODE for the boot loader, and _KERNEL_MODE for the kernel). */ -#ifndef KERNEL_OS_MAIN -// ToDo: our build system is broken and compiles libroot.so stuff using kernel -// build rules - we use this mechanism to make sure we only get what we want. -// This can be removed once the build system works as it should. +// The boot loader is compiled with kernel rules, but we want to explicitely +// discriminate between the two here. +#ifdef _BOOT_MODE # undef _KERNEL_MODE #endif diff --git a/src/system/libroot/posix/Jamfile b/src/system/libroot/posix/Jamfile index e2cc3882e9..eb76ba1c7a 100644 --- a/src/system/libroot/posix/Jamfile +++ b/src/system/libroot/posix/Jamfile @@ -1,8 +1,9 @@ SubDir HAIKU_TOP src system libroot posix ; UsePrivateHeaders [ FDirName syslog_daemon ] ; +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; -KernelMergeObject posix_main.o : +MergeObject posix_main.o : assert.c dlfcn.c dirent.c @@ -16,10 +17,9 @@ KernelMergeObject posix_main.o : syslog.cpp termios.c utime.c - : -fPIC -DPIC - ; +; -SubInclude HAIKU_TOP src system libroot posix arch ; +SubInclude HAIKU_TOP src system libroot posix arch $(TARGET_ARCH) ; SubInclude HAIKU_TOP src system libroot posix crypt ; SubInclude HAIKU_TOP src system libroot posix locale ; diff --git a/src/system/libroot/posix/arch/Jamfile b/src/system/libroot/posix/arch/Jamfile deleted file mode 100644 index d919d185a0..0000000000 --- a/src/system/libroot/posix/arch/Jamfile +++ /dev/null @@ -1,3 +0,0 @@ -SubDir HAIKU_TOP src system libroot posix arch ; - -SubInclude HAIKU_TOP src system libroot posix arch $(TARGET_ARCH) ; diff --git a/src/system/libroot/posix/arch/x86/Jamfile b/src/system/libroot/posix/arch/x86/Jamfile index 059ca59bdd..b15aa17b83 100644 --- a/src/system/libroot/posix/arch/x86/Jamfile +++ b/src/system/libroot/posix/arch/x86/Jamfile @@ -1,9 +1,8 @@ SubDir HAIKU_TOP src system libroot posix arch x86 ; -KernelMergeObject posix_arch_$(TARGET_ARCH).o : +MergeObject posix_arch_$(TARGET_ARCH).o : setjmp.S setjmp_save_sigs.c sigsetjmp.S siglongjmp.S - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/crypt/Jamfile b/src/system/libroot/posix/crypt/Jamfile index 9782acaca6..a90b956f5b 100644 --- a/src/system/libroot/posix/crypt/Jamfile +++ b/src/system/libroot/posix/crypt/Jamfile @@ -1,20 +1,10 @@ SubDir HAIKU_TOP src system libroot posix crypt ; # filter warnings we don't want here -# Note: TARGET_KERNEL_WARNING_CCFLAGS is no config variable, therefore we need -# to save and restore the original value. -TARGET_WARNING_CCFLAGS = [ FFilter $(CTARGET_WARNING_CCFLAGS) +TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS) : -Wall -Wmissing-prototypes -Wsign-compare ] ; -local original_TARGET_KERNEL_WARNING_CCFLAGS = $(TARGET_KERNEL_WARNING_CCFLAGS) ; -TARGET_KERNEL_WARNING_CCFLAGS = [ FFilter $(TARGET_KERNEL_WARNING_CCFLAGS) - : -Wall -Wmissing-prototypes -Wsign-compare ] ; - -KernelMergeObject posix_crypt.o : +MergeObject posix_crypt.o : crypt.c crypt_util.c - : -fPIC -DPIC - ; - -# restore TARGET_KERNEL_WARNING_CCFLAGS -TARGET_KERNEL_WARNING_CCFLAGS = $(original_TARGET_KERNEL_WARNING_CCFLAGS) ; +; diff --git a/src/system/libroot/posix/glibc/arch/ppc/Jamfile b/src/system/libroot/posix/glibc/arch/ppc/Jamfile index 48ca27b0b8..979ce22a59 100644 --- a/src/system/libroot/posix/glibc/arch/ppc/Jamfile +++ b/src/system/libroot/posix/glibc/arch/ppc/Jamfile @@ -1,13 +1,12 @@ SubDir HAIKU_TOP src system libroot posix arch ppc ; -KernelMergeObject posix_arch_$(TARGET_ARCH).o : +MergeObject posix_arch_$(TARGET_ARCH).o : s_ceilf.c s_floorf.c s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c - : -fPIC -DPIC - ; +; SEARCH on [ FGristFiles s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c diff --git a/src/system/libroot/posix/glibc/arch/x86/Jamfile b/src/system/libroot/posix/glibc/arch/x86/Jamfile index 25ba9f52e5..96c6338f0f 100644 --- a/src/system/libroot/posix/glibc/arch/x86/Jamfile +++ b/src/system/libroot/posix/glibc/arch/x86/Jamfile @@ -15,7 +15,7 @@ DEBUG = 0 ; SubDirCcFlags -D_GNU_SOURCE -D_IEEE_LIBM ; -KernelMergeObject posix_gnu_arch_$(TARGET_ARCH).o : +MergeObject posix_gnu_arch_$(TARGET_ARCH).o : add_n.S addmul_1.S cmp.c @@ -76,8 +76,7 @@ KernelMergeObject posix_gnu_arch_$(TARGET_ARCH).o : w_fmod.c w_fmodf.c w_fmodl.c - : -fPIC -DPIC - ; +; SEARCH on [ FGristFiles cmp.c divrem.c mul.c mul_n.c dbl2mpn.c mpn2dbl.c s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c s_modf.c s_modff.c s_modfl.c diff --git a/src/system/libroot/posix/glibc/ctype/Jamfile b/src/system/libroot/posix/glibc/ctype/Jamfile index 842400a1ce..42e1d17905 100644 --- a/src/system/libroot/posix/glibc/ctype/Jamfile +++ b/src/system/libroot/posix/glibc/ctype/Jamfile @@ -7,8 +7,7 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; -KernelMergeObject posix_gnu_ctype.o : +MergeObject posix_gnu_ctype.o : ctype.c ctype-info.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/glibc/extensions/Jamfile b/src/system/libroot/posix/glibc/extensions/Jamfile index 0547374548..8909147031 100644 --- a/src/system/libroot/posix/glibc/extensions/Jamfile +++ b/src/system/libroot/posix/glibc/extensions/Jamfile @@ -7,11 +7,10 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; -KernelMergeObject posix_gnu_ext.o : +MergeObject posix_gnu_ext.o : getopt.c getopt1.c getopt_init.c obstack.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/glibc/libio/Jamfile b/src/system/libroot/posix/glibc/libio/Jamfile index a9a5a7d565..9563d21f56 100644 --- a/src/system/libroot/posix/glibc/libio/Jamfile +++ b/src/system/libroot/posix/glibc/libio/Jamfile @@ -13,183 +13,174 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc iconv ; # obprintf() is also disabled, because we don't have # obstack functionality -KernelMergeObject posix_gnu_libio.o : - <$(SOURCE_GRIST)>clearerr.c - <$(SOURCE_GRIST)>clearerr_u.c - <$(SOURCE_GRIST)>fcloseall.c - <$(SOURCE_GRIST)>feof.c - <$(SOURCE_GRIST)>feof_u.c - <$(SOURCE_GRIST)>ferror.c - <$(SOURCE_GRIST)>ferror_u.c - <$(SOURCE_GRIST)>fileno.c - <$(SOURCE_GRIST)>filedoalloc.c - <$(SOURCE_GRIST)>fileops.c - <$(SOURCE_GRIST)>flockfile.c - <$(SOURCE_GRIST)>fputc.c - <$(SOURCE_GRIST)>fputc_u.c - <$(SOURCE_GRIST)>freopen.c - <$(SOURCE_GRIST)>fseek.c - <$(SOURCE_GRIST)>fseeko.c - <$(SOURCE_GRIST)>ftello.c - <$(SOURCE_GRIST)>fwide.c - <$(SOURCE_GRIST)>genops.c - <$(SOURCE_GRIST)>getc.c - <$(SOURCE_GRIST)>getc_u.c - <$(SOURCE_GRIST)>getchar.c - <$(SOURCE_GRIST)>getchar_u.c - <$(SOURCE_GRIST)>iofclose.c - <$(SOURCE_GRIST)>iofdopen.c - <$(SOURCE_GRIST)>iofflush.c - <$(SOURCE_GRIST)>iofgetpos.c - <$(SOURCE_GRIST)>iofgets.c - <$(SOURCE_GRIST)>iofgets_u.c - <$(SOURCE_GRIST)>iofopen.c - <$(SOURCE_GRIST)>iofputs.c - <$(SOURCE_GRIST)>iofputs_u.c - <$(SOURCE_GRIST)>iofread.c - <$(SOURCE_GRIST)>iofread_u.c - <$(SOURCE_GRIST)>iofsetpos.c - <$(SOURCE_GRIST)>ioftell.c - <$(SOURCE_GRIST)>iofwrite.c - <$(SOURCE_GRIST)>iofwrite_u.c - <$(SOURCE_GRIST)>iofwide.c - <$(SOURCE_GRIST)>iogetdelim.c - <$(SOURCE_GRIST)>iogetline.c - <$(SOURCE_GRIST)>iogets.c - <$(SOURCE_GRIST)>iopadn.c - <$(SOURCE_GRIST)>iopopen.c - <$(SOURCE_GRIST)>ioputs.c - <$(SOURCE_GRIST)>ioseekoff.c - <$(SOURCE_GRIST)>ioseekpos.c - <$(SOURCE_GRIST)>iosetbuffer.c - <$(SOURCE_GRIST)>iosetvbuf.c - <$(SOURCE_GRIST)>ioungetc.c - <$(SOURCE_GRIST)>iovdprintf.c - <$(SOURCE_GRIST)>iovsprintf.c - <$(SOURCE_GRIST)>iovsscanf.c -# <$(SOURCE_GRIST)>obprintf.c - <$(SOURCE_GRIST)>pclose.c - <$(SOURCE_GRIST)>peekc.c - <$(SOURCE_GRIST)>putc.c - <$(SOURCE_GRIST)>putc_u.c - <$(SOURCE_GRIST)>putchar.c - <$(SOURCE_GRIST)>putchar_u.c - <$(SOURCE_GRIST)>rewind.c - <$(SOURCE_GRIST)>setbuf.c - <$(SOURCE_GRIST)>setlinebuf.c - <$(SOURCE_GRIST)>stdfiles.c - <$(SOURCE_GRIST)>stdio.c - <$(SOURCE_GRIST)>strops.c - <$(SOURCE_GRIST)>vasprintf.c - <$(SOURCE_GRIST)>vscanf.c - <$(SOURCE_GRIST)>vsnprintf.c - <$(SOURCE_GRIST)>wfile_stubs.c +MergeObject posix_gnu_libio.o : + clearerr.c + clearerr_u.c + fcloseall.c + feof.c + feof_u.c + ferror.c + ferror_u.c + fileno.c + filedoalloc.c + fileops.c + flockfile.c + fputc.c + fputc_u.c + freopen.c + fseek.c + fseeko.c + ftello.c + fwide.c + genops.c + getc.c + getc_u.c + getchar.c + getchar_u.c + iofclose.c + iofdopen.c + iofflush.c + iofgetpos.c + iofgets.c + iofgets_u.c + iofopen.c + iofputs.c + iofputs_u.c + iofread.c + iofread_u.c + iofsetpos.c + ioftell.c + iofwrite.c + iofwrite_u.c + iofwide.c + iogetdelim.c + iogetline.c + iogets.c + iopadn.c + iopopen.c + ioputs.c + ioseekoff.c + ioseekpos.c + iosetbuffer.c + iosetvbuf.c + ioungetc.c + iovdprintf.c + iovsprintf.c + iovsscanf.c +# obprintf.c + pclose.c + peekc.c + putc.c + putc_u.c + putchar.c + putchar_u.c + rewind.c + setbuf.c + setlinebuf.c + stdfiles.c + stdio.c + strops.c + vasprintf.c + vscanf.c + vsnprintf.c + wfile_stubs.c # wide character - <$(SOURCE_GRIST)>fputwc.c - <$(SOURCE_GRIST)>fputwc_u.c - <$(SOURCE_GRIST)>fwprintf.c -# <$(SOURCE_GRIST)>fwscanf.c - <$(SOURCE_GRIST)>getwc.c - <$(SOURCE_GRIST)>getwc_u.c - <$(SOURCE_GRIST)>iofputws.c - <$(SOURCE_GRIST)>iofputws_u.c - <$(SOURCE_GRIST)>iogetwline.c - <$(SOURCE_GRIST)>ioungetwc.c -# <$(SOURCE_GRIST)>iovswscanf.c - <$(SOURCE_GRIST)>iowpadn.c - <$(SOURCE_GRIST)>putwc.c - <$(SOURCE_GRIST)>putwc_u.c - <$(SOURCE_GRIST)>putwchar.c - <$(SOURCE_GRIST)>putwchar_u.c - <$(SOURCE_GRIST)>swprintf.c -# <$(SOURCE_GRIST)>swscanf.c - <$(SOURCE_GRIST)>vswprintf.c - <$(SOURCE_GRIST)>vwprintf.c -# <$(SOURCE_GRIST)>vwscanf.c -# <$(SOURCE_GRIST)>wfiledoalloc.c -# <$(SOURCE_GRIST)>wfileops.c - <$(SOURCE_GRIST)>wgenops.c - <$(SOURCE_GRIST)>wprintf.c -# <$(SOURCE_GRIST)>wscanf.c - <$(SOURCE_GRIST)>wstrops.c - : - -fPIC -DPIC - ; + fputwc.c + fputwc_u.c + fwprintf.c +# fwscanf.c + getwc.c + getwc_u.c + iofputws.c + iofputws_u.c + iogetwline.c + ioungetwc.c +# iovswscanf.c + iowpadn.c + putwc.c + putwc_u.c + putwchar.c + putwchar_u.c + swprintf.c +# swscanf.c + vswprintf.c + vwprintf.c +# vwscanf.c +# wfiledoalloc.c +# wfileops.c + wgenops.c + wprintf.c +# wscanf.c + wstrops.c +; # use this to build a standalone libio.so # using libio.so, haiku's version of libstdc++.r4.so can be tested under R5. #SharedLibrary libio.so : -# <$(SOURCE_GRIST)>clearerr.c -# <$(SOURCE_GRIST)>clearerr_u.c -# <$(SOURCE_GRIST)>fcloseall.c -# <$(SOURCE_GRIST)>feof.c -# <$(SOURCE_GRIST)>feof_u.c -# <$(SOURCE_GRIST)>ferror.c -# <$(SOURCE_GRIST)>ferror_u.c -# <$(SOURCE_GRIST)>fileno.c -# <$(SOURCE_GRIST)>filedoalloc.c -# <$(SOURCE_GRIST)>fileops.c -# <$(SOURCE_GRIST)>flockfile.c -# <$(SOURCE_GRIST)>fputc.c -# <$(SOURCE_GRIST)>fputc_u.c -# <$(SOURCE_GRIST)>fseek.c -# <$(SOURCE_GRIST)>fseeko.c -# <$(SOURCE_GRIST)>ftello.c -# <$(SOURCE_GRIST)>fwide.c -# <$(SOURCE_GRIST)>genops.c -# <$(SOURCE_GRIST)>getc.c -# <$(SOURCE_GRIST)>getc_u.c -# <$(SOURCE_GRIST)>getchar.c -# <$(SOURCE_GRIST)>getchar_u.c -# <$(SOURCE_GRIST)>iofclose.c -# <$(SOURCE_GRIST)>iofdopen.c -# <$(SOURCE_GRIST)>iofflush.c -# <$(SOURCE_GRIST)>iofgets.c -# <$(SOURCE_GRIST)>iofgets_u.c -# <$(SOURCE_GRIST)>iofopen.c -# <$(SOURCE_GRIST)>iofputs.c -# <$(SOURCE_GRIST)>iofputs_u.c -# <$(SOURCE_GRIST)>iofread.c -# <$(SOURCE_GRIST)>iofread_u.c -# <$(SOURCE_GRIST)>ioftell.c -# <$(SOURCE_GRIST)>iofwrite.c -# <$(SOURCE_GRIST)>iofwrite_u.c -# <$(SOURCE_GRIST)>iofwide.c -# <$(SOURCE_GRIST)>iogetdelim.c -# <$(SOURCE_GRIST)>iogetline.c -# <$(SOURCE_GRIST)>iogets.c -# <$(SOURCE_GRIST)>iopadn.c -# <$(SOURCE_GRIST)>iopopen.c -# <$(SOURCE_GRIST)>ioputs.c -# <$(SOURCE_GRIST)>ioseekoff.c -# <$(SOURCE_GRIST)>ioseekpos.c -# <$(SOURCE_GRIST)>iosetbuffer.c -# <$(SOURCE_GRIST)>iosetvbuf.c -# <$(SOURCE_GRIST)>ioungetc.c -# <$(SOURCE_GRIST)>iovdprintf.c -# <$(SOURCE_GRIST)>iovsprintf.c -# <$(SOURCE_GRIST)>iovsscanf.c -# <$(SOURCE_GRIST)>peekc.c -# <$(SOURCE_GRIST)>putc.c -# <$(SOURCE_GRIST)>putc_u.c -# <$(SOURCE_GRIST)>putchar.c -# <$(SOURCE_GRIST)>putchar_u.c -# <$(SOURCE_GRIST)>rewind.c -# <$(SOURCE_GRIST)>setbuf.c -# <$(SOURCE_GRIST)>setlinebuf.c -# <$(SOURCE_GRIST)>stdfiles.c -# <$(SOURCE_GRIST)>stdio.c -# <$(SOURCE_GRIST)>strops.c -# <$(SOURCE_GRIST)>vasprintf.c -# <$(SOURCE_GRIST)>vscanf.c -# <$(SOURCE_GRIST)>vsnprintf.c -# <$(SOURCE_GRIST)>wfile_stubs.c ; - -#KernelMergeObject kernel_posix_stdio.o : -# <$(SOURCE_GRIST)>kvsprintf.c -# : -# -fPIC -DPIC -# ; -# +# clearerr.c +# clearerr_u.c +# fcloseall.c +# feof.c +# feof_u.c +# ferror.c +# ferror_u.c +# fileno.c +# filedoalloc.c +# fileops.c +# flockfile.c +# fputc.c +# fputc_u.c +# fseek.c +# fseeko.c +# ftello.c +# fwide.c +# genops.c +# getc.c +# getc_u.c +# getchar.c +# getchar_u.c +# iofclose.c +# iofdopen.c +# iofflush.c +# iofgets.c +# iofgets_u.c +# iofopen.c +# iofputs.c +# iofputs_u.c +# iofread.c +# iofread_u.c +# ioftell.c +# iofwrite.c +# iofwrite_u.c +# iofwide.c +# iogetdelim.c +# iogetline.c +# iogets.c +# iopadn.c +# iopopen.c +# ioputs.c +# ioseekoff.c +# ioseekpos.c +# iosetbuffer.c +# iosetvbuf.c +# ioungetc.c +# iovdprintf.c +# iovsprintf.c +# iovsscanf.c +# peekc.c +# putc.c +# putc_u.c +# putchar.c +# putchar_u.c +# rewind.c +# setbuf.c +# setlinebuf.c +# stdfiles.c +# stdio.c +# strops.c +# vasprintf.c +# vscanf.c +# vsnprintf.c +# wfile_stubs.c ; diff --git a/src/system/libroot/posix/glibc/locale/Jamfile b/src/system/libroot/posix/glibc/locale/Jamfile index cd0085b820..4765b11c54 100644 --- a/src/system/libroot/posix/glibc/locale/Jamfile +++ b/src/system/libroot/posix/glibc/locale/Jamfile @@ -6,7 +6,7 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; -KernelMergeObject posix_gnu_locale.o : +MergeObject posix_gnu_locale.o : C-ctype.c C-monetary.c C_name.c @@ -15,5 +15,4 @@ KernelMergeObject posix_gnu_locale.o : lc-monetary.c lc-numeric.c mb_cur_max.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/glibc/regex/Jamfile b/src/system/libroot/posix/glibc/regex/Jamfile index 7e20f16e5f..173ce02f20 100644 --- a/src/system/libroot/posix/glibc/regex/Jamfile +++ b/src/system/libroot/posix/glibc/regex/Jamfile @@ -3,8 +3,6 @@ SubDir HAIKU_TOP src system libroot posix glibc regex ; SubDirHdrs $(HAIKU_TOP) headers ; KernelMergeObject posix_gnu_regex.o : - <$(SOURCE_GRIST)>regex.c - : - -fPIC -DPIC -w - ; + regex.c +; diff --git a/src/system/libroot/posix/glibc/stdio-common/Jamfile b/src/system/libroot/posix/glibc/stdio-common/Jamfile index bf3b4112ef..34a9c5e751 100644 --- a/src/system/libroot/posix/glibc/stdio-common/Jamfile +++ b/src/system/libroot/posix/glibc/stdio-common/Jamfile @@ -12,41 +12,39 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; # ToDo: for now, all wide character functions are disabled -KernelMergeObject posix_gnu_stdio.o : #_common.o : - <$(SOURCE_GRIST)>_itoa.c - <$(SOURCE_GRIST)>_itowa.c - <$(SOURCE_GRIST)>asprintf.c - <$(SOURCE_GRIST)>dprintf.c - <$(SOURCE_GRIST)>fprintf.c - <$(SOURCE_GRIST)>fscanf.c - <$(SOURCE_GRIST)>getline.c - <$(SOURCE_GRIST)>getw.c - <$(SOURCE_GRIST)>itoa-digits.c - <$(SOURCE_GRIST)>itoa-udigits.c - <$(SOURCE_GRIST)>itowa-digits.c - <$(SOURCE_GRIST)>perror.c - <$(SOURCE_GRIST)>printf-prs.c - <$(SOURCE_GRIST)>printf.c - <$(SOURCE_GRIST)>printf_fp.c - <$(SOURCE_GRIST)>printf_fphex.c -# <$(SOURCE_GRIST)>printf_size.c - <$(SOURCE_GRIST)>putw.c - <$(SOURCE_GRIST)>reg-printf.c - <$(SOURCE_GRIST)>scanf.c - <$(SOURCE_GRIST)>snprintf.c - <$(SOURCE_GRIST)>sprintf.c - <$(SOURCE_GRIST)>sscanf.c - <$(SOURCE_GRIST)>tempnam.c - <$(SOURCE_GRIST)>tempname.c - <$(SOURCE_GRIST)>tmpnam.c - <$(SOURCE_GRIST)>tmpnam_r.c - <$(SOURCE_GRIST)>vfprintf.c -# <$(SOURCE_GRIST)>vfprintf_stub.c -# <$(SOURCE_GRIST)>vfscanf_stub.c - <$(SOURCE_GRIST)>vfscanf.c - <$(SOURCE_GRIST)>vfwprintf.c -# <$(SOURCE_GRIST)>vfwscanf.c - <$(SOURCE_GRIST)>vprintf.c - : - -fPIC -DPIC - ; +MergeObject posix_gnu_stdio.o : #_common.o : + _itoa.c + _itowa.c + asprintf.c + dprintf.c + fprintf.c + fscanf.c + getline.c + getw.c + itoa-digits.c + itoa-udigits.c + itowa-digits.c + perror.c + printf-prs.c + printf.c + printf_fp.c + printf_fphex.c +# printf_size.c + putw.c + reg-printf.c + scanf.c + snprintf.c + sprintf.c + sscanf.c + tempnam.c + tempname.c + tmpnam.c + tmpnam_r.c + vfprintf.c +# vfprintf_stub.c +# vfscanf_stub.c + vfscanf.c + vfwprintf.c +# vfwscanf.c + vprintf.c +; diff --git a/src/system/libroot/posix/glibc/stdlib/Jamfile b/src/system/libroot/posix/glibc/stdlib/Jamfile index 2bea36f48b..d126bb3cd7 100644 --- a/src/system/libroot/posix/glibc/stdlib/Jamfile +++ b/src/system/libroot/posix/glibc/stdlib/Jamfile @@ -5,7 +5,7 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; -KernelMergeObject posix_gnu_stdlib.o : +MergeObject posix_gnu_stdlib.o : drand48.c drand48_r.c drand48-iter.c @@ -31,5 +31,4 @@ KernelMergeObject posix_gnu_stdlib.o : srand48_r.c wcstombs.c wctomb.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/glibc/wcsmbs/Jamfile b/src/system/libroot/posix/glibc/wcsmbs/Jamfile index c5647c40ff..9fb28cb044 100644 --- a/src/system/libroot/posix/glibc/wcsmbs/Jamfile +++ b/src/system/libroot/posix/glibc/wcsmbs/Jamfile @@ -14,7 +14,7 @@ SubDirCcFlags -D_GNU_SOURCE -DUSE_IN_LIBIO ; # ToDo: for now, all wide character functions are disabled -KernelMergeObject posix_gnu_wcsmbs.o : +MergeObject posix_gnu_wcsmbs.o : btowc.c mbrlen.c mbrtowc.c @@ -61,5 +61,4 @@ KernelMergeObject posix_gnu_wcsmbs.o : wmemmove.c wmempcpy.c wmemset.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/glibc/wctype/Jamfile b/src/system/libroot/posix/glibc/wctype/Jamfile index a7a7121f64..3d9699980c 100644 --- a/src/system/libroot/posix/glibc/wctype/Jamfile +++ b/src/system/libroot/posix/glibc/wctype/Jamfile @@ -9,10 +9,9 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ; SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ; -KernelMergeObject posix_gnu_wctype.o : +MergeObject posix_gnu_wctype.o : iswctype.c wcfuncs.c wctrans.c wctype.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/locale/Jamfile b/src/system/libroot/posix/locale/Jamfile index cf4efe7bfd..ac1179ea0d 100644 --- a/src/system/libroot/posix/locale/Jamfile +++ b/src/system/libroot/posix/locale/Jamfile @@ -1,8 +1,7 @@ SubDir HAIKU_TOP src system libroot posix locale ; -KernelMergeObject posix_locale.o : +MergeObject posix_locale.o : #ctype.c localeconv.c setlocale.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/malloc/Jamfile b/src/system/libroot/posix/malloc/Jamfile index 5e4f9d3b9a..492f30ef02 100644 --- a/src/system/libroot/posix/malloc/Jamfile +++ b/src/system/libroot/posix/malloc/Jamfile @@ -1,10 +1,12 @@ SubDir HAIKU_TOP src system libroot posix malloc ; -KernelMergeObject posix_malloc.o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject posix_malloc.o : arch-specific.cpp heap.cpp processheap.cpp superblock.cpp threadheap.cpp wrapper.cpp - ; +; diff --git a/src/system/libroot/posix/math/Jamfile b/src/system/libroot/posix/math/Jamfile index cb31677aac..d0fd9721fe 100644 --- a/src/system/libroot/posix/math/Jamfile +++ b/src/system/libroot/posix/math/Jamfile @@ -1,11 +1,12 @@ SubDir HAIKU_TOP src system libroot posix math ; +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; #SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) glibc ] ; #SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) glibc include ] ; #SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) glibc include arch $(TARGET_ARCH) ] ; SubDirCcFlags -Dnational ; -KernelMergeObject posix_math.o : +MergeObject posix_math.o : acosh.c asincos.c asinh.c @@ -36,8 +37,6 @@ KernelMergeObject posix_math.o : sinh.c tan.c tanh.c - : - -fPIC -DPIC - ; +; -SubInclude HAIKU_TOP src system libroot posix math arch ; +SubInclude HAIKU_TOP src system libroot posix math arch $(TARGET_ARCH) ; diff --git a/src/system/libroot/posix/math/arch/Jamfile b/src/system/libroot/posix/math/arch/Jamfile deleted file mode 100644 index 3178e0ae78..0000000000 --- a/src/system/libroot/posix/math/arch/Jamfile +++ /dev/null @@ -1,3 +0,0 @@ -SubDir HAIKU_TOP src system libroot posix math arch ; - -SubInclude HAIKU_TOP src system libroot posix math arch $(TARGET_ARCH) ; diff --git a/src/system/libroot/posix/math/arch/ppc/Jamfile b/src/system/libroot/posix/math/arch/ppc/Jamfile index 7969a7259a..0a5c482185 100644 --- a/src/system/libroot/posix/math/arch/ppc/Jamfile +++ b/src/system/libroot/posix/math/arch/ppc/Jamfile @@ -1,10 +1,8 @@ SubDir HAIKU_TOP src system libroot posix math arch ppc ; -KernelMergeObject posix_math_arch_$(TARGET_ARCH).o : - <$(SOURCE_GRIST)>fabs.c - <$(SOURCE_GRIST)>frexp.c - <$(SOURCE_GRIST)>isinf.c - <$(SOURCE_GRIST)>ldexp.c - : - -fPIC -DPIC - ; +MergeObject posix_math_arch_$(TARGET_ARCH).o : + fabs.c + frexp.c + isinf.c + ldexp.c +; diff --git a/src/system/libroot/posix/math/arch/x86/Jamfile b/src/system/libroot/posix/math/arch/x86/Jamfile index b785247f38..945a45dd1d 100644 --- a/src/system/libroot/posix/math/arch/x86/Jamfile +++ b/src/system/libroot/posix/math/arch/x86/Jamfile @@ -1,6 +1,6 @@ SubDir HAIKU_TOP src system libroot posix math arch x86 ; -KernelMergeObject posix_math_arch_$(TARGET_ARCH).o : +MergeObject posix_math_arch_$(TARGET_ARCH).o : cos.S frexp.c isinf.c @@ -8,6 +8,4 @@ KernelMergeObject posix_math_arch_$(TARGET_ARCH).o : sin.S sqrt.S sqrtf.S - : - -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/pthread/Jamfile b/src/system/libroot/posix/pthread/Jamfile index afd003d267..7a93614302 100644 --- a/src/system/libroot/posix/pthread/Jamfile +++ b/src/system/libroot/posix/pthread/Jamfile @@ -2,10 +2,9 @@ SubDir HAIKU_TOP src system libroot posix pthread ; UsePrivateHeaders libroot ; -KernelMergeObject posix_pthread.o : +MergeObject posix_pthread.o : pthread_atfork.c pthread_mutex.c pthread_mutexattr.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/signal/Jamfile b/src/system/libroot/posix/signal/Jamfile index 94b4820e5d..02d9e799e2 100644 --- a/src/system/libroot/posix/signal/Jamfile +++ b/src/system/libroot/posix/signal/Jamfile @@ -1,6 +1,8 @@ SubDir HAIKU_TOP src system libroot posix signal ; -KernelMergeObject posix_signal.o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject posix_signal.o : kill.c raise.c send_signal.c @@ -11,13 +13,4 @@ KernelMergeObject posix_signal.o : sigset.c sigsuspend.c strsignal.c - : -fPIC -DPIC - ; - -# there are no files in the kernel - -#MergeObjectFromObjects kernel_posix_signal.o : -# : -# -fPIC -DPIC -# ; - +; diff --git a/src/system/libroot/posix/stdio/Jamfile b/src/system/libroot/posix/stdio/Jamfile index 66a0ab8fb1..24e0102acc 100644 --- a/src/system/libroot/posix/stdio/Jamfile +++ b/src/system/libroot/posix/stdio/Jamfile @@ -1,9 +1,11 @@ SubDir HAIKU_TOP src system libroot posix stdio ; -KernelMergeObject posix_stdio.o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject posix_stdio.o : _fseek.c - <$(SOURCE_GRIST)>remove.c - <$(SOURCE_GRIST)>rename.c + remove.c + rename.c # The other files are superseded by the glibc libio/stdio stuff # <$(SOURCE_GRIST)>fclose.c # <$(SOURCE_GRIST)>feof.c @@ -49,5 +51,4 @@ KernelMergeObject posix_stdio.o : # <$(SOURCE_GRIST)>vsprintf.c # <$(SOURCE_GRIST)>wbuf.c # <$(SOURCE_GRIST)>wsetup.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/stdlib/Jamfile b/src/system/libroot/posix/stdlib/Jamfile index 7c123c07e2..7ae28698c6 100644 --- a/src/system/libroot/posix/stdlib/Jamfile +++ b/src/system/libroot/posix/stdlib/Jamfile @@ -1,8 +1,9 @@ SubDir HAIKU_TOP src system libroot posix stdlib ; UsePrivateHeaders libroot ; +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; -KernelMergeObject posix_stdlib.o : +MergeObject posix_stdlib.o : abs.c atfork.c atof.c @@ -24,5 +25,4 @@ KernelMergeObject posix_stdlib.o : strtoll.c strtoul.c strtoull.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/string/Jamfile b/src/system/libroot/posix/string/Jamfile index 2eced4a0be..21dffe5956 100644 --- a/src/system/libroot/posix/string/Jamfile +++ b/src/system/libroot/posix/string/Jamfile @@ -1,6 +1,6 @@ SubDir HAIKU_TOP src system libroot posix string ; -KernelMergeObject posix_string.o : +MergeObject posix_string.o : bcmp.c bcopy.c bzero.c @@ -36,6 +36,4 @@ KernelMergeObject posix_string.o : strstr.c strtok.c strxfrm.c - - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/sys/Jamfile b/src/system/libroot/posix/sys/Jamfile index cf7bb055de..b92d59129b 100644 --- a/src/system/libroot/posix/sys/Jamfile +++ b/src/system/libroot/posix/sys/Jamfile @@ -1,6 +1,8 @@ SubDir HAIKU_TOP src system libroot posix sys ; -KernelMergeObject posix_sys.o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject posix_sys.o : chmod.c getrusage.c gettimeofday.c @@ -17,5 +19,4 @@ KernelMergeObject posix_sys.o : umask.c uname.c wait.c - : -fPIC -DPIC - ; +; diff --git a/src/system/libroot/posix/time/Jamfile b/src/system/libroot/posix/time/Jamfile index 7b6f2177e5..ea40f94fb4 100644 --- a/src/system/libroot/posix/time/Jamfile +++ b/src/system/libroot/posix/time/Jamfile @@ -4,8 +4,9 @@ SubDir HAIKU_TOP src system libroot posix time ; SubDirCcFlags -DNOID -DTZDIR='\"/etc/timezones\"' -DUSG_COMPAT -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DPCTS=1 ; UsePrivateHeaders [ FDirName libroot time ] ; +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; -KernelMergeObject posix_time.o : +MergeObject posix_time.o : asctime.c clock.c ctime.c @@ -16,8 +17,7 @@ KernelMergeObject posix_time.o : # strptime.c # timelocal.c time.c - : -fPIC -DPIC - ; +; # Explanations of flags: # diff --git a/src/system/libroot/posix/unistd/Jamfile b/src/system/libroot/posix/unistd/Jamfile index 8f3287f92a..40c4bbd2f8 100644 --- a/src/system/libroot/posix/unistd/Jamfile +++ b/src/system/libroot/posix/unistd/Jamfile @@ -1,6 +1,8 @@ SubDir HAIKU_TOP src system libroot posix unistd ; -KernelMergeObject posix_unistd.o : +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; + +MergeObject posix_unistd.o : access.c alarm.c chown.c @@ -34,5 +36,4 @@ KernelMergeObject posix_unistd.o : usergroup.c usleep.c write.c - : -fPIC -DPIC - ; +; diff --git a/src/system/runtime_loader/Jamfile b/src/system/runtime_loader/Jamfile index cd09e391ee..8df03b4cc6 100644 --- a/src/system/runtime_loader/Jamfile +++ b/src/system/runtime_loader/Jamfile @@ -2,24 +2,17 @@ SubDir HAIKU_TOP src system runtime_loader ; SubDirHdrs [ FDirName $(SUBDIR) arch ] ; UsePrivateHeaders runtime_loader ; +UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ; -KernelObjects - rld.c - rldexport.c - rldelf.c - rldheap.c - rldaux.c - +# Don't let gcc inject built-in function code. This will cause dependencies +# to libroot, which we don't link against. +SubDirCcFlags -fno-builtin ; +SubDirC++Flags -fno-builtin ; + +# needed for rld.so only +StaticLibrary librld.a : kernel_vsprintf.c - - : -fpic -; - -SEARCH on [ FGristFiles kernel_vsprintf.c ] - = [ FDirName $(HAIKU_TOP) src system kernel lib ] ; - -KernelStaticLibraryObjects librld.a : - # needed for rld.so only + : syscalls.o sem.o atomic.o @@ -54,13 +47,24 @@ KernelStaticLibraryObjects librld.a : strrchr.o strspn.o strstr.o + + [ FGristFiles kernel_vsprintf.o ] ; -KernelLd rld.so : - [ FGristFiles rld.o rldelf.o rldexport.o rldheap.o rldaux.o - kernel_vsprintf.o ] - librld.a - : $(SUBDIR)/arch/$(TARGET_ARCH)/rld.ld - : - : +SEARCH on [ FGristFiles kernel_vsprintf.c ] + = [ FDirName $(HAIKU_TOP) src system kernel lib ] ; + +Objects + rld.c + rldexport.c + rldelf.c + rldheap.c + rldaux.c +; + +Ld rld.so : + [ FGristFiles rld.o rldelf.o rldexport.o rldheap.o rldaux.o ] + librld.a + $(TARGET_GCC_LIBGCC) + : $(SUBDIR)/arch/$(TARGET_ARCH)/rld.ld ;