From 92c59d37a7e7567567e5e84c7747818850e69d0b Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 24 Feb 2014 02:22:57 +0100 Subject: gcc-cross-wrapper: Enable dontStrip in setup hook. At least for x86_64-w64-mingw32, it doesn't make sense to use the native strip tool for stripping of symbols. To the contrary it results in unusable archive files. Signed-off-by: aszlig --- pkgs/build-support/gcc-cross-wrapper/setup-hook.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index a7be09283ee0..433d36ced434 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -75,6 +75,9 @@ fi # native compilations. doCheck="" +# Don't strip foreign binaries with native "strip" tool. +dontStrip=1 + # Add the output as an rpath. if test "$NIX_NO_SELF_RPATH" != "1"; then export NIX_CROSS_LDFLAGS="-rpath $out/lib -rpath-link $out/lib $NIX_CROSS_LDFLAGS" -- cgit 1.4.1 From c5ab2bfd258501cbe5f440089039aff8e7595e3c Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 27 Feb 2014 18:28:32 +0100 Subject: gcc-cross-wrapper: Explicitly add LD program name. This is because autoconf is passing -print-prog-name=ld to the cross-gcc, which in turn assumes a FHS compliant filesystem hierarchy and searches ../../../../$crossConfig/bin/ld for the correct ld. Of course, this won't work on Nix, hence we're explicitly passing the correct LD program name. Signed-off-by: aszlig --- pkgs/build-support/gcc-cross-wrapper/setup-hook.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index 433d36ced434..497047a73b10 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -70,6 +70,8 @@ fi if test "$dontSetConfigureCross" != "1"; then configureFlags="$configureFlags --build=$system --host=$crossConfig" + # This is because -print-prog-name tries to search FHS paths. + configureFlags="$configureFlags LD=$crossConfig-ld" fi # Disabling the tests when cross compiling, as usually the tests are meant for # native compilations. -- cgit 1.4.1 From 2d17335f6869f88e5bbcef4f1c7a3329e5860ccb Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 12 Mar 2014 06:21:17 +0100 Subject: gcc-cross-wrapper: Allow to pass US X min version. This allows to pass a new attribute osxMinVersion to crossSystem, which specifies the minimum Mac OS X version you want to be compatible to. Signed-off-by: aszlig --- pkgs/build-support/gcc-cross-wrapper/builder.sh | 4 ++++ pkgs/build-support/gcc-cross-wrapper/default.nix | 1 + 2 files changed, 5 insertions(+) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 5a5bd45a8f81..18d26b3e9451 100644 --- a/pkgs/build-support/gcc-cross-wrapper/builder.sh +++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh @@ -26,6 +26,10 @@ if test -z "$nativeLibc"; then fi fi + if [ -n "$osxMinVersion" ]; then + cflagsCompile="$cflagsCompile -mmacosx-version-min=$osxMinVersion" + fi + echo "$cflagsCompile -B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags echo "-L$libc/lib -rpath $libc/lib -rpath-link $libc/lib" > $out/nix-support/libc-ldflags diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index b2e30be10ef7..d3494b83a87b 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -46,6 +46,7 @@ stdenv.mkDerivation { addFlags = ./add-flags; inherit nativeTools nativeLibc nativePrefix gcc libc binutils; crossConfig = if cross != null then cross.config else null; + osxMinVersion = cross.osxMinVersion or null; gccLibs = if gcc != null then gccLibs else null; name = chosenName; langC = if nativeTools then true else gcc.langC; -- cgit 1.4.1 From b25ac9ea5567ea64c687c89111c26e1f5f1035b8 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 12 Mar 2014 10:58:55 +0100 Subject: gcc-cross-wrapper: Revert adding LD program name. This reverts commit c5ab2bfd258501cbe5f440089039aff8e7595e3c. As mentioned in the previous commit, this is now no longer needed. Signed-off-by: aszlig --- pkgs/build-support/gcc-cross-wrapper/setup-hook.sh | 2 -- 1 file changed, 2 deletions(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index 497047a73b10..433d36ced434 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -70,8 +70,6 @@ fi if test "$dontSetConfigureCross" != "1"; then configureFlags="$configureFlags --build=$system --host=$crossConfig" - # This is because -print-prog-name tries to search FHS paths. - configureFlags="$configureFlags LD=$crossConfig-ld" fi # Disabling the tests when cross compiling, as usually the tests are meant for # native compilations. -- cgit 1.4.1