From 61b0e2effd9a1c6c706d229680b74662dad22d11 Mon Sep 17 00:00:00 2001
From: Shiyou Yin <[email protected]>
Date: Mon, 23 Mar 2020 14:27:31 +0800
Subject: [PATCH] configure.ac: Delete the default setting of LS_CFLAGS.

It's not recommended to use '-march=loongson2f' for MMI compilation.
This default setting will cause link error on new platform whose buildtools
are build with '-march=gs464', then MMI will be disabled.
Error message while compiler check for mmi:
"linking mips:loongson_2f module with previous mips:gs464 modules"

After deleting the default setting of LS_CFLAGS,
MMI can be enabled only when following conditions met together:
1) user have not specify --disable-loongson-mmi.
2) MMI options has been specified by MMI_CFLAGS,CC or compiler's default 
setting.
3) compiler supports these MMI options.
---
 configure.ac | 5 -----
 meson.build  | 1 -
 2 files changed, 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1ca3974..7032af4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,11 +271,6 @@ PIXMAN_CHECK_CFLAG([-xldscope=hidden], [dnl
 
 dnl ===========================================================================
 dnl Check for Loongson Multimedia Instructions
-
-if test "x$LS_CFLAGS" = "x" ; then
-    LS_CFLAGS="-march=loongson2f"
-fi
-
 have_loongson_mmi=no
 AC_MSG_CHECKING(whether to use Loongson MMI assembler)
 
diff --git a/meson.build b/meson.build
index 15d3409..673be7c 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,6 @@ endforeach
 
 use_loongson_mmi = get_option('loongson-mmi')
 have_loongson_mmi = false
-loongson_mmi_flags = ['-march=loongson2f']
 if not use_loongson_mmi.disabled()
   if host_machine.cpu_family() == 'mips64' and cc.compiles('''
       #ifndef __mips_loongson_vector_rev
-- 
2.1.0

Use this patch.


&gt; -----原始邮件-----
&gt; 发件人: "YunQiang Su" <[email protected]>
&gt; 发送时间: 2020-03-28 08:47:07 (星期六)
&gt; 收件人: "Shiyou Yin" <[email protected]>
&gt; 抄送: pixman <[email protected]>
&gt; 主题: Re: [Pixman] [PATCH 1/2] configure.ac: Use '-mloongson-mmi' for 
Loongson MMI.
&gt; 
&gt; Shiyou Yin <[email protected]> 于2020年3月26日周四 下午8:57写道:
&gt; &gt;
&gt; &gt; It's recommended to use '-mloongson-mmi' for MMI.
&gt; &gt; ---
&gt; &gt;  configure.ac | 2 +-
&gt; &gt;  meson.build  | 2 +-
&gt; &gt;  2 files changed, 2 insertions(+), 2 deletions(-)
&gt; &gt;
&gt; &gt; diff --git a/configure.ac b/configure.ac
&gt; &gt; index 1ca3974..fd7df47 100644
&gt; &gt; --- a/configure.ac
&gt; &gt; +++ b/configure.ac
&gt; &gt; @@ -273,7 +273,7 @@ dnl 
===========================================================================
&gt; &gt;  dnl Check for Loongson Multimedia Instructions
&gt; &gt;
&gt; &gt;  if test "x$LS_CFLAGS" = "x" ; then
&gt; &gt; -    LS_CFLAGS="-march=loongson2f"
&gt; &gt; +    LS_CFLAGS="-mloongson-mmi"
&gt; 
&gt; It will break ALL of generic MIPS distributions.
&gt; It will break ALL of non-loongson MIPS builds.
&gt; 
&gt; Please reject it.
&gt; 
&gt; &gt;  fi
&gt; &gt;
&gt; &gt;  have_loongson_mmi=no
&gt; &gt; diff --git a/meson.build b/meson.build
&gt; &gt; index 15d3409..a45c969 100644
&gt; &gt; --- a/meson.build
&gt; &gt; +++ b/meson.build
&gt; &gt; @@ -51,7 +51,7 @@ endforeach
&gt; &gt;
&gt; &gt;  use_loongson_mmi = get_option('loongson-mmi')
&gt; &gt;  have_loongson_mmi = false
&gt; &gt; -loongson_mmi_flags = ['-march=loongson2f']
&gt; &gt; +loongson_mmi_flags = ['-mloongson-mmi']
&gt; &gt;  if not use_loongson_mmi.disabled()
&gt; &gt;    if host_machine.cpu_family() == 'mips64' and cc.compiles('''
&gt; &gt;        #ifndef __mips_loongson_vector_rev
&gt; &gt; --
&gt; &gt; 2.1.0
&gt; &gt;
&gt; &gt; _______________________________________________
&gt; &gt; Pixman mailing list
&gt; &gt; [email protected]
&gt; &gt; https://lists.freedesktop.org/mailman/listinfo/pixman
&gt; 
&gt; 
&gt; 
&gt; -- 
&gt; YunQiang Su
</[email protected]></[email protected]></[email protected]></[email protected]></[email protected]>

Attachment: proposal_B_0001-configure.ac-Delete-the-default-setting-of-LS_CFLAGS.patch
Description: Binary data

_______________________________________________
Pixman mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to