mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 13:22:11 +00:00
New common copyright.
Fix problem of duplicate incorrect libraries when linking. As a side-effect, removed all the custom actions as they where the same as the ones in gcc-tools (or resolve to the same thing). [SVN r19811]
This commit is contained in:
108
mingw-tools.jam
108
mingw-tools.jam
@@ -1,94 +1,46 @@
|
||||
# (C) Copyright David Abrahams 2001. Permission to copy, use,
|
||||
# modify, sell and distribute this software is granted provided this
|
||||
# copyright notice appears in all copies. This software is provided
|
||||
# "as is" without express or implied warranty, and with no claim as
|
||||
# to its suitability for any purpose.
|
||||
# (C) Copyright David Abrahams 2001.
|
||||
# (C) Copyright Rene Rivera 2003.
|
||||
#
|
||||
# Boost Software License - Version 1.0 - August 17th, 2003
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person or organization
|
||||
# obtaining a copy of the software and accompanying documentation covered by
|
||||
# this license (the "Software") to use, reproduce, display, distribute,
|
||||
# execute, and transmit the Software, and to prepare derivative works of the
|
||||
# Software, and to permit third-parties to whom the Software is furnished to
|
||||
# do so, all subject to the following:
|
||||
#
|
||||
# The copyright notices in the Software and this entire statement, including
|
||||
# the above license grant, this restriction and the following disclaimer,
|
||||
# must be included in all copies of the Software, in whole or in part, and
|
||||
# all derivative works of the Software, unless such copies or derivative
|
||||
# works are solely in the form of machine-executable object code generated by
|
||||
# a source language processor.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
# SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
# FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# singleton variables...
|
||||
set-as-singleton MINGW_ROOT_DIRECTORY MINGW_BIN_DIRECTORY MINGW_INCLUDE_DIRECTORY MINGW_STDLIB_DIRECTORY ;
|
||||
|
||||
# compute directories for invoking MINGW
|
||||
|
||||
# Get these variable set on the targets so that we can re-use the
|
||||
# build actions for other toolsets using this one as a base.
|
||||
flags mingw MINGW_BIN_DIRECTORY ;
|
||||
flags mingw MINGW_INCLUDE_DIRECTORY ;
|
||||
flags mingw MINGW_STDLIB_DIRECTORY ;
|
||||
|
||||
MINGW_BIN_DIRECTORY ?= $(MINGW_ROOT_DIRECTORY)$(SLASH)bin$(SLASH) ;
|
||||
MINGW_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if MINGW_ROOT_DIRECTORY not set
|
||||
MINGW_INCLUDE_DIRECTORY ?= $(MINGW_ROOT_DIRECTORY)$(SLASH)include ;
|
||||
MINGW_STDLIB_DIRECTORY ?= $(MINGW_ROOT_DIRECTORY)$(SLASH)lib ;
|
||||
|
||||
{
|
||||
local GCC_INCLUDE_DIRECTORY = ;
|
||||
local GCC_STDLIB_DIRECTORY = ;
|
||||
local GCC_ROOT_DIRECTORY = $(MINGW_ROOT_DIRECTORY) ;
|
||||
local GCC_BIN_DIRECTORY = $(MINGW_BIN_DIRECTORY) ;
|
||||
local GCC_INCLUDE_DIRECTORY = $(MINGW_INCLUDE_DIRECTORY) ;
|
||||
local GCC_STDLIB_DIRECTORY = $(MINGW_STDLIB_DIRECTORY) ;
|
||||
extends-toolset gcc ;
|
||||
GCC_BIN_DIR = $(MINGW_BIN_DIRECTORY) ;
|
||||
flags mingw STDHDRS : $(MINGW_INCLUDE_DIRECTORY) ;
|
||||
flags mingw STDLIBPATH : $(MINGW_STDLIB_DIRECTORY) ;
|
||||
|
||||
}
|
||||
|
||||
flags mingw CFLAGS <threading>multi : -mthreads ;
|
||||
flags mingw LINKFLAGS <threading>multi : -mthreads ;
|
||||
|
||||
#### Link ####
|
||||
|
||||
rule Link-action
|
||||
{
|
||||
# This will appear before the import library name when building a DLL, but
|
||||
# will be "multiplied away" otherwise. The --exclude-symbols directive
|
||||
# proved to be neccessary with some versions of Cygwin.
|
||||
IMPLIB_COMMAND on $(<) = "-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--enable-auto-image-base -Wl,--out-implib," ;
|
||||
mingw-Link-action $(<) : $(>) ;
|
||||
# Workaround GCC's lack of command-files and NT's line-length limitation.
|
||||
if $(NT) {
|
||||
JAMSHELL on $(<) = % ;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
# for mingw, we repeat all libraries so that dependencies are always resolved
|
||||
actions mingw-Link-action bind NEEDLIBS
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)g++ $(IMPLIB_COMMAND)$(<[2]) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -Wl,-rpath-link,.
|
||||
}
|
||||
|
||||
#### Cc #####
|
||||
|
||||
rule Cc-action
|
||||
{
|
||||
SPACE on $(<) = " " ;
|
||||
mingw-Cc-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions mingw-Cc-action
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)gcc -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -isystem$(SPACE)"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### C++ ####
|
||||
rule C++-action
|
||||
{
|
||||
SPACE on $(<) = " " ;
|
||||
mingw-C++-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions mingw-C++-action
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)g++ -c -Wall -ftemplate-depth-100 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -isystem$(SPACE)"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### Archive ####
|
||||
|
||||
rule Archive-action
|
||||
{
|
||||
mingw-Archive-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions updated together piecemeal mingw-Archive-action
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)ar ru$(ARFLAGS) "$(<:T)" "$(>:T)"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,94 +1,46 @@
|
||||
# (C) Copyright David Abrahams 2001. Permission to copy, use,
|
||||
# modify, sell and distribute this software is granted provided this
|
||||
# copyright notice appears in all copies. This software is provided
|
||||
# "as is" without express or implied warranty, and with no claim as
|
||||
# to its suitability for any purpose.
|
||||
# (C) Copyright David Abrahams 2001.
|
||||
# (C) Copyright Rene Rivera 2003.
|
||||
#
|
||||
# Boost Software License - Version 1.0 - August 17th, 2003
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person or organization
|
||||
# obtaining a copy of the software and accompanying documentation covered by
|
||||
# this license (the "Software") to use, reproduce, display, distribute,
|
||||
# execute, and transmit the Software, and to prepare derivative works of the
|
||||
# Software, and to permit third-parties to whom the Software is furnished to
|
||||
# do so, all subject to the following:
|
||||
#
|
||||
# The copyright notices in the Software and this entire statement, including
|
||||
# the above license grant, this restriction and the following disclaimer,
|
||||
# must be included in all copies of the Software, in whole or in part, and
|
||||
# all derivative works of the Software, unless such copies or derivative
|
||||
# works are solely in the form of machine-executable object code generated by
|
||||
# a source language processor.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
# SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
# FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# singleton variables...
|
||||
set-as-singleton MINGW_ROOT_DIRECTORY MINGW_BIN_DIRECTORY MINGW_INCLUDE_DIRECTORY MINGW_STDLIB_DIRECTORY ;
|
||||
|
||||
# compute directories for invoking MINGW
|
||||
|
||||
# Get these variable set on the targets so that we can re-use the
|
||||
# build actions for other toolsets using this one as a base.
|
||||
flags mingw MINGW_BIN_DIRECTORY ;
|
||||
flags mingw MINGW_INCLUDE_DIRECTORY ;
|
||||
flags mingw MINGW_STDLIB_DIRECTORY ;
|
||||
|
||||
MINGW_BIN_DIRECTORY ?= $(MINGW_ROOT_DIRECTORY)$(SLASH)bin$(SLASH) ;
|
||||
MINGW_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if MINGW_ROOT_DIRECTORY not set
|
||||
MINGW_INCLUDE_DIRECTORY ?= $(MINGW_ROOT_DIRECTORY)$(SLASH)include ;
|
||||
MINGW_STDLIB_DIRECTORY ?= $(MINGW_ROOT_DIRECTORY)$(SLASH)lib ;
|
||||
|
||||
{
|
||||
local GCC_INCLUDE_DIRECTORY = ;
|
||||
local GCC_STDLIB_DIRECTORY = ;
|
||||
local GCC_ROOT_DIRECTORY = $(MINGW_ROOT_DIRECTORY) ;
|
||||
local GCC_BIN_DIRECTORY = $(MINGW_BIN_DIRECTORY) ;
|
||||
local GCC_INCLUDE_DIRECTORY = $(MINGW_INCLUDE_DIRECTORY) ;
|
||||
local GCC_STDLIB_DIRECTORY = $(MINGW_STDLIB_DIRECTORY) ;
|
||||
extends-toolset gcc ;
|
||||
GCC_BIN_DIR = $(MINGW_BIN_DIRECTORY) ;
|
||||
flags mingw STDHDRS : $(MINGW_INCLUDE_DIRECTORY) ;
|
||||
flags mingw STDLIBPATH : $(MINGW_STDLIB_DIRECTORY) ;
|
||||
|
||||
}
|
||||
|
||||
flags mingw CFLAGS <threading>multi : -mthreads ;
|
||||
flags mingw LINKFLAGS <threading>multi : -mthreads ;
|
||||
|
||||
#### Link ####
|
||||
|
||||
rule Link-action
|
||||
{
|
||||
# This will appear before the import library name when building a DLL, but
|
||||
# will be "multiplied away" otherwise. The --exclude-symbols directive
|
||||
# proved to be neccessary with some versions of Cygwin.
|
||||
IMPLIB_COMMAND on $(<) = "-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--enable-auto-image-base -Wl,--out-implib," ;
|
||||
mingw-Link-action $(<) : $(>) ;
|
||||
# Workaround GCC's lack of command-files and NT's line-length limitation.
|
||||
if $(NT) {
|
||||
JAMSHELL on $(<) = % ;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
# for mingw, we repeat all libraries so that dependencies are always resolved
|
||||
actions mingw-Link-action bind NEEDLIBS
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)g++ $(IMPLIB_COMMAND)$(<[2]) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -Wl,-rpath-link,.
|
||||
}
|
||||
|
||||
#### Cc #####
|
||||
|
||||
rule Cc-action
|
||||
{
|
||||
SPACE on $(<) = " " ;
|
||||
mingw-Cc-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions mingw-Cc-action
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)gcc -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -isystem$(SPACE)"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### C++ ####
|
||||
rule C++-action
|
||||
{
|
||||
SPACE on $(<) = " " ;
|
||||
mingw-C++-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions mingw-C++-action
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)g++ -c -Wall -ftemplate-depth-100 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -isystem$(SPACE)"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### Archive ####
|
||||
|
||||
rule Archive-action
|
||||
{
|
||||
mingw-Archive-action $(<) : $(>) ;
|
||||
}
|
||||
|
||||
actions updated together piecemeal mingw-Archive-action
|
||||
{
|
||||
$(MINGW_BIN_DIRECTORY)ar ru$(ARFLAGS) "$(<:T)" "$(>:T)"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user