Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -268,8 +268,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableMultilib enableShared;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -276,8 +276,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -271,8 +271,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -291,8 +291,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/4.9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -310,8 +310,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langJava langAda langGo crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langJava langAda langGo crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -322,8 +322,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langGo crossStageStatic;
inherit version targetPlatform hostPlatform langGo crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -276,8 +276,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langGo crossStageStatic;
inherit version targetPlatform hostPlatform langGo crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -255,8 +255,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ stdenv.mkDerivation ({

preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};

dontDisableStatic = true;
Expand Down Expand Up @@ -270,8 +270,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;

inherit (stdenv) is64bit;

meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/gcc/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,15 @@ preInstall() {
mkdir -p "$out/${targetConfig}/lib"
mkdir -p "${!outputLib}/${targetConfig}/lib"
# Make ‘lib64’ symlinks to ‘lib’.
if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
if [ -n "$linkLib64toLib" ]; then
ln -s lib "$out/${targetConfig}/lib64"
ln -s lib "${!outputLib}/${targetConfig}/lib64"
fi
# Make ‘lib32’ symlinks to ‘lib’.
if [ -n "$linkLib32toLib" ]; then
ln -s lib "$out/${targetConfig}/lib32"
ln -s lib "${!outputLib}/${targetConfig}/lib32"
fi
}


Expand Down
15 changes: 15 additions & 0 deletions pkgs/development/compilers/gcc/common/pre-configure.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, langJit ? false
, langGo
, crossStageStatic
, enableMultilib
}:

assert langJava -> lib.versionOlder version "7";
Expand Down Expand Up @@ -78,3 +79,17 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
+ lib.optionalString (targetPlatform != hostPlatform && crossStageStatic) ''
export inhibit_libc=true
''

+ lib.optionalString (!enableMultilib && hostPlatform.is64bit && !hostPlatform.isMips64n32) ''
export linkLib64toLib=1
''

# On mips platforms, gcc follows the IRIX naming convention:
#
# $PREFIX/lib = mips32
# $PREFIX/lib32 = mips64n32
# $PREFIX/lib64 = mips64
#
+ lib.optionalString (!enableMultilib && targetPlatform.isMips64n32) ''
export linkLib32toLib=1
''