Changeset 95e370f8 in mainline


Ignore:
Timestamp:
2013-05-30T20:49:46Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45b4300
Parents:
bf85e56
Message:

determine CLANG_TARGET in autotool

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/Makefile.inc

    rbf85e56 r95e370f8  
    3030BFD_ARCH = i386:x86-64
    3131BFD = binary
    32 CLANG_TARGET = x86_64-unknown-linux
    3332
    3433FPU_NO_CFLAGS = -mno-sse -mno-sse2
  • kernel/arch/ia32/Makefile.inc

    rbf85e56 r95e370f8  
    3030BFD_ARCH = i386
    3131BFD = binary
    32 CLANG_TARGET = i386-unknown-linux
    3332
    3433BITS = 32
  • tools/autotool.py

    rbf85e56 r95e370f8  
    182182                             "Please contact the developers of HelenOS."])
    183183
    184 def get_target(config, needs_clang = False):
     184def get_target(config):
    185185        target = None
    186186        gnu_target = None
     
    205205                target = config['PLATFORM']
    206206                gnu_target = "amd64-linux-gnu"
    207                 clang_target = "x86_64-uknown-linux"
     207                clang_target = "x86_64-unknown-linux"
    208208       
    209209        if (config['PLATFORM'] == "arm32"):
     
    214214                target = config['PLATFORM']
    215215                gnu_target = "i686-pc-linux-gnu"
    216                 clang_target = "i386-uknown-linux"
     216                clang_target = "i386-unknown-linux"
    217217       
    218218        if (config['PLATFORM'] == "ia64"):
     
    247247                target = config['PLATFORM']
    248248                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."])
    253249       
    254250        return (target, cc_args, gnu_target, clang_target)
     
    714710                common['CC_ARGS'] = []
    715711                if (config['COMPILER'] == "gcc_cross"):
    716                         target, cc_args, gnu_target, clang_target_unused = get_target(config)
     712                        target, cc_args, gnu_target, clang_target = get_target(config)
     713                       
     714                        if (target is None) or (gnu_target is None):
     715                                print_error(["Unsupported compiler target for GNU GCC.",
     716                                             "Please contact the developers of HelenOS."])
     717                       
    717718                        path = "%s/%s/bin" % (cross_prefix, target)
    718719                        prefix = "%s-" % gnu_target
     
    739740               
    740741                if (config['COMPILER'] == "clang"):
    741                         target, cc_args, gnu_target, clang_target = get_target(config, True)
     742                        target, cc_args, gnu_target, clang_target = get_target(config)
     743                       
     744                        if (target is None) or (gnu_target is None) or (clang_target is None):
     745                                print_error(["Unsupported compiler target for clang.",
     746                                             "Please contact the developers of HelenOS."])
     747                       
    742748                        path = "%s/%s/bin" % (cross_prefix, target)
    743749                        prefix = "%s-" % gnu_target
    744750                       
     751                        check_app(["clang", "--version"], "clang compiler", "preferably version 1.0 or newer")
     752                        check_gcc(path, prefix, common, PACKAGE_GCC)
     753                        check_binutils(path, prefix, common, PACKAGE_BINUTILS)
     754                       
     755                        check_common(common, "GCC")
    745756                        common['CC'] = "clang"
    746757                        common['CC_ARGS'].extend(cc_args)
    747758                        common['CC_ARGS'].append("-target")
    748759                        common['CC_ARGS'].append(clang_target)
    749                         check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer")
    750                         check_gcc(path, prefix, common, PACKAGE_GCC)
    751                         check_binutils(path, prefix, common, PACKAGE_BINUTILS)
     760                        common['CLANG_TARGET'] = clang_target
    752761               
    753762                # Platform-specific utilities
  • uspace/lib/c/arch/amd64/Makefile.common

    rbf85e56 r95e370f8  
    2727#
    2828
    29 CLANG_TARGET = x86_64-unknown-linux
    3029GCC_CFLAGS += -fno-omit-frame-pointer
    3130CLANG_CFLAGS += -fno-omit-frame-pointer
  • uspace/lib/c/arch/ia32/Makefile.common

    rbf85e56 r95e370f8  
    2727#
    2828
    29 CLANG_TARGET = i386-unknown-linux
    30 
    3129ifeq ($(PROCESSOR),i486)
    3230        GCC_CFLAGS += -march=i486 -fno-omit-frame-pointer
Note: See TracChangeset for help on using the changeset viewer.