Changeset 1570759b in mainline for uspace


Ignore:
Timestamp:
2013-03-10T22:00:33Z (13 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.

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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.