Changeset 1570759b in mainline


Ignore:
Timestamp:
2013-03-10T22:00:33Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
26bcc658
Parents:
39ba6d5
Message:

amd64 compiles with clang again

Well, almost. Some of the files are actually compiled by gcc and
the GNU linker from binutils is used because llvm-link does not
support custom linker script.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r39ba6d5 r1570759b  
    100100        -Werror-implicit-function-declaration -wd170
    101101
     102# clang does not support following options but I am not sure whether
     103# something won't break because of that:
     104# -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) -finput-charset=UTF-8
    102105CLANG_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    103         -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    104         -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     106        -ffreestanding -fno-builtin -nostdlib -nostdinc \
    105107        -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
    106108        -Werror-implicit-function-declaration -Wwrite-strings \
    107         -pipe -arch $(CLANG_ARCH)
     109        -pipe -target $(CLANG_TARGET)
    108110
    109111ifeq ($(CONFIG_DEBUG),y)
     
    387389
    388390$(LINK): $(LINK).in $(DEPEND)
    389         $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
     391        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
    390392
    391393%.o: %.S $(DEPEND)
  • kernel/arch/amd64/Makefile.inc

    r39ba6d5 r1570759b  
    3131BFD = binary
    3232CLANG_ARCH = x86_64
     33CLANG_TARGET = x86_64-unknown-linux
    3334
    3435FPU_NO_CFLAGS = -mno-sse -mno-sse2
     
    3637GCC_CFLAGS += $(CMN1)
    3738ICC_CFLAGS += $(CMN1)
     39CLANG_CFLAGS += $(CMN1)
    3840
    3941BITS = 64
  • uspace/Makefile.common

    r39ba6d5 r1570759b  
    198198        -pipe -g -D__$(ENDIANESS)__
    199199
     200# clang does not support following options but I am not sure whether
     201# something won't break because of that:
     202# -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) -finput-charset=UTF-8
    200203CLANG_CFLAGS = $(LIBC_INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    201         -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    202         -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
     204        -ffreestanding -fno-builtin -nostdlib -nostdinc \
    203205        -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
    204206        -Werror-implicit-function-declaration -Wwrite-strings \
    205         -pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__
     207        -pipe -g -target $(CLANG_TARGET) -D__$(ENDIANESS)__
    206208
    207209LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__
     
    251253ifeq ($(COMPILER),clang)
    252254        CFLAGS += $(CLANG_CFLAGS) $(EXTRA_CFLAGS)
     255        GCC_CFLAGS += $(EXTRA_CFLAGS)
    253256        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    254257endif
     
    303306
    304307%.o: %.S $(DEPEND)
    305         $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
     308        $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@
    306309ifeq ($(PRECHECK),y)
    307310        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
  • uspace/lib/c/Makefile

    r39ba6d5 r1570759b  
    161161
    162162$(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    163         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
     163        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
    164164
    165165$(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    166         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@
     166        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@
    167167
    168168$(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    169         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@
     169        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@
    170170
    171171$(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    172         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@
     172        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@
    173173
    174174$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
  • uspace/lib/c/arch/amd64/Makefile.common

    r39ba6d5 r1570759b  
    2828
    2929CLANG_ARCH = x86_64
     30CLANG_TARGET = x86_64-unknown-linux
    3031GCC_CFLAGS += -fno-omit-frame-pointer
     32CLANG_CFLAGS += -fno-omit-frame-pointer
    3133
    3234ENDIANESS = LE
Note: See TracChangeset for help on using the changeset viewer.