Changeset 058c240 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:17Z (7 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b83ec692
Parents:
acf6b55
git-author:
Jaroslav Jindrak <dzejrou@…> (2017-10-09 09:23:36)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:17)
Message:

cpp: added c++ to the build system, created libcpp, added and implemented the header file cstdio to libcpp

Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • tools/autotool.py

    racf6b55 r058c240  
    323323
    324324        common['GCC'] = "%sgcc" % prefix
     325        common['GPP'] = "%sg++" % prefix
    325326
    326327        if (not path is None):
    327328                common['GCC'] = "%s/%s" % (path, common['GCC'])
     329                common['GPP'] = "%s/%s" % (path, common['GPP'])
    328330
    329331        check_app([common['GCC'], "--version"], "GNU GCC", details)
     
    613615                        common['CC'] = " ".join([common['GCC']] + cc_args)
    614616                        common['CC_AUTOGEN'] = common['CC']
     617
     618                        check_common(common, "GPP")
     619                        common['CPP'] = common['GPP']
    615620
    616621                if (config['COMPILER'] == "gcc_native"):
  • uspace/Makefile

    racf6b55 r058c240  
    220220
    221221LIBS = \
     222        lib/cpp \
    222223        lib/fs \
    223224        lib/block \
  • uspace/Makefile.common

    racf6b55 r058c240  
    103103        -I$(LIBC_PREFIX)/arch/$(UARCH)/include \
    104104        -I$(ROOT_PATH)/abi/include
     105
     106LIBCPP_PREFIX = $(LIB_PREFIX)/cpp
     107LIBCPP_INCLUDES_FLAGS = -I$(LIBCPP_PREFIX)/include
     108
    105109LIBSOFTFLOAT_PREFIX = $(LIB_PREFIX)/softfloat
    106110LIBSOFTINT_PREFIX = $(LIB_PREFIX)/softint
     
    232236CFLAGS = $(COMMON_CPPFLAGS) $(COMMON_CFLAGS) $(HELENOS_CFLAGS) $(DEFAULT_CFLAGS)
    233237
     238# Flags for the compilation of C++ code.
     239CPPFLAGS = $(LIBCPP_INCLUDES_FLAGS) $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     240        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
     241        -finput-charset=UTF-8 -ffreestanding -fno-builtin -ffunction-sections \
     242        -nostdlib -nostdinc -Wall -Wextra -Wno-clobbered -Wno-unused-parameter \
     243        -std=c++11 -Werror-implicit-function-declaration \
     244        -Wwrite-strings -pipe -ggdb -D__$(ENDIANESS)__
     245
    234246## Setup platform configuration
    235247#
     
    343355        $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS)
    344356
     357%.o: %.cpp | depend
     358        $(CPP) $(CPPFLAGS) $(EXTRA_CPPFLAGS) -c $< -o $@
     359
    345360%.test.o: %.c | depend
    346361        $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS)
Note: See TracChangeset for help on using the changeset viewer.