Changeset 94dfb92 in mainline for kernel


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:
kernel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rc90aed4 r94dfb92  
    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        -integrated-as \
     110        -pipe -target $(CLANG_TARGET)
    108111
    109112ifeq ($(CONFIG_DEBUG),y)
     
    387390
    388391$(LINK): $(LINK).in $(DEPEND)
    389         $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
     392        $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
    390393
    391394%.o: %.S $(DEPEND)
  • kernel/arch/amd64/Makefile.inc

    rc90aed4 r94dfb92  
    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
  • kernel/arch/ia32/Makefile.inc

    rc90aed4 r94dfb92  
    3131BFD = binary
    3232CLANG_ARCH = i386
     33CLANG_TARGET = i386-unknown-linux
    3334
    3435BITS = 32
  • kernel/generic/include/debug.h

    rc90aed4 r94dfb92  
    7777        } while (0)
    7878
     79/** Static assert macro
     80 *
     81 */
     82#define STATIC_ASSERT(expr) \
     83        _Static_assert(expr, "")
     84
     85#define STATIC_ASSERT_VERBOSE(expr, msg) \
     86        _Static_assert(expr, msg)
     87
     88
    7989#else /* CONFIG_DEBUG */
    8090
    8191#define ASSERT(expr)
    8292#define ASSERT_VERBOSE(expr, msg)
     93#define STATIC_ASSERT(expr)
     94#define STATIC_ASSERT_VERBOSE(expr, msg)
    8395
    8496#endif /* CONFIG_DEBUG */
  • kernel/generic/include/printf/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
     47
    4248
    4349#else /* NVERIFY_PRINTF */
  • kernel/generic/src/main/main.c

    rc90aed4 r94dfb92  
    8989#include <lib/ra.h>
    9090
     91/* Ensure [u]int*_t types are of correct size.
     92 *
     93 * Probably, this is not the best place for such tests
     94 * but this file is compiled on all architectures.
     95 */
     96#define CHECK_INT_TYPE_(signness, size) \
     97        STATIC_ASSERT_VERBOSE(sizeof(signness##size##_t) * 8 == size, \
     98            #signness #size "_t does not have " #size " bits");
     99#define CHECK_INT_TYPE(size) \
     100        CHECK_INT_TYPE_(int, size); CHECK_INT_TYPE_(uint, size)
     101
     102CHECK_INT_TYPE(8);
     103CHECK_INT_TYPE(16);
     104CHECK_INT_TYPE(32);
     105CHECK_INT_TYPE(64);
     106
     107
     108
     109
    91110/** Global configuration structure. */
    92111config_t config = {
Note: See TracChangeset for help on using the changeset viewer.