Add gcc4 cross-compiler support (!1754)
[skip ci]: CI already went through successfully, just rebasing.
This commit is contained in:
parent
8896209afc
commit
b015b288b8
|
@ -28,11 +28,14 @@ def generate(args, pkgname):
|
|||
if prefix == "gcc":
|
||||
upstream = pmb.aportgen.core.get_upstream_aport(args, "main/gcc")
|
||||
based_on = "main/gcc (from Alpine)"
|
||||
elif prefix == "gcc4":
|
||||
upstream = args.aports + "/main/gcc4"
|
||||
based_on = "main/gcc4 (from postmarketOS)"
|
||||
elif prefix == "gcc6":
|
||||
upstream = args.aports + "/main/gcc6"
|
||||
based_on = "main/gcc6 (from postmarketOS)"
|
||||
else:
|
||||
raise ValueError("Invalid prefix '" + prefix + "', expected gcc or"
|
||||
raise ValueError("Invalid prefix '" + prefix + "', expected gcc, gcc4 or"
|
||||
" gcc6.")
|
||||
pmb.helpers.run.user(args, ["cp", "-r", upstream, args.work + "/aportgen"])
|
||||
|
||||
|
|
|
@ -200,7 +200,9 @@ def init_buildenv(args, apkbuild, arch, strict=False, force=False, cross=None,
|
|||
# Cross-compiler init
|
||||
if cross:
|
||||
cross_pkgs = ["ccache-cross-symlinks"]
|
||||
if "gcc6" in depends:
|
||||
if "gcc4" in depends:
|
||||
cross_pkgs += ["gcc4-" + arch]
|
||||
elif "gcc6" in depends:
|
||||
cross_pkgs += ["gcc6-" + arch]
|
||||
else:
|
||||
cross_pkgs += ["gcc-" + arch, "g++-" + arch]
|
||||
|
|
Loading…
Reference in New Issue