Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/Makefile.toolchain

    rac47b7c2 r8786aa5  
    2727#
    2828
    29 CFLAGS = -I$(LIBC_PREFIX)/include -O3 -imacros $(LIBC_PREFIX)/../../../config.h \
     29GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O3 -imacros $(LIBC_PREFIX)/../../../config.h \
    3030        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    31         -finput-charset=UTF-8 -fno-builtin -Wall -Wextra -Wno-unused-parameter \
    32         -Wmissing-prototypes -Werror-implicit-function-declaration -nostdlib \
    33         -nostdinc -pipe -g -D__$(ENDIANESS)__
     31        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     32        -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
     33        -Werror-implicit-function-declaration -pipe -g -D__$(ENDIANESS)__
     34
     35ICC_CFLAGS = -I$(LIBC_PREFIX)/include -O3 -imacros $(LIBC_PREFIX)/../../../config.h \
     36        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
     37        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     38        -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
     39        -Werror-implicit-function-declaration -pipe -g -D__$(ENDIANESS)__
     40
     41CLANG_CFLAGS = -I$(LIBC_PREFIX)/include -O3 -imacros $(LIBC_PREFIX)/../../../config.h \
     42        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
     43        -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     44        -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
     45        -Werror-implicit-function-declaration -pipe -g -arch $(CLANG_ARCH) \
     46        -D__$(ENDIANESS)__
     47
    3448LFLAGS = -M -N $(SOFTINT_PREFIX)/libsoftint.a
    3549AFLAGS =
     
    4559#
    4660
    47 -include $(LIBC_PREFIX)/../../../Makefile.config
    48 -include $(LIBC_PREFIX)/../../../config.defs
    49 -include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
     61include $(LIBC_PREFIX)/../../../Makefile.config
     62include $(LIBC_PREFIX)/../../../config.defs
     63include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
    5064
    5165## Simple detection of the host system
     
    6478#
    6579
     80JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
     81
     82ifeq ($(COMPILER),gcc_cross)
     83        CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
     84        GCC = $(CC)
     85        AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
     86        LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
     87        AR = $(TOOLCHAIN_DIR)/$(TARGET)-ar
     88        OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
     89        OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
     90        CFLAGS = $(GCC_CFLAGS)
     91        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     92endif
     93
    6694ifeq ($(COMPILER),gcc_native)
    6795        CC = gcc
     96        GCC = $(CC)
    6897        AS = $(BINUTILS_PREFIX)as
    6998        LD = $(BINUTILS_PREFIX)ld
     
    71100        OBJCOPY = $(BINUTILS_PREFIX)objcopy
    72101        OBJDUMP = $(BINUTILS_PREFIX)objdump
     102        CFLAGS = $(GCC_CFLAGS)
    73103        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    74104endif
    75105
    76 ifeq ($(COMPILER),icc_native)
     106ifeq ($(COMPILER),icc)
    77107        CC = icc
     108        GCC = gcc
    78109        AS = as
    79110        LD = ld
     
    81112        OBJCOPY = objcopy
    82113        OBJDUMP = objdump
     114        CFLAGS = $(ICC_CFLAGS)
    83115        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    84116endif
    85117
    86 ifeq ($(COMPILER),gcc_cross)
    87         CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
    88         AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
    89         LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
    90         AR = $(TOOLCHAIN_DIR)/$(TARGET)-ar
    91         OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
    92         OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
     118ifeq ($(COMPILER),clang)
     119        CC = clang
     120        GCC = gcc
     121        AS = $(BINUTILS_PREFIX)as
     122        LD = $(BINUTILS_PREFIX)ld
     123        AR = $(BINUTILS_PREFIX)ar
     124        OBJCOPY = $(BINUTILS_PREFIX)objcopy
     125        OBJDUMP = $(BINUTILS_PREFIX)objdump
     126        CFLAGS = $(CLANG_CFLAGS)
    93127        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    94128endif
Note: See TracChangeset for help on using the changeset viewer.