Changeset 94dfb92 in mainline for uspace


Ignore:
Timestamp:
2013-05-30T13:05:10Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e40355e, b8e72fd1
Parents:
c90aed4 (diff), ea15a89a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge partial Clang reviving

Merge from lp:~vojtech-horky/helenos/misc revives Clang support for ia32
and amd64 - it is possible to compile HelenOS with Clang 3.2 again. The
created image fails to boot, though. For ia32, the problem is probably
in some HID driver, with amd64 it crashes before reaching GUI, still do
not know why.

Merging also minor improvement to ew.py - do not use KVM when running
amd64 on 32-bit host.

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    rc90aed4 r94dfb92  
    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        -integrated-as \
     208        -pipe -g -target $(CLANG_TARGET) -D__$(ENDIANESS)__
    206209
    207210LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__
     
    251254ifeq ($(COMPILER),clang)
    252255        CFLAGS += $(CLANG_CFLAGS) $(EXTRA_CFLAGS)
     256        GCC_CFLAGS += $(EXTRA_CFLAGS)
    253257        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    254258endif
     
    303307
    304308%.o: %.S $(DEPEND)
    305         $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
     309        $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@
    306310ifeq ($(PRECHECK),y)
    307311        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
  • uspace/lib/c/Makefile

    rc90aed4 r94dfb92  
    163163
    164164$(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    165         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
     165        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
    166166
    167167$(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    168         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@
     168        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@
    169169
    170170$(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    171         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@
     171        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@
    172172
    173173$(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in
    174         $(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@
     174        $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@
    175175
    176176$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
  • uspace/lib/c/arch/amd64/Makefile.common

    rc90aed4 r94dfb92  
    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
  • uspace/lib/c/arch/ia32/Makefile.common

    rc90aed4 r94dfb92  
    2828
    2929CLANG_ARCH = i386
     30CLANG_TARGET = i386-unknown-linux
    3031
    3132ifeq ($(PROCESSOR),i486)
     
    3435        GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer
    3536endif
     37CLANG_CFLAGS += -fno-omit-frame-pointer
    3638
    3739ENDIANESS = LE
  • uspace/lib/c/include/io/verify.h

    rc90aed4 r94dfb92  
    3838#ifndef NVERIFY_PRINTF
    3939
     40#ifdef __clang__
     41#define PRINTF_ATTRIBUTE(start, end) \
     42        __attribute__((format(__printf__, start, end)))
     43#else
    4044#define PRINTF_ATTRIBUTE(start, end) \
    4145        __attribute__((format(gnu_printf, start, end)))
     46#endif
    4247
    4348#else /* NVERIFY_PRINTF */
Note: See TracChangeset for help on using the changeset viewer.