Skip to content
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

pkgsStatic fix for macOS #51881

Merged
merged 2 commits into from Dec 15, 2018
Merged

Conversation

matthewbauer
Copy link
Member

Motivation for this change

Two things done:

  • don't let cctools use clang backend for as (builtin one works here)
  • use buildPackages for bootstrap_cmds in all-packages.nix

--disable-clang-as flag disables the use of clang by cctools-port
These are almost always from buildPackages. Another issue where
splicing doesn’t seem to pick them up correctly.
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the internal assembler change work for ARM/iOS?

@matthewbauer
Copy link
Member Author

Maybe not. The cctools as may only support arm32:

https://github.com/tpoechtrager/cctools-port/blob/f53c6186393915ba9bff287f18769f9e14ec02e6/cctools/as/driver.c#L257-L283

We can make this flag conditional on !stdenv.targetPlatform.isAarch64.

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg build pkgsStatic.hello pkgsStatic.file

@matthewbauer
Copy link
Member Author

But we use prebuilt iOS for that right now correct?

@Ericson2314
Copy link
Member

Ericson2314 commented Dec 11, 2018

No we build cctools for iOS. It's already broken because you removed the old cctools though, so this is fine for now.. (We'll have to upstream the TAPI stuff or just swap LLVM sources for Apple's LLVM fork for that.)

@Ericson2314
Copy link
Member

Also from those comments, it seems that the internal assembler still requires llvm the library, even if it doesn't require clang? I'm not sure removing that dependency is correct.

@Ericson2314 Ericson2314 mentioned this pull request Dec 13, 2018
10 tasks
@matthewbauer matthewbauer merged commit 6f78e30 into NixOS:staging Dec 15, 2018
@matthewbauer matthewbauer deleted the static-fixes branch February 22, 2019 04:15
@bobrik bobrik mentioned this pull request Mar 5, 2021
21 tasks
thefloweringash pushed a commit to thefloweringash/nixpkgs that referenced this pull request Mar 8, 2021
Without this change `as` on `aarch64-darwin` is defunct:

```
$ /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as -v
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as: assembler (/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as or /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as) for architecture arm64 not installed
Installed assemblers are:
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc64/as for architecture ppc64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/x86_64/as for architecture x86_64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc/as for architecture ppc
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/i386/as for architecture i386
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm/as for architecture arm
```

Apple defaults to Clang in all cases from what I see, but nixpkgs prefers `cctools`: NixOS#51881.
github-actions bot pushed a commit to bobrik/nixpkgs that referenced this pull request Mar 17, 2021
Without this change `as` on `aarch64-darwin` is defunct:

```
$ /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as -v
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as: assembler (/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as or /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as) for architecture arm64 not installed
Installed assemblers are:
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc64/as for architecture ppc64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/x86_64/as for architecture x86_64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc/as for architecture ppc
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/i386/as for architecture i386
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm/as for architecture arm
```

Apple defaults to Clang in all cases from what I see, but nixpkgs prefers `cctools`: NixOS#51881.
veprbl pushed a commit that referenced this pull request Mar 17, 2021
Without this change `as` on `aarch64-darwin` is defunct:

```
$ /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as -v
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as: assembler (/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as or /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as) for architecture arm64 not installed
Installed assemblers are:
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc64/as for architecture ppc64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/x86_64/as for architecture x86_64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc/as for architecture ppc
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/i386/as for architecture i386
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm/as for architecture arm
```

Apple defaults to Clang in all cases from what I see, but nixpkgs prefers `cctools`: #51881.
jdelStrother pushed a commit to jdelStrother/nixpkgs that referenced this pull request Mar 19, 2021
Without this change `as` on `aarch64-darwin` is defunct:

```
$ /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as -v
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/bin/as: assembler (/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as or /nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm64/as) for architecture arm64 not installed
Installed assemblers are:
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc64/as for architecture ppc64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/x86_64/as for architecture x86_64
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/ppc/as for architecture ppc
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/i386/as for architecture i386
/nix/store/g11xba8ch20zndaf32hfnap46z47b5k3-cctools-port-949.0.1/libexec/as/arm/as for architecture arm
```

Apple defaults to Clang in all cases from what I see, but nixpkgs prefers `cctools`: NixOS#51881.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants