Changeset 94dfb92 in mainline
- Timestamp:
- 2013-05-30T13:05:10Z (12 years ago)
- 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. - Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
rc90aed4 r94dfb92 100 100 -Werror-implicit-function-declaration -wd170 101 101 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 102 105 CLANG_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 \ 105 107 -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \ 106 108 -Werror-implicit-function-declaration -Wwrite-strings \ 107 -pipe -arch $(CLANG_ARCH) 109 -integrated-as \ 110 -pipe -target $(CLANG_TARGET) 108 111 109 112 ifeq ($(CONFIG_DEBUG),y) … … 387 390 388 391 $(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 "^\#" > $@ 390 393 391 394 %.o: %.S $(DEPEND) -
kernel/arch/amd64/Makefile.inc
rc90aed4 r94dfb92 31 31 BFD = binary 32 32 CLANG_ARCH = x86_64 33 CLANG_TARGET = x86_64-unknown-linux 33 34 34 35 FPU_NO_CFLAGS = -mno-sse -mno-sse2 … … 36 37 GCC_CFLAGS += $(CMN1) 37 38 ICC_CFLAGS += $(CMN1) 39 CLANG_CFLAGS += $(CMN1) 38 40 39 41 BITS = 64 -
kernel/arch/ia32/Makefile.inc
rc90aed4 r94dfb92 31 31 BFD = binary 32 32 CLANG_ARCH = i386 33 CLANG_TARGET = i386-unknown-linux 33 34 34 35 BITS = 32 -
kernel/generic/include/debug.h
rc90aed4 r94dfb92 77 77 } while (0) 78 78 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 79 89 #else /* CONFIG_DEBUG */ 80 90 81 91 #define ASSERT(expr) 82 92 #define ASSERT_VERBOSE(expr, msg) 93 #define STATIC_ASSERT(expr) 94 #define STATIC_ASSERT_VERBOSE(expr, msg) 83 95 84 96 #endif /* CONFIG_DEBUG */ -
kernel/generic/include/printf/verify.h
rc90aed4 r94dfb92 38 38 #ifndef NVERIFY_PRINTF 39 39 40 #ifdef __clang__ 41 #define PRINTF_ATTRIBUTE(start, end) \ 42 __attribute__((format(__printf__, start, end))) 43 #else 40 44 #define PRINTF_ATTRIBUTE(start, end) \ 41 45 __attribute__((format(gnu_printf, start, end))) 46 #endif 47 42 48 43 49 #else /* NVERIFY_PRINTF */ -
kernel/generic/src/main/main.c
rc90aed4 r94dfb92 89 89 #include <lib/ra.h> 90 90 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 102 CHECK_INT_TYPE(8); 103 CHECK_INT_TYPE(16); 104 CHECK_INT_TYPE(32); 105 CHECK_INT_TYPE(64); 106 107 108 109 91 110 /** Global configuration structure. */ 92 111 config_t config = { -
tools/autotool.py
rc90aed4 r94dfb92 181 181 print_error(["Failed to determine the value %s." % key, 182 182 "Please contact the developers of HelenOS."]) 183 184 def get_target(config, needs_clang = False): 185 target = None 186 gnu_target = None 187 clang_target = None 188 cc_args = [] 189 190 if (config['PLATFORM'] == "abs32le"): 191 check_config(config, "CROSS_TARGET") 192 target = config['CROSS_TARGET'] 193 194 if (config['CROSS_TARGET'] == "arm32"): 195 gnu_target = "arm-linux-gnueabi" 196 197 if (config['CROSS_TARGET'] == "ia32"): 198 gnu_target = "i686-pc-linux-gnu" 199 200 if (config['CROSS_TARGET'] == "mips32"): 201 gnu_target = "mipsel-linux-gnu" 202 common['CC_ARGS'].append("-mabi=32") 203 204 if (config['PLATFORM'] == "amd64"): 205 target = config['PLATFORM'] 206 gnu_target = "amd64-linux-gnu" 207 clang_target = "x86_64-uknown-linux" 208 209 if (config['PLATFORM'] == "arm32"): 210 target = config['PLATFORM'] 211 gnu_target = "arm-linux-gnueabi" 212 213 if (config['PLATFORM'] == "ia32"): 214 target = config['PLATFORM'] 215 gnu_target = "i686-pc-linux-gnu" 216 clang_target = "i386-uknown-linux" 217 218 if (config['PLATFORM'] == "ia64"): 219 target = config['PLATFORM'] 220 gnu_target = "ia64-pc-linux-gnu" 221 222 if (config['PLATFORM'] == "mips32"): 223 check_config(config, "MACHINE") 224 cc_args.append("-mabi=32") 225 226 if ((config['MACHINE'] == "msim") or (config['MACHINE'] == "lmalta")): 227 target = config['PLATFORM'] 228 gnu_target = "mipsel-linux-gnu" 229 230 if ((config['MACHINE'] == "bmalta")): 231 target = "mips32eb" 232 gnu_target = "mips-linux-gnu" 233 234 if (config['PLATFORM'] == "mips64"): 235 check_config(config, "MACHINE") 236 cc_args.append("-mabi=64") 237 238 if (config['MACHINE'] == "msim"): 239 target = config['PLATFORM'] 240 gnu_target = "mips64el-linux-gnu" 241 242 if (config['PLATFORM'] == "ppc32"): 243 target = config['PLATFORM'] 244 gnu_target = "ppc-linux-gnu" 245 246 if (config['PLATFORM'] == "sparc64"): 247 target = config['PLATFORM'] 248 gnu_target = "sparc64-linux-gnu" 249 250 if (target is None) or (gnu_target is None) or (clang_target is None and needs_clang): 251 print_error(["Failed to determine target for compiler.", 252 "Please contact the developers of HelenOS."]) 253 254 return (target, cc_args, gnu_target, clang_target) 183 255 184 256 def check_app(args, name, details): … … 642 714 common['CC_ARGS'] = [] 643 715 if (config['COMPILER'] == "gcc_cross"): 644 if (config['PLATFORM'] == "abs32le"): 645 check_config(config, "CROSS_TARGET") 646 target = config['CROSS_TARGET'] 647 648 if (config['CROSS_TARGET'] == "arm32"): 649 gnu_target = "arm-linux-gnueabi" 650 651 if (config['CROSS_TARGET'] == "ia32"): 652 gnu_target = "i686-pc-linux-gnu" 653 654 if (config['CROSS_TARGET'] == "mips32"): 655 gnu_target = "mipsel-linux-gnu" 656 common['CC_ARGS'].append("-mabi=32") 657 658 if (config['PLATFORM'] == "amd64"): 659 target = config['PLATFORM'] 660 gnu_target = "amd64-linux-gnu" 661 662 if (config['PLATFORM'] == "arm32"): 663 target = config['PLATFORM'] 664 gnu_target = "arm-linux-gnueabi" 665 666 if (config['PLATFORM'] == "ia32"): 667 target = config['PLATFORM'] 668 gnu_target = "i686-pc-linux-gnu" 669 670 if (config['PLATFORM'] == "ia64"): 671 target = config['PLATFORM'] 672 gnu_target = "ia64-pc-linux-gnu" 673 674 if (config['PLATFORM'] == "mips32"): 675 check_config(config, "MACHINE") 676 common['CC_ARGS'].append("-mabi=32") 677 678 if ((config['MACHINE'] == "msim") or (config['MACHINE'] == "lmalta")): 679 target = config['PLATFORM'] 680 gnu_target = "mipsel-linux-gnu" 681 682 if ((config['MACHINE'] == "bmalta")): 683 target = "mips32eb" 684 gnu_target = "mips-linux-gnu" 685 686 if (config['PLATFORM'] == "mips64"): 687 check_config(config, "MACHINE") 688 common['CC_ARGS'].append("-mabi=64") 689 690 if (config['MACHINE'] == "msim"): 691 target = config['PLATFORM'] 692 gnu_target = "mips64el-linux-gnu" 693 694 if (config['PLATFORM'] == "ppc32"): 695 target = config['PLATFORM'] 696 gnu_target = "ppc-linux-gnu" 697 698 if (config['PLATFORM'] == "sparc64"): 699 target = config['PLATFORM'] 700 gnu_target = "sparc64-linux-gnu" 701 716 target, cc_args, gnu_target, clang_target_unused = get_target(config) 702 717 path = "%s/%s/bin" % (cross_prefix, target) 703 718 prefix = "%s-" % gnu_target … … 708 723 check_common(common, "GCC") 709 724 common['CC'] = common['GCC'] 725 common['CC_ARGS'].extend(cc_args) 710 726 711 727 if (config['COMPILER'] == "gcc_native"): … … 723 739 724 740 if (config['COMPILER'] == "clang"): 741 target, cc_args, gnu_target, clang_target = get_target(config, True) 742 path = "%s/%s/bin" % (cross_prefix, target) 743 prefix = "%s-" % gnu_target 744 725 745 common['CC'] = "clang" 746 common['CC_ARGS'].extend(cc_args) 747 common['CC_ARGS'].append("-target") 748 common['CC_ARGS'].append(clang_target) 726 749 check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer") 727 check_gcc( None, "", common, PACKAGE_GCC)728 check_binutils( None, binutils_prefix, common, PACKAGE_BINUTILS)750 check_gcc(path, prefix, common, PACKAGE_GCC) 751 check_binutils(path, prefix, common, PACKAGE_BINUTILS) 729 752 730 753 # Platform-specific utilities -
tools/ew.py
rc90aed4 r94dfb92 36 36 import subprocess 37 37 import autotool 38 import platform 38 39 39 40 def run_in_console(cmd, title): … … 42 43 subprocess.call(cmdline, shell = True); 43 44 44 def pc_options(): 45 return '-enable-kvm' 45 def get_host_native_width(): 46 return int(platform.architecture()[0].strip('bit')) 47 48 def pc_options(guest_width): 49 opts = '' 50 51 # Do not enable KVM if running 64 bits HelenOS 52 # on 32 bits host 53 host_width = get_host_native_width() 54 if guest_width <= host_width: 55 opts = opts + ' -enable-kvm' 56 57 # Remove the leading space 58 return opts[1:] 46 59 47 60 def malta_options(): … … 50 63 def platform_to_qemu_options(platform, machine): 51 64 if platform == 'amd64': 52 return 'system-x86_64', pc_options( )65 return 'system-x86_64', pc_options(64) 53 66 elif platform == 'arm32': 54 67 return 'system-arm', '' 55 68 elif platform == 'ia32': 56 return 'system-i386', pc_options( )69 return 'system-i386', pc_options(32) 57 70 elif platform == 'mips32': 58 71 if machine == 'lmalta': -
uspace/Makefile.common
rc90aed4 r94dfb92 198 198 -pipe -g -D__$(ENDIANESS)__ 199 199 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 200 203 CLANG_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 \ 203 205 -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \ 204 206 -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)__ 206 209 207 210 LIB_CFLAGS = $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__ … … 251 254 ifeq ($(COMPILER),clang) 252 255 CFLAGS += $(CLANG_CFLAGS) $(EXTRA_CFLAGS) 256 GCC_CFLAGS += $(EXTRA_CFLAGS) 253 257 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 254 258 endif … … 303 307 304 308 %.o: %.S $(DEPEND) 305 $( CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@309 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@ 306 310 ifeq ($(PRECHECK),y) 307 311 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ -
uspace/lib/c/Makefile
rc90aed4 r94dfb92 163 163 164 164 $(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 "^\#" > $@ 166 166 167 167 $(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 "^\#" > $@ 169 169 170 170 $(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 "^\#" > $@ 172 172 173 173 $(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 "^\#" > $@ 175 175 176 176 $(COMMON_HEADER_ARCH): $(COMMON_HEADER) -
uspace/lib/c/arch/amd64/Makefile.common
rc90aed4 r94dfb92 28 28 29 29 CLANG_ARCH = x86_64 30 CLANG_TARGET = x86_64-unknown-linux 30 31 GCC_CFLAGS += -fno-omit-frame-pointer 32 CLANG_CFLAGS += -fno-omit-frame-pointer 31 33 32 34 ENDIANESS = LE -
uspace/lib/c/arch/ia32/Makefile.common
rc90aed4 r94dfb92 28 28 29 29 CLANG_ARCH = i386 30 CLANG_TARGET = i386-unknown-linux 30 31 31 32 ifeq ($(PROCESSOR),i486) … … 34 35 GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer 35 36 endif 37 CLANG_CFLAGS += -fno-omit-frame-pointer 36 38 37 39 ENDIANESS = LE -
uspace/lib/c/include/io/verify.h
rc90aed4 r94dfb92 38 38 #ifndef NVERIFY_PRINTF 39 39 40 #ifdef __clang__ 41 #define PRINTF_ATTRIBUTE(start, end) \ 42 __attribute__((format(__printf__, start, end))) 43 #else 40 44 #define PRINTF_ATTRIBUTE(start, end) \ 41 45 __attribute__((format(gnu_printf, start, end))) 46 #endif 42 47 43 48 #else /* NVERIFY_PRINTF */
Note:
See TracChangeset
for help on using the changeset viewer.