From: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
Date: Sun, 5 Nov 2017 15:09:09 +0100
Subject: debian-targets

---
 Configurations/20-debian.conf | 192 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 192 insertions(+)
 create mode 100644 Configurations/20-debian.conf

diff --git a/Configurations/20-debian.conf b/Configurations/20-debian.conf
new file mode 100644
index 000000000000..71215d94dfc1
--- /dev/null
+++ b/Configurations/20-debian.conf
@@ -0,0 +1,192 @@
+my %targets = (
+	"debian" => {
+		cflags => add("-Wa,--noexecstack -Wall"),
+	},
+	"debian-alpha" => {
+		inherit_from => [ "linux-alpha-gcc", "debian" ],
+	},
+	"debian-alpha-ev4" => {
+		inherit_from => [ "debian-alpha" ],
+		cflags => add("-mcpu=ev4"),
+	},
+	"debian-alpha-ev5" => {
+		inherit_from => [ "debian-alpha" ],
+		cflags => add("-mcpu=ev5"),
+	},
+	"debian-arm64" => {
+		inherit_from => [ "linux-aarch64", "debian" ],
+	},
+	"debian-arm64ilp32" => {
+		inherit_from => [ "linux-arm64ilp32", "debian" ],
+	},
+	"debian-armel" => {
+		inherit_from => [ "linux-armv4", "debian" ],
+	},
+	"debian-armhf" => {
+		inherit_from => [ "linux-armv4", "debian" ],
+	},
+	"debian-amd64" => {
+		inherit_from => [ "linux-x86_64", "debian" ],
+	},
+	"debian-i386" => {
+		inherit_from => [ "linux-elf", "debian" ],
+	},
+	"debian-avr32" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-kfreebsd-amd64" => {
+		inherit_from => [ "debian-amd64" ],
+		enable		=> [ ],
+	},
+	"debian-kfreebsd-i386" => {
+		inherit_from => [ "debian-i386" ],
+		enable		=> [ ],
+	},
+	"debian-hppa" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-hurd-i386" => {
+		inherit_from => [ "hurd-x86", "debian" ],
+	},
+	"debian-ia64" => {
+		inherit_from => [ "linux-ia64", "debian" ],
+	},
+	"debian-m68k" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-mips" => {
+		inherit_from => [ "linux-mips32", "debian" ],
+		cflags => add("-DB_ENDIAN"),
+	},
+	"debian-mipsel" => {
+		inherit_from => [ "linux-mips32", "debian" ],
+		cflags => add("-DL_ENDIAN"),
+	},
+	"debian-mipsn32" => {
+		inherit_from => [ "linux-mips64", "debian" ],
+		cflags => add("-DB_ENDIAN"),
+	},
+	"debian-mipsn32el" => {
+		inherit_from => [ "linux-mips64", "debian" ],
+		cflags => add("-DL_ENDIAN"),
+	},
+	"debian-mips64" => {
+		inherit_from => [ "linux64-mips64", "debian" ],
+		cflags => add("-DB_ENDIAN"),
+	},
+	"debian-mips64el" => {
+		inherit_from => [ "linux64-mips64", "debian" ],
+		cflags => add("-DL_ENDIAN"),
+	},
+
+	# Temporary MIPS R6 targets. Those will vanish approx in 1.1.1 because
+	# aes-mips.pl creates proper R6 ASM code. After that, we can inherit from
+	# the linux*-mips* targets.
+	"linux-mips32r6" => {
+	# Configure script adds minimally required -march for assembly
+	# support, if no -march was specified at command line.
+		inherit_from     => [ "linux-generic32"],
+		cflags           => add("-mabi=32"),
+		perlasm_scheme   => "o32",
+		shared_ldflag    => add("-mabi=32"),
+	},
+	# mips32 and mips64 below refer to contemporary MIPS Architecture
+	# specifications, MIPS32 and MIPS64, rather than to kernel bitness.
+	"linux-mips64r6" => {
+		inherit_from     => [ "linux-generic32"],
+		cflags           => add("-mabi=n32"),
+		bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
+		perlasm_scheme   => "n32",
+		shared_ldflag    => add("-mabi=n32"),
+		multilib         => "32",
+	},
+	"linux64-mips64r6" => {
+		inherit_from     => [ "linux-generic64"],
+		cflags           => add("-mabi=64"),
+		perlasm_scheme   => "64",
+		shared_ldflag    => add("-mabi=64"),
+		multilib         => "64",
+	},
+	"debian-mipsr6" => {
+		inherit_from => [ "linux-mips32r6", "debian" ],
+		cflags => add("-DB_ENDIAN"),
+	},
+	"debian-mipsr6el" => {
+		inherit_from => [ "linux-mips32r6", "debian" ],
+		cflags => add("-DL_ENDIAN"),
+	},
+	"debian-mipsn32r6" => {
+		inherit_from => [ "linux-mips64r6", "debian" ],
+		cflags => add("-DB_ENDIAN"),
+	},
+	"debian-mipsn32r6el" => {
+		inherit_from => [ "linux-mips64r6", "debian" ],
+		cflags => add("-DL_ENDIAN"),
+	},
+	"debian-mips64r6" => {
+		inherit_from => [ "linux64-mips64r6", "debian" ],
+		cflags => add("-DB_ENDIAN"),
+	},
+	"debian-mips64r6el" => {
+		inherit_from => [ "linux64-mips64r6", "debian" ],
+		cflags => add("-DL_ENDIAN"),
+	},
+
+	"debian-nios2" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-powerpc" => {
+		inherit_from => [ "linux-ppc", "debian" ],
+	},
+	"debian-powerpcspe" => {
+		inherit_from => [ "linux-ppc", "debian" ],
+	},
+	"debian-ppc64" => {
+		inherit_from => [ "linux-generic64", "debian", asm("ppc64_asm") ],
+		cflags => add("-DB_ENDIAN"),
+		perlasm_scheme => "linux64",
+	},
+	"debian-ppc64el" => {
+		inherit_from => [ "linux-ppc64le", "debian" ],
+	},
+	"debian-riscv64" => {
+		inherit_from => [ "linux-generic64", "debian" ],
+	},
+	"debian-s390" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-s390x" => {
+		inherit_from => [ "linux64-s390x", "debian" ],
+	},
+	"debian-sh3" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-sh3eb" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-sh4" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-sh4eb" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-m32r" => {
+		inherit_from => [ "linux-generic32", "debian" ],
+	},
+	"debian-sparc" => {
+		inherit_from => [ "linux-generic32", "debian", asm("sparcv9_asm") ],
+		cflags => add("-DB_ENDIAN -DBN_DIV2W"),
+	},
+	"debian-sparc64" => {
+	        inherit_from => [ "linux-generic64", "debian", asm("sparcv9_asm") ],
+	        cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
+		bn_ops => "BN_LLONG RC4_CHAR",
+	},
+	"debian-tilegx" => {
+		inherit_from => [ "linux-generic64", "debian" ],
+	},
+	"debian-x32" => {
+		inherit_from => [ "linux-x32", "debian" ],
+	},
+);
+
