gcc: Lock down more tools for cross-builds
That is, build != host == target
This commit is contained in:
parent
8f970d09fe
commit
2fdca4db69
@ -273,14 +273,43 @@ stdenv.mkDerivation ({
|
|||||||
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
@ -391,14 +391,43 @@ stdenv.mkDerivation ({
|
|||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
@ -397,14 +397,43 @@ stdenv.mkDerivation ({
|
|||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
@ -412,14 +412,43 @@ stdenv.mkDerivation ({
|
|||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
@ -394,14 +394,43 @@ stdenv.mkDerivation ({
|
|||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
@ -395,14 +395,43 @@ stdenv.mkDerivation ({
|
|||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, targetPlatform != hostPlatform
|
# If we are making a cross compiler, targetPlatform != hostPlatform
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
@ -395,14 +395,43 @@ stdenv.mkDerivation ({
|
|||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
|
AR_FOR_BUILD = "ar";
|
||||||
|
AS_FOR_BUILD = "as";
|
||||||
|
LD_FOR_BUILD = "ld";
|
||||||
|
NM_FOR_BUILD = "nm";
|
||||||
|
OBJCOPY_FOR_BUILD = "objcopy";
|
||||||
|
OBJDUMP_FOR_BUILD = "objdump";
|
||||||
|
RANLIB_FOR_BUILD = "ranlib";
|
||||||
|
SIZE_FOR_BUILD = "size";
|
||||||
|
STRINGS_FOR_BUILD = "strings";
|
||||||
|
STRIP_FOR_BUILD = "strip";
|
||||||
|
CC_FOR_BUILD = "gcc";
|
||||||
|
CXX_FOR_BUILD = "g++";
|
||||||
|
|
||||||
AR = "${targetPlatform.config}-ar";
|
AR = "${targetPlatform.config}-ar";
|
||||||
|
AS = "${targetPlatform.config}-as";
|
||||||
LD = "${targetPlatform.config}-ld";
|
LD = "${targetPlatform.config}-ld";
|
||||||
|
NM = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE = "${targetPlatform.config}-size";
|
||||||
|
STRINGS = "${targetPlatform.config}-strings";
|
||||||
|
STRIP = "${targetPlatform.config}-strip";
|
||||||
CC = "${targetPlatform.config}-gcc";
|
CC = "${targetPlatform.config}-gcc";
|
||||||
CXX = "${targetPlatform.config}-gcc";
|
CXX = "${targetPlatform.config}-g++";
|
||||||
|
|
||||||
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
AR_FOR_TARGET = "${targetPlatform.config}-ar";
|
||||||
|
AS_FOR_TARGET = "${targetPlatform.config}-as";
|
||||||
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
LD_FOR_TARGET = "${targetPlatform.config}-ld";
|
||||||
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
|
||||||
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
NM_FOR_TARGET = "${targetPlatform.config}-nm";
|
||||||
|
OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy";
|
||||||
|
OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump";
|
||||||
|
RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib";
|
||||||
|
SIZE_FOR_TARGET = "${targetPlatform.config}-size";
|
||||||
|
STRINGS_FOR_TARGET = "${targetPlatform.config}-strings";
|
||||||
|
STRIP_FOR_TARGET = "${targetPlatform.config}-strip";
|
||||||
|
CC_FOR_TARGET = "${targetPlatform.config}-gcc";
|
||||||
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
CXX_FOR_TARGET = "${targetPlatform.config}-g++";
|
||||||
# If we are making a cross compiler, cross != null
|
# If we are making a cross compiler, cross != null
|
||||||
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user