Commit Graph

50 Commits

Author SHA1 Message Date
Matthew Bauer
4bdcddf9aa gcc: allow stripping gcc libraries
When cross compiling to the same kernel / arch combination, it is safe
to use strip of libraries. This happens when cross-compiling musl
programs. dontStrip is now set in each gcc compiler instead of in
gcc/builder.sh.

Fixes #75476
2021-01-21 16:25:48 -06:00
Jörg Thalheim
61bbbcd1af
bintools-wrapper: skip dynamic linker for static binaries 2020-12-27 16:42:11 +01:00
Vladimír Čunát
336bc8283b
Re-Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
This reverts commit c778945806.

I believe this is exactly what brings the staging branch into
the right shape after the last merge from master (through staging-next);
otherwise part of staging changes would be lost
(due to being already reachable from master but reverted).
2020-10-26 08:19:17 +01:00
Vladimír Čunát
c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
Vladimír Čunát
5aca3498a6
Merge #92704: gcc: Improve manpage symlinks 2020-10-18 11:56:39 +02:00
adisbladis
6fc3562432
Merge pull request #94637 from antifuchs/gccemacs-on-darwin
emacs: Make gccemacs build on darwin
2020-09-02 18:30:58 +02:00
Matthew Bauer
872b23d214 Merge remote-tracking branch 'origin/master' into gcc-cross 2020-08-26 16:10:02 -05:00
Andreas Fuchs
1759959863 gcc: On darwin, adjust IDs of installed .so files also
Turns out that libgccjit gets installed as a .so file, which the gcc
builder.sh didn't change: It only touched .dylib files; that means
that anything linking in libgccjit.so would receive an "Image not
found" error at load time.

With this change, we invoke `install_name_tool` on .so files too,
adjusting their dynamic linker ID, so that they too can be found.
2020-08-25 08:12:35 -04:00
Jörg Thalheim
96092dc936
stdenv: make -nostdinc work as intended
Right now we add glibc to search path also -nostdinc was provided,
which breaks projects providing their own gcc.
2020-07-23 08:39:46 +01:00
Alexandria Corkwell
eed46887ca
gcc: fix manpage symlinks when arch tuple is in the file name
In some cases, such as when building cross compilers, the binaries and
manpages contain the target architecture tuple, such as
`i686-w64-mingw32-g++.1`.

Ensure the symlink created to save space with the duplicated manpage
(`g++.1 -> gcc.1`) properly handles such cases and generates symlinks
such as `i686-w64-mingw32-g++.1 -> i686-w64-mingw32-gcc.1`.
Previously in such cases, a broken `gcc.1` link would be created
instead.
2020-07-08 06:35:13 -04:00
Gaelan Steele
459c60dda2 gcc: fix building darwin->linux cross compiler
This reverts d9feea5 with some slight modifications to work with
other changes since then.

Fixes #88213.
2020-05-26 03:16:03 -07:00
John Ericson
1ac5398589 *-wrapper; Switch from infixSalt to suffixSalt
I hate the thing too even though I made it, and rather just get rid of
it. But we can't do that yet. In the meantime, this brings us more
inline with autoconf and will make it slightly easier for me to write a
pkg-config wrapper, which we need.
2020-05-12 00:44:44 -04:00
Matthew Bauer
9c4fbf9cb1 gcc: don’t require "lib" output
libgccjit is a library but is used as a compiler. So it references a
bunch of compiler things in $out. To avoid a cycle, we need to put
everything in $out, so referenced to $lib need to be replaced with
${!outputLib}.
2020-05-05 22:23:26 -05:00
Matthew Bauer
53752d0374
Merge pull request #83181 from matthewbauer/move-win-outputs
gcc: move .dll.a* outputs to $lib
2020-04-10 23:44:06 -04:00
Matthew Bauer
c304c1e7d0 gcc: move .dll.a* outputs to $lib
These are expected to be here for Windows compilation. The change in
e1831ebea3 didn’t move these
correctly (while still patching the search paths).

https://hydra.nixos.org/build/114202790
2020-03-23 00:43:57 -04:00
Ben Wolsieffer
c0008c5b63 gcc: fix musl cross-compiler on i686 2020-03-13 17:40:37 -04:00
Ben Wolsieffer
d9feea58ae gcc: remove unneeded RPATH patching 2020-03-05 14:56:52 -05:00
Ben Wolsieffer
e1831ebea3 gcc: move target-specific runtime libraries to separate output 2020-03-04 16:12:36 -05:00
Jörg Thalheim
1b146a8c6f
treewide: remove paxutils from stdenv
More then one year ago we removed grsecurity kernels from nixpkgs:
https://github.com/NixOS/nixpkgs/pull/25277

This removes now also paxutils from stdenv.
2018-12-22 12:55:05 +01:00
John Ericson
d68a9d9db9 gcc-*: Clean up crossStageStatic logic
54282b9610 tread carefuly to avoid a mass
rebuild. This embraces the mass rebuild to clean things up.
2018-09-07 13:30:30 -04:00
Shea Levy
c69d8bf5e6
treewide: Remove gnat support.
See discussion in 6ac7b19c97.
2018-03-08 13:56:36 -05:00
John Ericson
12e0672d88 gcc: Adjust builder.sh to find some things in bintools-wrapper instead 2017-12-13 16:08:19 -05:00
John Ericson
4e4520a0f3 gcc: Don't choke if there is no lib output 2017-12-10 17:36:15 -05:00
John Ericson
51948eab94 gcc: Fix after merge
- NIX_CC_CROSS is now completely gone!

- NIX_CC is defined reliably, so no manual def needed

- stdenv.ccCross -> stdenv.cc, also removing need for "or" fallback
2017-12-07 01:42:43 -05:00
John Ericson
d96cf0f46c gcc: Handle CPATH and LIBRARY_PATH purely in Nix 2017-12-06 19:12:51 -05:00
John Ericson
d4595b38e9 gcc: Modernize builder.sh for Cross
Instead of `NIX_CC` vs `NIX_CC_CROSS` spagetti, unconditionally use
`NIX_BUILD_CC` and `NIX_CC` in a consistent manner.
2017-12-06 19:12:50 -05:00
Daiderd Jordan
9896cf1028
gcc: include dylibs for darwin build 2017-04-04 23:53:39 +02:00
Eelco Dolstra
ad8f31df7f gcc_multi: Move $out/lib64/* to $lib/lib64
This prevents VirtualBox from having a copy of gcc in its closure.
2016-09-20 16:42:30 +02:00
Vladimír Čunát
d3e599c9e1 Merge #16355: gcc: darwin support 2016-06-23 12:16:40 +02:00
Matthew Bauer
f05bb6d23f gcc: fix darwin building
- disable bootstrap builds on Darwin
- remove xcrun calls
- check if patchelf is available before using
- apply darwin patch for gcc4.9
- fixes #16047
- fixes #14812
2016-06-19 23:07:10 -05:00
Tuomas Tynkkynen
a06a405d0b cross GCC: Fix some paths to libc headers (after multiple outputs)
It's not completely clear to me why the path to libc headers is set
differently when cross building...
2016-06-11 04:15:17 +03:00
Eric Litak
7399d0949c fixing libcCross related flags
(excluding darwin and mingw for now)
2016-05-31 16:28:04 -07:00
Vladimír Čunát
70cecb9cbd gcc: fix #15033: avoid lib64/ symlink to 32-bit lib/
This was caused by me in 90ee003240.
2016-05-22 12:03:12 +02:00
Vladimír Čunát
90ee003240 gcc: fix mingw build after closure-size merge
This may also (help to) fix also other less usual configurations.
2016-04-20 16:39:23 +02:00
Vladimír Čunát
09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
Josef Knedl
0fe58cade5 gcc: fix #12836: build on darwin
Patch is based on GCC Bug 66523:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523
2016-02-17 09:42:10 +01:00
Luca Bruno
e289717414 rename moveToOutput and propagatedBuildInputs 2015-12-02 10:05:36 +01:00
Vladimír Čunát
efcad4c910 gcc5: split $doc into $man and $info
... because cc-wrapper is meant to propagate man pages into user envs,
and info pages are rather large.

Also replace the duplicate g++ and gcc man1 pages by a symlink.
2015-10-28 10:15:55 +01:00
Tuomas Tynkkynen
bd028b24bb gcc 4.9: Fix multi-out fixups
- $out/libexec/ now contains subdirectories that we want to patchelf too
- $out/libexec/ now contains some .so and a related .la file, which must
  not be passed to patchelf
2015-10-03 14:08:49 +02:00
Vladimír Čunát
5227fb1dd5 Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
2015-10-03 13:33:37 +02:00
Eelco Dolstra
7745c733eb gcc: Remove duplicate files 2015-05-12 15:05:01 +02:00
Eelco Dolstra
1ab4a9324c * The `patch' command is now part of stdenv, so it no longer needs to
be passed to derivations that need to apply patches.
* GCC 3.4 is now the default compiler (old GCC renamed to `gcc-3.3').
* The temporary GCCs built during the stdenvLinux bootstrap are now
  built without C++ support and without profiling.
* Remove fixincl in GCC 3.4 to prevent a retained dependency on the
  previous GCC.
* Always set $prefix in setup.sh, even when there is no configure
  script.

svn path=/nixpkgs/trunk/; revision=1444
2004-09-18 17:23:18 +00:00
Eelco Dolstra
beaff0a892 * Ensure that when building gcc, libstdc++ is linked against the
libgcc of the gcc being built, not the gcc building it.
* Only include a directory in the rpath of an executable/library if it
  is actually used.  Before, the `/lib' directory of every build input
  was added to the rpath, causing many unnecessary retained
  dependencies.  For instance, Perl has a `/lib' directory, but most
  applications whose build process uses Perl don't actually link
  against Perl.  (Also added a test for this.)
* After building glibc, remove glibcbug, to prevent a retained
  dependency on gcc.
* Add a newline after `building X' in GNU Make.

svn path=/nixpkgs/trunk/; revision=911
2004-04-04 22:02:41 +00:00
Eelco Dolstra
12ae5363ea * Remove trivial builders.
* Make builders unexecutable by removing the hash-bang line and
  execute permission.
* Convert calls to `derivation' to `mkDerivation'.
* Remove `system' and `stdenv' attributes from calls to
  `mkDerivation'.  These transformations were all done automatically,
  so it is quite possible I broke stuff.
* Put the `mkDerivation' function in stdenv/generic.

svn path=/nixpkgs/trunk/; revision=874
2004-03-29 17:23:01 +00:00
Eelco Dolstra
8c4a80b585 * Upgrade to gcc 3.3.3. Starting at 3.3.3, the gcc makefile checks
whether the system header file directory actually exists (when
  calling fixinc), so passing a non-existent directory no longer
  works.  Instead we make a empty dummy directory.

svn path=/nixpkgs/trunk/; revision=858
2004-03-27 16:35:59 +00:00
Eelco Dolstra
5941f66f0e * The stdenv setup script now defines a generic builder that allows
builders for typical Autoconf-style to be much shorten, e.g.,

    . $stdenv/setup
    genericBuild

  The generic builder does lots of stuff automatically:

  - Unpacks source archives specified by $src or $srcs (it knows about
    gzip, bzip2, tar, zip, and unpacked source trees).
  - Determines the source tree.
  - Applies patches specified by $patches.
  - Fixes libtool not to search for libraries in /lib etc.
  - Runs `configure'.
  - Runs `make'.
  - Runs `make install'.
  - Strips debug information from static libraries.
  - Writes nested log information (in the format accepted by
    `log2xml').

  There are also lots of hooks and variables to customise the generic
  builder.  See `stdenv/generic/docs.txt'.

* Adapted the base packages (i.e., the ones used by stdenv) to use the
  generic builder.

* We now use `curl' instead of `wget' to download files in `fetchurl'.

* Neither `curl' nor `wget' are part of stdenv.  We shouldn't
  encourage people to download stuff in builders (impure!).

* Updated some packages.

* `buildinputs' is now `buildInputs' (but the old name also works).

* `findInputs' in the setup script now prevents inputs from being
  processed multiple times (which could happen, e.g., if an input was
  a propagated input of several other inputs; this caused the size
  variables like $PATH to blow up exponentially in the worst case).

* Patched GNU Make to write nested log information in the format
  accepted by `log2xml'.  Also, prior to writing the build command,
  Make now writes a line `building X' to indicate what is being
  built.  This is unfortunately often obscured by the gigantic tool
  invocations in many Makefiles.  The actual build commands are marked
  `unimportant' so that they don't clutter pages generated by
  `log2html'.


svn path=/nixpkgs/trunk/; revision=845
2004-03-19 16:53:04 +00:00
Eelco Dolstra
de13527000 * Finally got stdenv-nix-linux working again. Still not perfect,
though.
* libxml2: upgrade to latest.
* octavefront/rna: keep debug info.

svn path=/nixpkgs/trunk/; revision=830
2004-03-11 17:26:14 +00:00
Eelco Dolstra
a1b3ae0c81 * stdenv-nix-linux should more-or-less work again now.
svn path=/nixpkgs/trunk/; revision=826
2004-03-09 17:16:02 +00:00
Eelco Dolstra
ab73ec398b * Removed the old gcc.
svn path=/nixpkgs/trunk/; revision=825
2004-03-09 17:10:23 +00:00
Eelco Dolstra
48c3faca51 * Renamed pkgs-ng to pkgs.
svn path=/nixpkgs/trunk/; revision=502
2003-11-14 09:59:13 +00:00