Ignore:
Timestamp:
Jun 30, 2020, 10:08:15 AM (5 years ago)
Author:
bird
Message:

tools/GXX*: Added _PREFIX/_SUFFIX properties to all g++ tools. Some minor fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/tools/GXX3.kmk

    r3257 r3391  
    11# $Id$
    22## @file
    3 # kBuild Tool Config - Generic GCC v3.2.x using the system GCC and Binutils, for building C++ code.
     3# kBuild Tool Config - Generic GCC v3.2+ using the system GCC and Binutils, for building C++ code.
    44#
    55
     
    3535
    3636# Tool Specific Properties
    37 TOOL_GXX3_CC  ?= gcc$(HOSTSUFF_EXE)
    38 TOOL_GXX3_CXX ?= g++$(HOSTSUFF_EXE)
     37ifndef TOOL_GXX3_PREFIX
     38 TOOL_GXX3_PREFIX :=
     39endif
     40ifndef TOOL_GXX3_SUFFIX
     41 TOOL_GXX3_SUFFIX := $(HOSTSUFF_EXE)
     42endif
     43TOOL_GXX3_CC  ?= $(TOOL_GXX3_PREFIX)gcc$(TOOL_GXX3_SUFFIX)
     44TOOL_GXX3_CXX ?= $(TOOL_GXX3_PREFIX)g++$(TOOL_GXX3_SUFFIX)
    3945TOOL_GXX3_PCH ?= $(TOOL_GXX3_CXX)
    40 TOOL_GXX3_AS  ?= gcc$(HOSTSUFF_EXE)
    41 ifeq ($(KBUILD_TARGET),solaris)
    42  TOOL_GXX3_AR ?= gar$(HOSTSUFF_EXE)
    43 else
    44  TOOL_GXX3_AR ?= ar$(HOSTSUFF_EXE)
     46TOOL_GXX3_AS  ?= $(TOOL_GXX3_PREFIX)gcc$(TOOL_GXX3_SUFFIX)
     47if1of ($(KBUILD_TARGET),solaris)
     48 TOOL_GXX3_AR ?= $(TOOL_GXX3_PREFIX)gar$(TOOL_GXX3_SUFFIX)
     49else
     50 TOOL_GXX3_AR ?= $(TOOL_GXX3_PREFIX)ar$(TOOL_GXX3_SUFFIX)
    4551endif
    4652ifeq ($(KBUILD_TARGET),os2)
    47  TOOL_GXX3_AR_IMP ?= emximp$(HOSTSTUFF_EXE)
    48 else
    49  TOOL_GXX3_AR_IMP ?= $(ECHO) not supported!
    50 endif
    51 TOOL_GXX3_LD ?= g++$(HOSTSUFF_EXE)
    52 TOOL_GXX3_LD_SYSMOD ?= ld$(HOSTSUFF_EXE)
     53 TOOL_GXX3_AR_IMP   ?= $(TOOL_GXX3_PREFIX)emximp$(TOOL_GXX3_SUFFIX)
     54else
     55 TOOL_GXX3_AR_IMP   ?= $(ECHO) not supported!
     56endif
     57TOOL_GXX3_LD        ?= $(TOOL_GXX3_PREFIX)g++$(TOOL_GXX3_SUFFIX)
     58TOOL_GXX3_LD_SYSMOD ?= $(TOOL_GXX3_PREFIX)ld$(TOOL_GXX3_SUFFIX)
    5359ifndef TOOL_GXX3_LDFLAGS.$(KBUILD_TARGET)
    54  TOOL_GXX3_LDFLAGS.dll ?= -shared
    55 else
    56  TOOL_GXX3_LDFLAGS.dll ?= $(TOOL_GXX3_LDFLAGS.$(KBUILD_TARGET))
     60 TOOL_GXX3_LDFLAGS.dll   ?= -shared
     61else
     62 TOOL_GXX3_LDFLAGS.dll   ?= $(TOOL_GXX3_LDFLAGS.$(KBUILD_TARGET))
    5763endif
    5864TOOL_GXX3_LDFLAGS.sysmod ?= -r
    59 TOOL_GXX3_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
     65TOOL_GXX3_LD_SONAME      ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
    6066ifeq ($(KBUILD_TARGET),os2)
    61  TOOL_GXX3_LD_MAP ?= -Zmap=$(1)
     67 TOOL_GXX3_LD_MAP        ?= -Zmap=$(1)
    6268 TOOL_GXX3_LD_SYSMOD_MAP ?= -Zmap=$(1)
    6369else
    64  TOOL_GXX3_LD_MAP ?=
     70 TOOL_GXX3_LD_MAP        ?=
    6571 TOOL_GXX3_LD_SYSMOD_MAP ?=
    6672endif
    6773if1of ($(KBUILD_HOST), solaris)
    68  TOOL_GXX3_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
    69 else
    70  TOOL_GXX3_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
     74 TOOL_GXX3_OBJCOPY  ?= $(TOOL_GXX3_PREFIX)gobjcopy$(TOOL_GXX3_SUFFIX)
     75else
     76 TOOL_GXX3_OBJCOPY  ?= $(TOOL_GXX3_PREFIX)objcopy$(TOOL_GXX3_SUFFIX)
    7177endif
    7278
Note: See TracChangeset for help on using the changeset viewer.