Commit Graph

27 Commits

Author SHA1 Message Date
Artturin
b2bcfe74af androidndkPkgs: separate build and target ndkInfoFun
remove unused hostInfo variable, the uses of it were removed in (androidndk: remove legacy ndks)[2408ef3c6f].

This prevents exiting with `error "attribute 'triple' missing"`
It's better to exit with a throw than a attribute missing which cannot
2023-09-21 01:34:26 +03:00
Artturin
2557230bf6 androidndkPkgs: throw if targetPackages is not populated
It's better to exit with a throw than a attribute missing which cannot
be caught with tryEval

```
> pkgsCross.aarch64-android-prebuilt.androidndkPkgs
error: attribute 'androidndkPkgs_21' missing
```

Proper ways to to use `androidndkPkgs` AFAIK.

`with import ./. { crossSystem = (import ./lib).systems.examples.aarch64-android-prebuilt; }; buildPackages.androidndkPkgs`

or

`pkgsCross.aarch64-android-prebuilt.buildPackages.androidndkPkgs`
2023-09-21 01:34:14 +03:00
Moritz Angermann
bd4cdf346c android-ndk: allow -no-pie
We add -pie if we don't find -shared in the arguments. However this does not
work in the presense of @response files.  We also do not respect -no-pie, and
add -pie regardless. This improves the argument parsing, and allows to prevent
the forced -pie flag.
2023-02-18 13:19:47 +00:00
cidkidnix
2fda814620 android-ndk: change to targetPrefix 2022-12-06 15:03:09 -06:00
cidkidnix
20b67d38c7 Add muldefs to ld-flags 2022-09-23 10:10:44 -05:00
Jari Vetoniemi
2408ef3c6f androidndk: remove legacy ndks
allows us to remove python2 dependencies and lot more
2022-06-29 18:27:16 +09:00
Jari Vetoniemi
0aded46f08 androidenv: update packages 2022-06-29 18:27:16 +09:00
Jari Vetoniemi
5f1923d67e androidenv: fix android cross-compilers
These were completely broken. Even if they managed to output a binary,
it wouldn't actually run on the actual device.
2022-06-29 18:27:16 +09:00
Christoph Bauer
b5c2b76cf4 androidndkPkgs.binaries: correct passthru parameters
Without this patch ghc 8.10.7 with taget platform aarch64-android fails
to build due an invalid nix expression (missing attribute targetPrefix).
To fix that we make the binaries attribute to conform with the
expectation about unwrapped bintools / cc derivations w.r.t. passthru
attributes.
2022-06-28 12:25:19 +02:00
Ben Siraphob
2f78ee7e81 pkgs/development: stdenv.lib -> lib 2021-01-24 00:16:29 +07:00
John Ericson
7cac79b3ad androidndkPkgs: Take version from underlying package
We can now do this, so let's.
2020-09-08 09:32:06 -04:00
Matthew Bauer
ff33855bf0 android: readd 18b ndk
This is referenced in all-packages.nix, so might as well leave it
heref or now.
2020-08-17 23:51:59 -05:00
Matthew Bauer
074bc78cc8 android: update sdk, ndk to 29, 21 2020-08-17 23:51:53 -05:00
Orivej Desh
d028c74c3c
androidndkPkgs: expose libc in cc.lib (#87737)
Fixes cross compiling gdb that uses targetPackages.stdenv.cc.cc.lib.
2020-05-16 09:22:24 +00:00
Pedro Pombeiro
ec9fb6275a androidndkPkgs: fix typo in propagatedBuildInputs (#75045) 2019-12-05 08:43:47 -05:00
Matthew Bauer
f089afe965 androidndk: get correct libs for x86_64 2019-09-23 13:40:45 -04:00
volth
08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Matthew Bauer
d180cb9850 cc-wrapper: make machine configuration configurable
It is useful to make these dynamic and not bake them into gcc. This
means we don’t have to rebuild gcc to change these values. Instead, we
will pass cflags to gcc based on platform values. This was already
done hackily for android gcc (which is multi-target), but not for our
own gccs which are single target.

To accomplish this, we need to add a few things:

- add ‘arch’ to cpu
- add NIX_CFLAGS_COMPILE_BEFORE flag (goes before args)
- set -march everywhere
- set mcpu, mfpu, mmode, and mtune based on targetPlatform.gcc flags

cc-wrapper: only set -march when it is in the cpu type

Some architectures don’t have a good mapping of -march. For instance
POWER architecture doesn’t support the -march flag at all!

https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options
2019-04-20 20:05:51 -04:00
Ken Micklas
ec7643047c androidndk-pkgs: Remove -mfloat flag 2019-04-16 16:21:51 -04:00
Matthew Bauer
ac491d2df7 systems: remove android armv5te platform
this isn’t useful any more because the ndk we use no longer supports it.
2019-04-10 01:55:09 -04:00
Matthew Bauer
589c2c2870 androidndk: fixup mess
New android ndk (18) now uses clang. We were going through the wrapper
that are provided. This lead to surprising errors when building.
Ideally we could use the llvm linker as well, but this leads to errors
as many packages don’t support the llvm linker.
2019-04-10 01:30:34 -04:00
Ken Micklas
f2bb67c806 androidndk-pkgs: Fix cc-wrapper flags
(cherry picked from commit 5f4bf240f51124ffa19a5fa0ac48bf144768d9ff)
2019-04-10 01:30:34 -04:00
Sander van der Burg
7a5a370c25 Remove redundant chmod 2018-12-19 22:45:48 +01:00
Sander van der Burg
51428627eb Initial attempt to restore Android NDK cross building 2018-12-18 22:58:12 +01:00
Sander van der Burg
2757ddb182 Separate androidndkpkgs from androidenv 2018-12-18 21:14:43 +01:00