-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang, cc-wrapper: Move --gcc-toolchain
logic into CC wrapper
#94582
clang, cc-wrapper: Move --gcc-toolchain
logic into CC wrapper
#94582
Conversation
@@ -265,6 +265,7 @@ stdenv.mkDerivation { | |||
## | |||
+ optionalString (isClang && libcxx == null && !(stdenv.targetPlatform.useLLVM or false) && gccForLibs != null) '' | |||
|
|||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is intended to have this on macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On macOS libcxx != null
so it shouldn't. On the other hand it might be needed with libcxxClang
and not have it.
We might need to also make cc-wrapper libgcc/compiler-rt aware (something we probably should do in general) to fix that case if it is indeed messed up for libcxxClang
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I was just asking if there is a libgcc based stdenv for macOS like their is a libcxx stdenv for Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. I don't think there is. If there was it probably would use --gcc-toolchain
. (When build finally build all the GCC libraries in separate derivations, this will be much easier!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a gccStdenv, which doesn't seem to use libc++ from what I can tell. I'm not sure what the implications of this flag are or if the condition triggers however.
HARDENING: disabled flags: pie
HARDENING: Is active (not completely disabled with "all" flag)
HARDENING: enabling fortify
HARDENING: enabling stackprotector
HARDENING: enabling strictoverflow
HARDENING: enabling format
HARDENING: enabling pic
extra flags before to /nix/store/q8ar8q8f2h4sq5563pcn9dnv7a8n8gns-gcc-9.3.0/bin/g++:
-O2
-D_FORTIFY_SOURCE=2
-fstack-protector-strong
--param
ssp-buffer-size=4
-fno-strict-overflow
-Wformat
-Wformat-security
-Werror=format-security
-fPIC
-Wl\,-sdk_version
-Wl\,10.12
-Wl\,-no_uuid
original flags to /nix/store/q8ar8q8f2h4sq5563pcn9dnv7a8n8gns-gcc-9.3.0/bin/g++:
-o
hello
hello.cc
extra flags after to /nix/store/q8ar8q8f2h4sq5563pcn9dnv7a8n8gns-gcc-9.3.0/bin/g++:
-B/nix/store/fikpi6kfpfywadbqnrn6ldwif2glqvii-gcc-9.3.0-lib/lib
-B/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib/
-idirafter
/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include
-idirafter
/nix/store/q8ar8q8f2h4sq5563pcn9dnv7a8n8gns-gcc-9.3.0/lib/gcc/x86_64-apple-darwin/9.3.0/include-fixed
-B/nix/store/nsq53ag0qb8q8ljxdwfxnm3k4ssbwqcf-gcc-wrapper-9.3.0/bin/
-isystem
/nix/store/29sdvdbaj16kxgzhxj72pa1dn3vrf9bw-clang-7.1.0/include
-isystem
/nix/store/29sdvdbaj16kxgzhxj72pa1dn3vrf9bw-clang-7.1.0/include
-L/nix/store/29sdvdbaj16kxgzhxj72pa1dn3vrf9bw-clang-7.1.0/lib
-L/nix/store/3z5szay7ax2p102ysnx8sgq8d305mp06-clang-7.1.0-lib/lib
-L/nix/store/29sdvdbaj16kxgzhxj72pa1dn3vrf9bw-clang-7.1.0/lib
-L/nix/store/3z5szay7ax2p102ysnx8sgq8d305mp06-clang-7.1.0-lib/lib
-L/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib
-L/nix/store/fikpi6kfpfywadbqnrn6ldwif2glqvii-gcc-9.3.0-lib/lib
7848c08
to
11302dc
Compare
OK I rebased this, and added a |
…..." This reverts commit 0f25eb3, reversing changes made to df91ae1. These toolchain changes are too problematic, so reverting for now; see #107086 (comment)
This PR was reverted (for now). Unfortunately it isn't possible to reopen the original PR, but you can create a new one. |
## Changelog for nixpkgs: Commits: [NixOS/nixpkgs@e9158eca...57a787c9](NixOS/nixpkgs@e9158ec...57a787c) * [`3c233e26`](NixOS/nixpkgs@3c233e2) soapyaudio: init at 0.1.1 * [`08319d05`](NixOS/nixpkgs@08319d0) sdrangel: add soapysdr dependency * [`640d9251`](NixOS/nixpkgs@640d925) buildDunePackage: use dune install instead of opaline * [`e55f7727`](NixOS/nixpkgs@e55f772) python3Packages.hstspreload: add pythonImportsCheck * [`17f8726e`](NixOS/nixpkgs@17f8726) flasm: init at 1.64 * [`37abd75b`](NixOS/nixpkgs@37abd75) libreoffice-fresh: 7.0.3.1 -> 7.0.4.2 * [`0446b8af`](NixOS/nixpkgs@0446b8a) ethminer: fix broken package by switching to clang * [`15dcf134`](NixOS/nixpkgs@15dcf13) nixos/manual: fix typo in virtualbox installation guide * [`0179b5f1`](NixOS/nixpkgs@0179b5f) steam-fhsenv: normalize ldPath * [`473ec944`](NixOS/nixpkgs@473ec94) steamPackages.steam: 1.0.0.61 -> 1.0.0.68 * [`ab91cd99`](NixOS/nixpkgs@ab91cd9) steam: fix desktop link * [`373cb5d4`](NixOS/nixpkgs@373cb5d) steam: fix readonly boostrap.tar.xz * [`39fad297`](NixOS/nixpkgs@39fad29) nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems * [`04cbb60e`](NixOS/nixpkgs@04cbb60) ocamlPackages.opam-state: use dune 2 * [`69e614e7`](NixOS/nixpkgs@69e614e) ocamlPackages.opam-repository: use dune 2 * [`926a1b20`](NixOS/nixpkgs@926a1b2) ocamlPackages.opam-format: use dune 2 * [`6c839492`](NixOS/nixpkgs@6c83949) waypoint: init at 0.1.5 * [`d1d2526f`](NixOS/nixpkgs@d1d2526) samba: 4.12.6 -> 4.13.0 * [`8e88dfc1`](NixOS/nixpkgs@8e88dfc) samba: 4.13.0 -> 4.13.3 * [`a9ddc4fc`](NixOS/nixpkgs@a9ddc4f) samba: fix macOS build * [`560dc49b`](NixOS/nixpkgs@560dc49) maintainers: add fab * [`6be8a0ec`](NixOS/nixpkgs@6be8a0e) maintainers: add stunkymonkey * [`6f64a415`](NixOS/nixpkgs@6f64a41) samba: mark as broken on darwin * [`e8488ab5`](NixOS/nixpkgs@e8488ab) notion: 4.0.1 -> 4.0.2 * [`0c0a1a9a`](NixOS/nixpkgs@0c0a1a9) kitty: 0.19.2 -> 0.19.3 * [`4078999d`](NixOS/nixpkgs@4078999) lein: 2.9.1 -> 2.9.5 * [`b9140da9`](NixOS/nixpkgs@b9140da) pythonPackages.discordpy: remove overly restrictive version constraints * [`fd018e99`](NixOS/nixpkgs@fd018e9) uwsgi: set UWSGICONFIG_PHPPATH to the php.dev store * [`22e88043`](NixOS/nixpkgs@22e8804) uwsgi: the php plugin needs to link with session.so * [`c32ef219`](NixOS/nixpkgs@c32ef21) nixos/tests/uwsgi: test PHP plugin * [`b055fd11`](NixOS/nixpkgs@b055fd1) python3Packages.transformers: 4.0.1 -> 4.1.1 * [`5e5139ea`](NixOS/nixpkgs@5e5139e) python3Packages.ircstates: 0.11.6 -> 0.11.7 * [`e189177c`](NixOS/nixpkgs@e189177) uwsgi: add passthru.tests.uwsgi to derivation * [`6625d1d1`](NixOS/nixpkgs@6625d1d) python3Packages.botocore: 1.19.39 -> 1.19.40 * [`ff6ef5bc`](NixOS/nixpkgs@ff6ef5b) python3Packages.boto3: 1.16.39 -> 1.16.40 * [`b4c59d6a`](NixOS/nixpkgs@b4c59d6) awscli: 1.18.199 -> 1.18.200 * [`9dc0ab94`](NixOS/nixpkgs@9dc0ab9) linux: 5.10.1 -> 5.10.2 * [`6b4ee3bf`](NixOS/nixpkgs@6b4ee3b) linux: 5.4.84 -> 5.4.85 * [`4859bf28`](NixOS/nixpkgs@4859bf2) linux: 5.9.15 -> 5.9.16 * [`c0e091e6`](NixOS/nixpkgs@c0e091e) linux-rt_5_10: 5.10.1-rt19 -> 5.10.1-rt20 * [`e49c1a00`](NixOS/nixpkgs@e49c1a0) mathematica: 12.1.1 -> 12.2.0 (NixOS/nixpkgs#107309) * [`9521efa6`](NixOS/nixpkgs@9521efa) cling: fix libc include path for non-glibc * [`b7045dac`](NixOS/nixpkgs@b7045da) libcryptui: enableParallelBuilding * [`4bded925`](NixOS/nixpkgs@4bded92) nixos/thermald: Allow switching package * [`7e63c972`](NixOS/nixpkgs@7e63c97) folly: 2019.11.11.00 -> 2020.09.28.00, fix build (NixOS/nixpkgs#99133) * [`a63c1a93`](NixOS/nixpkgs@a63c1a9) kafka: remove old versions * [`95c123d1`](NixOS/nixpkgs@95c123d) libsmartcols: init at v2.36.1 * [`31e7bbc9`](NixOS/nixpkgs@31e7bbc) prometheus-lnd-exporter: unstable-2020-01-09 -> unstable-2020-12-04 * [`bbd59a22`](NixOS/nixpkgs@bbd59a2) python3Packages.pytest-trio: 0.6.0 -> 0.7.0 * [`65fd0312`](NixOS/nixpkgs@65fd031) nixos: add prometheus_nginxlog_exporter module + test * [`bd841250`](NixOS/nixpkgs@bd84125) nomad_1_0: init at 1.0.1 * [`b2a1f176`](NixOS/nixpkgs@b2a1f17) docopts: add to all-packages * [`bf444739`](NixOS/nixpkgs@bf44473) Revert "Merge NixOS/nixpkgs#107253: bintools-wrapper: fix inverted link32 check" * [`363175cd`](NixOS/nixpkgs@363175c) Revert "bintools-wrapper: skip dynamic linker for static binaries" * [`ac03cfa3`](NixOS/nixpkgs@ac03cfa) Revert "Merge NixOS/nixpkgs#94582: clang, cc-wrapper: Move `--gcc-toolchain` logic..." * [`58347020`](NixOS/nixpkgs@5834702) Revert "Merge NixOS/nixpkgs#97536: uwsgi: fix compiling and linking" * [`91d6b7d0`](NixOS/nixpkgs@91d6b7d) nvidia-x11.vulkan_beta: 455.46.02 -> 455.46.04 * [`58c52f0b`](NixOS/nixpkgs@58c52f0) wireshark: 3.4.0 -> 3.4.2 * [`7bc70734`](NixOS/nixpkgs@7bc7073) bash: 5.0 -> 5.1 * [`e19995e4`](NixOS/nixpkgs@e19995e) codimd: 1.6.0 -> 1.7.0, rename to hedgedoc * [`1c556217`](NixOS/nixpkgs@1c55621) nixos/codimd: rename to hedgedoc * [`97e863ad`](NixOS/nixpkgs@97e863a) nixos/doc: add note about codimd -> hedgedoc to release notes * [`16a33fb0`](NixOS/nixpkgs@16a33fb) sdrangel: set SOAPYSDR_DIR in build * [`da247171`](NixOS/nixpkgs@da24717) mutagen: install agents bundle (NixOS/nixpkgs#107297) * [`af5b6f9f`](NixOS/nixpkgs@af5b6f9) nerdctl: 0.3.0 -> 0.4.0 * [`1ebf7ecb`](NixOS/nixpkgs@1ebf7ec) youtube-dl: 2020.12.14 -> 2020.12.22 * [`a59c33f3`](NixOS/nixpkgs@a59c33f) manaplus: init at 1.9.3.23 * [`e18b62a5`](NixOS/nixpkgs@e18b62a) maintainer-list: add lrworth * [`160ba18d`](NixOS/nixpkgs@160ba18) unused: init at 0.2.1 * [`9d92c9d0`](NixOS/nixpkgs@9d92c9d) iso-image: add 'serial console' boot entry * [`f3939a9b`](NixOS/nixpkgs@f3939a9) python37Packages.pulp: 2.3.1 -> 2.4 * [`bbceaa8c`](NixOS/nixpkgs@bbceaa8) element-web: 1.7.15 -> 1.7.16 * [`b9dabe73`](NixOS/nixpkgs@b9dabe7) element-desktop: 1.7.15 -> 1.7.16 * [`d36f0023`](NixOS/nixpkgs@d36f002) packer: 1.6.5 -> 1.6.6 * [`4d0c6c64`](NixOS/nixpkgs@4d0c6c6) nvimpager: init at 0.9 (NixOS/nixpkgs#107057) * [`9f52d1f2`](NixOS/nixpkgs@9f52d1f) Revert "nixos/wireless: fix failure with no interfaces" * [`68b265d8`](NixOS/nixpkgs@68b265d) lexicon: 3.4.3 -> 3.5.2 * [`80b09974`](NixOS/nixpkgs@80b0997) nixos/udev: harmonize extraRules example * [`30a21ff2`](NixOS/nixpkgs@30a21ff) iosevka-bin: 4.0.3 -> 4.1.1 * [`9a9ad8c7`](NixOS/nixpkgs@9a9ad8c) esptool: 2.7 -> 3.0, fix NixOS/nixpkgs#82965 * [`20a3b851`](NixOS/nixpkgs@20a3b85) python3Packages.daphne: 2.5.0 -> 3.0.1 * [`bf5af025`](NixOS/nixpkgs@bf5af02) monero: 0.17.1.6 -> 0.17.1.7 * [`b45e4ddb`](NixOS/nixpkgs@b45e4dd) monero-gui: 0.17.1.6 -> 0.17.1.7 * [`05fe6112`](NixOS/nixpkgs@05fe611) Fix small typo in a comment of emacs-packages * [`b36e05ef`](NixOS/nixpkgs@b36e05e) htop: 3.0.3 -> 3.0.4 * [`74971a10`](NixOS/nixpkgs@74971a1) gitlab-runner: 13.6.0 -> 13.7.0 (NixOS/nixpkgs#107378) * [`86ff1e45`](NixOS/nixpkgs@86ff1e4) ungoogled-chromium: Support enableWideVine=true * [`6dd858dc`](NixOS/nixpkgs@6dd858d) uwsgi: set UWSGICONFIG_PHPPATH to the php.dev store * [`87bed6c8`](NixOS/nixpkgs@87bed6c) uwsgi: the php plugin needs to link with session.so * [`06749ba3`](NixOS/nixpkgs@06749ba) nixos/tests/uwsgi: test PHP plugin * [`41af371d`](NixOS/nixpkgs@41af371) uwsgi: add passthru.tests.uwsgi to derivation * [`5d3baeb1`](NixOS/nixpkgs@5d3baeb) polybar: 3.5.0 -> 3.5.2 * [`044cd65e`](NixOS/nixpkgs@044cd65) gitui: 0.10.1 -> 0.11.0 * [`c6f65b1d`](NixOS/nixpkgs@c6f65b1) ulauncher: 5.8.1 -> 5.9.0 * [`123f953c`](NixOS/nixpkgs@123f953) grocy: 2.7.1 -> 3.0.0 * [`b3aed95a`](NixOS/nixpkgs@b3aed95) chroma: 0.8.1 -> 0.8.2 * [`7bc0da6a`](NixOS/nixpkgs@7bc0da6) dasel: 1.10.0 -> 1.11.0 * [`a926df73`](NixOS/nixpkgs@a926df7) python37Packages.toposort: 1.5 -> 1.6 * [`d156f38d`](NixOS/nixpkgs@d156f38) python37Packages.pyvips: 2.1.13 -> 2.1.14 * [`b29490c8`](NixOS/nixpkgs@b29490c) python37Packages.sqlite-utils: 3.0 -> 3.1 * [`458fc5d9`](NixOS/nixpkgs@458fc5d) python37Packages.hvac: 0.10.5 -> 0.10.6 * [`cf3c6d3e`](NixOS/nixpkgs@cf3c6d3) python37Packages.tlslite-ng: 0.7.5 -> 0.7.6 * [`157edfdf`](NixOS/nixpkgs@157edfd) python37Packages.requests-hawk: 1.0.1 -> 1.1.0 * [`0cefcc62`](NixOS/nixpkgs@0cefcc6) pythonPackages.progressbar2: fix build * [`f0bce04b`](NixOS/nixpkgs@f0bce04) sudo: 1.9.4p1 -> 1.9.4p2 * [`9a6de998`](NixOS/nixpkgs@9a6de99) nodejs-15_x: 15.4.0 -> 15.5.0 * [`d130a659`](NixOS/nixpkgs@d130a65) MediaElch: init at 2.8.2 * [`6fc561f9`](NixOS/nixpkgs@6fc561f) python3Packages.botocore: 1.19.40 -> 1.19.41 * [`d943d0a2`](NixOS/nixpkgs@d943d0a) python3Packages.boto3: 1.16.40 -> 1.16.41 * [`8e3726f3`](NixOS/nixpkgs@8e3726f) awscli: 1.18.200 -> 1.18.201 * [`96396f35`](NixOS/nixpkgs@96396f3) linux-rt_5_4: 5.4.82-rt45 -> 5.4.84-rt47 * [`371b8673`](NixOS/nixpkgs@371b867) linux/hardened/patches/5.4: 5.4.84.a -> 5.4.85.a * [`bf0589a3`](NixOS/nixpkgs@bf0589a) linux/hardened/patches/5.9: 5.9.15.a -> 5.9.16.a * [`0f8e7ab7`](NixOS/nixpkgs@0f8e7ab) mapproxy: 1.12.0 -> 1.13.0 (NixOS/nixpkgs#107203) * [`fd4e4bd8`](NixOS/nixpkgs@fd4e4bd) waffle: Use meson instead of cmake * [`807c0b0d`](NixOS/nixpkgs@807c0b0) waffle: Add support for non-linux platforms * [`dd5ffa7b`](NixOS/nixpkgs@dd5ffa7) libdnf: init at 0.55.2 * [`638eefae`](NixOS/nixpkgs@638eefa) microdnf: init at 3.6.0 * [`702161d4`](NixOS/nixpkgs@702161d) winetricks: 20200412 -> 20201206 * [`e7bfbe36`](NixOS/nixpkgs@e7bfbe3) umockdev: disable tests * [`02040cb5`](NixOS/nixpkgs@02040cb) python37Packages.chalice: 1.21.6 -> 1.21.7 * [`e57c6c25`](NixOS/nixpkgs@e57c6c2) python37Packages.netcdf4: 1.5.5 -> 1.5.5.1 * [`357f132b`](NixOS/nixpkgs@357f132) doc: convert Steam to CommonMark * [`2ae527c5`](NixOS/nixpkgs@2ae527c) qtractor: 0.9.18 -> 0.9.19 * [`55504ab4`](NixOS/nixpkgs@55504ab) python37Packages.breathe: 4.24.1 -> 4.25.1 * [`56139b3d`](NixOS/nixpkgs@56139b3) gitAndTools.delta: 0.4.4 -> 0.4.5 * [`019eb959`](NixOS/nixpkgs@019eb95) tdesktop: 2.4.7 -> 2.5.0 * [`2688e2d3`](NixOS/nixpkgs@2688e2d) tdesktop: 2.5.0 -> 2.5.1 * [`87e7d8b3`](NixOS/nixpkgs@87e7d8b) bind: 9.16.8 -> 9.16.10 * [`5ec44bb2`](NixOS/nixpkgs@5ec44bb) qolibri: migrate to Qt5.15 * [`0d025be7`](NixOS/nixpkgs@0d025be) kstars: migrate to Qt5.15 * [`d63dc152`](NixOS/nixpkgs@d63dc15) kstars: use mkDerivation instead of wrapQtAppsHook * [`8db56b45`](NixOS/nixpkgs@8db56b4) kstars: add optional dependencies * [`b8da36eb`](NixOS/nixpkgs@b8da36e) python3Packages.botocore: 1.19.41 -> 1.19.42 * [`8db43ec6`](NixOS/nixpkgs@8db43ec) python3Packages.boto3: 1.16.41 -> 1.16.42 * [`d1418293`](NixOS/nixpkgs@d141829) awscli: 1.18.201 -> 1.18.202 * [`05bf935b`](NixOS/nixpkgs@05bf935) ripgrep: Add test * [`bdbb37ad`](NixOS/nixpkgs@bdbb37a) python37Packages.django-storages: 1.10.1 -> 1.11 * [`72386991`](NixOS/nixpkgs@7238699) python37Packages.JPype1: 1.1.2 -> 1.2.0 * [`2d6c7dd0`](NixOS/nixpkgs@2d6c7dd) python37Packages.azure-mgmt-synapse: 0.5.0 -> 0.6.0 * [`85994040`](NixOS/nixpkgs@8599404) python37Packages.clickhouse-driver: 0.1.5 -> 0.2.0 * [`0597dcb0`](NixOS/nixpkgs@0597dcb) python37Packages.bumps: 0.7.18 -> 0.8.0 * [`1539732c`](NixOS/nixpkgs@1539732) shadow: Add test * [`49ca6941`](NixOS/nixpkgs@49ca694) release-combined: Add shadow test * [`825d4705`](NixOS/nixpkgs@825d470) pythonPackages.tqdm: 4.54.0 -> 4.54.1 * [`56beaeb3`](NixOS/nixpkgs@56beaeb) python37Packages.seaborn: 0.11.0 -> 0.11.1 * [`57a787c9`](NixOS/nixpkgs@57a787c) Revert Merge NixOS/nixpkgs#107275: nixos: fix "nixos-rebuild ...
Take 2, after NixOS#94582 had to be reverted. This reverts commit ac03cfa.
Motivation for this change
The new condition is slightly different, but I think it's OK?
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)