From 09c5682d91abb5d578c601cedee390667bf98b0a Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 5 May 2003 22:07:33 +0000 Subject: [PATCH] The platform dependent header dir is explicitly included now. Changed the libgcc.a handling a bit. Re-run configure! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3178 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- Jamrules | 9 +++++++-- configure | 36 +++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/Jamrules b/Jamrules index 95e243927a..1318bb58f0 100644 --- a/Jamrules +++ b/Jamrules @@ -191,6 +191,9 @@ rule SetupIncludes # Used as a fallback, the R5 header directories (we should remove this as soon as possible) HDRS += /boot/develop/headers/posix /boot/develop/headers/cpp ; + + # The platform dependent headers. + HDRS += $(PLATFORM_HEADERS) ; } rule SetupR5Includes @@ -1373,6 +1376,8 @@ rule SetupKernel HDRS += [ PublicHeaders $(public_kernel_includes) ] ; # Use private directories HDRS += [ PrivateHeaders $(private_kernel_includes) ] ; + # The platform dependent headers. + HDRS += $(PLATFORM_HEADERS) ; UseArchHeaders $(OBOS_ARCH) ; @@ -1415,9 +1420,9 @@ rule KernelLd MakeLocate $(1) : $(LOCATE_TARGET) ; - # Add libgcc.a - NB this should be detected not hard coded! + # Add the platform specific static libs (libgcc.a). if ! $(5) { - LINKLIBS on $(1) += -L $(GCC_PATH) -lgcc ; + LINKLIBS on $(1) += $(PLATFORM_LINKLIBS) ; } } diff --git a/configure b/configure index 0f6b735daa..b8a16fe780 100755 --- a/configure +++ b/configure @@ -33,6 +33,23 @@ assertparam() fi } +# standard_gcc_settings +# +# Sets the variables for a GCC platform. +# +standard_gcc_settings() +{ + # PLATFORM_LINKLIBS + gcclib=`gcc -print-libgcc-file-name` + gccdir=`dirname ${gcclib}` + if [ "x${PLATFORM_LINKLIBS}" == "x" ] ; then + PLATFORM_LINKLIBS="-L ${gccdir} -lgcc" + fi + if [ "x${PLATFORM_HEADERS}" == "x" ] ; then + PLATFORM_HEADERS="${gccdir}/include" + fi +} + # default parameter values # platform=`uname` @@ -62,19 +79,11 @@ fi # BeOS if [ "${platform}" == "BeOS" ] ; then - # GGC_PATH - if [ "x${GCC_PATH}" == "x" ] ; then - gcclib=`gcc -print-libgcc-file-name` - GCC_PATH=`dirname ${gcclib}` - fi + standard_gcc_settings # Linux else if [ "${platform}" == "Linux" ] ; then - # GGC_PATH - if [ "x${GCC_PATH}" == "x" ] ; then - gcclib=`gcc -print-libgcc-file-name` - GCC_PATH=`dirname ${gcclib}` - fi + standard_gcc_settings # Unknown platform else @@ -87,8 +96,9 @@ cat << EOF > build/BuildConfig # BuildConfig # Note: This file has been automatically generated by configure. -FLOPPY_PATH ?= "$floppy" ; -GCC_PATH ?= ${GCC_PATH} ; -BOCHS_DEBUG_HACK ?= $bochs_debug ; +FLOPPY_PATH ?= "${floppy}" ; +PLATFORM_LINKLIBS ?= ${PLATFORM_LINKLIBS} ; +PLATFORM_HEADERS ?= ${PLATFORM_HEADERS} ; +BOCHS_DEBUG_HACK ?= ${bochs_debug} ; EOF