Changeset 177e4ea in mainline for uspace/lib/libc/Makefile.toolchain


Ignore:
Timestamp:
2010-03-18T23:34:00Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3c80f2b
Parents:
3ad309d
Message:

move from a simple sanity check tool to a more feature-rich configuration autotool (generates Makefile.common)
check for the presence of cross-compiler toolchain
correct prefixing of GNU binutils on Solaris
remove redundant toolchain definitions from makefiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/Makefile.toolchain

    r3ad309d r177e4ea  
    5353AFLAGS =
    5454
    55 ## Cross-toolchain prefix
    56 #
    57 
    58 ifndef CROSS_PREFIX
    59         CROSS_PREFIX = /usr/local
    60 endif
    61 
    6255## Setup platform configuration
    6356#
    6457
     58-include $(LIBC_PREFIX)/../../../Makefile.common
    6559-include $(LIBC_PREFIX)/../../../Makefile.config
    6660-include $(LIBC_PREFIX)/../../../config.defs
    6761-include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
    6862
    69 ## Simple detection of the host system
    70 #
    71 HOST = $(shell uname)
    72 
    73 ## On Solaris, some utilities have different names
    74 #
    75 ifeq ($(HOST),SunOS)
    76         BINUTILS_PREFIX = "g"
    77 else
    78         BINUTILS_PREFIX = ""
    79 endif
    80 
    81 ## Toolchain configuration
     63## Compilation options
    8264#
    8365
     
    8567
    8668ifeq ($(COMPILER),gcc_cross)
    87         CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
    88         GCC = $(CC)
    89         AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
    90         LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
    91         AR = $(TOOLCHAIN_DIR)/$(TARGET)-ar
    92         OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
    93         OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
    9469        CFLAGS = $(GCC_CFLAGS)
    9570        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     
    9772
    9873ifeq ($(COMPILER),gcc_native)
    99         CC = gcc
    100         GCC = $(CC)
    101         AS = $(BINUTILS_PREFIX)as
    102         LD = $(BINUTILS_PREFIX)ld
    103         AR = $(BINUTILS_PREFIX)ar
    104         OBJCOPY = $(BINUTILS_PREFIX)objcopy
    105         OBJDUMP = $(BINUTILS_PREFIX)objdump
    10674        CFLAGS = $(GCC_CFLAGS)
    10775        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     
    10977
    11078ifeq ($(COMPILER),icc)
    111         CC = icc
    112         GCC = gcc
    113         AS = as
    114         LD = ld
    115         AR = ar
    116         OBJCOPY = objcopy
    117         OBJDUMP = objdump
    11879        CFLAGS = $(ICC_CFLAGS)
    11980        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     
    12182
    12283ifeq ($(COMPILER),clang)
    123         CC = clang
    124         GCC = gcc
    125         AS = $(BINUTILS_PREFIX)as
    126         LD = $(BINUTILS_PREFIX)ld
    127         AR = $(BINUTILS_PREFIX)ar
    128         OBJCOPY = $(BINUTILS_PREFIX)objcopy
    129         OBJDUMP = $(BINUTILS_PREFIX)objdump
    13084        CFLAGS = $(CLANG_CFLAGS)
    13185        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
Note: See TracChangeset for help on using the changeset viewer.