commit: c03b60f650c68650c35319406348a63cb3062f1c
Author: Andreas K. Hüttel gentoo org>
AuthorDate: Sat Apr 27 20:33:04 2019 +
Commit: Andreas K. Hüttel gentoo org>
CommitDate: Sat Apr 27 20:33:04 2019 +
URL:https://gitweb.gentoo.org/proj/riscv.git/commit/?id=c03b60f6
profiles: Hook into multilib system. Fingers crossed.
Signed-off-by: Andreas K. Hüttel gentoo.org>
profiles/arch/riscv/parent | 1 +
profiles/arch/riscv/rv64gc/lp64/package.use.force | 2 ++
profiles/arch/riscv/rv64gc/lp64/use.mask | 5 +
profiles/arch/riscv/rv64gc/lp64d/package.use.force | 2 ++
profiles/arch/riscv/rv64gc/lp64d/use.mask | 5 +
profiles/arch/riscv/rv64gc/use.force | 2 ++
profiles/arch/riscv/rv64gc/use.mask| 3 +++
profiles/arch/riscv/use.force | 2 ++
profiles/arch/riscv/use.mask | 6 ++
profiles/features/multilib/package.use | 3 +++
profiles/features/multilib/parent | 1 +
11 files changed, 32 insertions(+)
diff --git a/profiles/arch/riscv/parent b/profiles/arch/riscv/parent
index eb001c6..c5b66f7 100644
--- a/profiles/arch/riscv/parent
+++ b/profiles/arch/riscv/parent
@@ -1 +1,2 @@
../base
+../../features/multilib
diff --git a/profiles/arch/riscv/rv64gc/lp64/package.use.force
b/profiles/arch/riscv/rv64gc/lp64/package.use.force
new file mode 100644
index 000..a319d3e
--- /dev/null
+++ b/profiles/arch/riscv/rv64gc/lp64/package.use.force
@@ -0,0 +1,2 @@
+# Undo multilib forcing.
+sys-apps/sandbox -abi_riscv_lp64d
diff --git a/profiles/arch/riscv/rv64gc/lp64/use.mask
b/profiles/arch/riscv/rv64gc/lp64/use.mask
new file mode 100644
index 000..5d1fa74
--- /dev/null
+++ b/profiles/arch/riscv/rv64gc/lp64/use.mask
@@ -0,0 +1,5 @@
+# Mask multilib, since we cannot use it.
+multilib
+
+# Mask the multilib flags back for non-multilib profile.
+abi_riscv_lp64d
diff --git a/profiles/arch/riscv/rv64gc/lp64d/package.use.force
b/profiles/arch/riscv/rv64gc/lp64d/package.use.force
new file mode 100644
index 000..fe0910f
--- /dev/null
+++ b/profiles/arch/riscv/rv64gc/lp64d/package.use.force
@@ -0,0 +1,2 @@
+# Undo multilib forcing.
+sys-apps/sandbox -abi_riscv_lp64
diff --git a/profiles/arch/riscv/rv64gc/lp64d/use.mask
b/profiles/arch/riscv/rv64gc/lp64d/use.mask
new file mode 100644
index 000..c3b6781
--- /dev/null
+++ b/profiles/arch/riscv/rv64gc/lp64d/use.mask
@@ -0,0 +1,5 @@
+# Mask multilib, since we cannot use it.
+multilib
+
+# Mask the multilib flags back for non-multilib profile.
+abi_riscv_lp64
diff --git a/profiles/arch/riscv/rv64gc/use.force
b/profiles/arch/riscv/rv64gc/use.force
new file mode 100644
index 000..020f290
--- /dev/null
+++ b/profiles/arch/riscv/rv64gc/use.force
@@ -0,0 +1,2 @@
+# Force the flag corresponding to the default ABI.
+abi_riscv_lp64d
diff --git a/profiles/arch/riscv/rv64gc/use.mask
b/profiles/arch/riscv/rv64gc/use.mask
new file mode 100644
index 000..cf1e9a0
--- /dev/null
+++ b/profiles/arch/riscv/rv64gc/use.mask
@@ -0,0 +1,3 @@
+# Unmask the multilib flags for this arch.
+-abi_riscv_lp64d
+-abi_riscv_lp64
diff --git a/profiles/arch/riscv/use.force b/profiles/arch/riscv/use.force
new file mode 100644
index 000..612aced
--- /dev/null
+++ b/profiles/arch/riscv/use.force
@@ -0,0 +1,2 @@
+# Force the flag which corresponds to ARCH.
+riscv
diff --git a/profiles/arch/riscv/use.mask b/profiles/arch/riscv/use.mask
index 840b97a..d974bbe 100644
--- a/profiles/arch/riscv/use.mask
+++ b/profiles/arch/riscv/use.mask
@@ -1,3 +1,9 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Unmask the flag which corresponds to ARCH.
+-riscv
+
# The required library has not been ported to riscv yet.
seccomp
diff --git a/profiles/features/multilib/package.use
b/profiles/features/multilib/package.use
new file mode 100644
index 000..b01f51f
--- /dev/null
+++ b/profiles/features/multilib/package.use
@@ -0,0 +1,3 @@
+# Enable all ABIs by default so we can protect any non-native binaries that
+# might be executed.
+sys-apps/sandbox abi_riscv_lp64d abi_riscv_lp64
diff --git a/profiles/features/multilib/parent
b/profiles/features/multilib/parent
new file mode 100644
index 000..8dccfc9
--- /dev/null
+++ b/profiles/features/multilib/parent
@@ -0,0 +1 @@
+gentoo:features/multilib