Bug#882007: openssl: add mips r6 support

2017-12-06 Thread YunQiang Su
On Wed, Dec 6, 2017 at 4:38 AM, Sebastian Andrzej Siewior
 wrote:
> On 2017-11-28 21:15:29 [+0100], To YunQiang Su wrote:
>> control: forwarded -1 https://github.com/openssl/openssl/pull/4813
>> On 2017-11-18 05:45:29 [+0800], YunQiang Su wrote:
>> > If you can help to forward, it will be great.
>>
>> done.
>
> Upstream as of 1.1.1 has R6 support the asm part and that was the main
> culprit for the mipsr6 targets in 10-*. I smashed that into 20-* and
> intend to keep it there for now. Once we move to 1.1.1 I would drop them
> and switch to the R6 asm. That means we keep debian-mipsr6 targets and
> drop linux-mips32r6 and so on. This is what I have now:
>
> 
> https://git.breakpoint.cc/cgit/bigeasy/openssl-debian.git/commit/?h=debian/unstable=7c7ee04fd1d4ef2b30a239d3b1002a1cec6541db
>
> This should work for you, does it?

That's great.

>
> Sebastian



-- 
YunQiang Su



Bug#882007: openssl: add mips r6 support

2017-12-05 Thread Sebastian Andrzej Siewior
On 2017-11-28 21:15:29 [+0100], To YunQiang Su wrote:
> control: forwarded -1 https://github.com/openssl/openssl/pull/4813
> On 2017-11-18 05:45:29 [+0800], YunQiang Su wrote:
> > If you can help to forward, it will be great.
> 
> done.

Upstream as of 1.1.1 has R6 support the asm part and that was the main
culprit for the mipsr6 targets in 10-*. I smashed that into 20-* and
intend to keep it there for now. Once we move to 1.1.1 I would drop them
and switch to the R6 asm. That means we keep debian-mipsr6 targets and
drop linux-mips32r6 and so on. This is what I have now:


https://git.breakpoint.cc/cgit/bigeasy/openssl-debian.git/commit/?h=debian/unstable=7c7ee04fd1d4ef2b30a239d3b1002a1cec6541db

This should work for you, does it?
 
Sebastian



Bug#882007: [Pkg-openssl-devel] Bug#882007: openssl: add mips r6 support

2017-11-28 Thread Sebastian Andrzej Siewior
control: forwarded -1 https://github.com/openssl/openssl/pull/4813
On 2017-11-18 05:45:29 [+0800], YunQiang Su wrote:
> If you can help to forward, it will be great.

done.

Sebastian



Bug#882007: [Pkg-openssl-devel] Bug#882007: openssl: add mips r6 support

2017-11-17 Thread YunQiang Su
On Sat, Nov 18, 2017 at 4:41 AM, Sebastian Andrzej Siewior
 wrote:
> On 2017-11-17 22:45:26 [+0800], YunQiang Su wrote:
>> +--- a/Configurations/10-main.conf
>>  b/Configurations/10-main.conf
>> +@@ -736,6 +736,31 @@ sub vms_info {
>> + shared_ldflag=> add("-mabi=64"),
>> + multilib => "64",
>> + },
>> ++"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",
>> ++},
>
> That part should go upstream. Do you want me to forward it or do you do
> it yourself?

If you can help to forward, it will be great.

>
> Sebastian



-- 
YunQiang Su



Bug#882007: [Pkg-openssl-devel] Bug#882007: openssl: add mips r6 support

2017-11-17 Thread Sebastian Andrzej Siewior
On 2017-11-17 22:45:26 [+0800], YunQiang Su wrote:
> +--- a/Configurations/10-main.conf
>  b/Configurations/10-main.conf
> +@@ -736,6 +736,31 @@ sub vms_info {
> + shared_ldflag=> add("-mabi=64"),
> + multilib => "64",
> + },
> ++"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",
> ++},

That part should go upstream. Do you want me to forward it or do you do
it yourself?

Sebastian



Bug#882007: openssl: add mips r6 support

2017-11-17 Thread YunQiang Su
Package: src:openssl
Version: 1.1.0g-2
X-Debbugs-Cc: hel...@subdivi.de

Please add mips r6 support of openssl.
mips r6 is quite similar with current mips architectures,
while mips r6 drops and replace some insn,
so they are not compatible with previous version.

Here for openssl, we disable ASM, and -DBN_DIV3W.

-- 
YunQiang Su
diff --git a/debian/patches/debian-targets.patch 
b/debian/patches/debian-targets.patch
index dbac728..3085112 100644
--- a/debian/patches/debian-targets.patch
+++ b/debian/patches/debian-targets.patch
@@ -4,7 +4,7 @@
 
 --- /dev/null
 +++ b/Configurations/20-debian.conf
-@@ -0,0 +1,140 @@
+@@ -0,0 +1,165 @@
 +my $debian_cflags = `dpkg-buildflags --get CFLAGS` . `dpkg-buildflags --get 
CPPFLAGS` . "-Wa,--noexecstack -Wall";
 +$debian_cflags =~ s/\n/ /g;
 +my $debian_ldflags = `dpkg-buildflags --get LDFLAGS`;
@@ -90,6 +90,31 @@
 +  inherit_from => [ "linux64-mips64", "debian" ],
 +  cflags => add("-DL_ENDIAN"),
 +  },
++  "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" ],
 +  },
@@ -145,3 +170,37 @@
 +  },
 +);
 +
+--- a/Configurations/10-main.conf
 b/Configurations/10-main.conf
+@@ -736,6 +736,31 @@ sub vms_info {
+ shared_ldflag=> add("-mabi=64"),
+ multilib => "64",
+ },
++"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",
++},
+
+  IA-32 targets...
+  These two targets are a bit aged and are to be used on older Linux